/* =====================================================================
   NOS RECETTES — Direction artistique « Carnet de cuisine de saison »
   Typo : Fraunces (titres) · DM Sans (texte) · Caveat (notes manuscrites)
   4 thèmes saisonniers pilotés par <html data-theme="...">
   ===================================================================== */

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand: "Caveat", "Comic Sans MS", cursive;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;
  --container: 1240px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Thème par défaut = automne */
  --bg: #faf4ec;
  --bg-alt: #f3e6d6;
  --surface: #fffdf9;
  --ink: #3b2a20;
  --ink-soft: #5d4637;
  --muted: #8a7363;
  --line: #ead9c6;
  --primary: #c2611c;
  --primary-hover: #a34f14;
  --primary-ink: #fff;
  --primary-soft: #f8e3d1;
  --accent: #8b2e2e;
  --accent-soft: #f3dcd8;
  --hero-from: #3b2a20;
  --hero-to: #8b2e2e;
  --shadow: 0 1px 2px rgba(59, 42, 32, .06), 0 8px 24px rgba(59, 42, 32, .08);
  --shadow-lg: 0 20px 50px rgba(59, 42, 32, .18);
  --pattern: radial-gradient(circle at 1px 1px, rgba(139, 46, 46, .07) 1px, transparent 0);
}

html[data-theme="printemps"] {
  --bg: #fbf8f1; --bg-alt: #eef4e6; --surface: #ffffff; --ink: #2f3a2b; --ink-soft: #4b5a45; --muted: #7c8a75;
  --line: #dfe8d4; --primary: #5f8f4e; --primary-hover: #4b763d; --primary-soft: #e2eedb;
  --accent: #d9708b; --accent-soft: #fbe3ea; --hero-from: #2f3a2b; --hero-to: #5f8f4e;
  --pattern: radial-gradient(circle at 1px 1px, rgba(217, 112, 139, .09) 1px, transparent 0);
}
html[data-theme="ete"] {
  --bg: #fff9ef; --bg-alt: #ffefd6; --surface: #ffffff; --ink: #3a2a1f; --ink-soft: #5b4433; --muted: #937b66;
  --line: #f5dfc0; --primary: #e0533a; --primary-hover: #c4412a; --primary-soft: #fde1d9;
  --accent: #f0a92a; --accent-soft: #fff0cc; --hero-from: #3a2a1f; --hero-to: #e0533a;
  --pattern: radial-gradient(circle at 1px 1px, rgba(240, 169, 42, .12) 1px, transparent 0);
}
html[data-theme="automne"] { /* = valeurs par défaut */ }
html[data-theme="hiver"] {
  --bg: #f4f7fa; --bg-alt: #e4ecf4; --surface: #ffffff; --ink: #1f2a36; --ink-soft: #3c4c5e; --muted: #73859a;
  --line: #d6e1ec; --primary: #2f5576; --primary-hover: #234462; --primary-soft: #dce8f3;
  --accent: #b8323f; --accent-soft: #f6dde0; --hero-from: #1f2a36; --hero-to: #2f5576;
  --pattern: radial-gradient(circle at 1px 1px, rgba(47, 85, 118, .08) 1px, transparent 0);
}

/* ------------------------------ Base ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink);
  background: var(--bg); background-image: var(--pattern); background-size: 22px 22px;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; color: var(--ink); margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.hand { font-family: var(--font-hand); font-size: 1.6rem; color: var(--accent); margin: 0 0 .1em; line-height: 1.1; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--primary); margin-bottom: .4rem; }
.eyebrow a { text-decoration: none; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 1000; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ----------------------------- Boutons ----------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .7rem 1.25rem;
  border-radius: 999px; border: 2px solid transparent; font: 600 .98rem/1.2 var(--font-body); cursor: pointer;
  text-decoration: none; transition: transform .15s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .2s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 16px -6px var(--primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #b3261e; color: #fff; }
.btn-danger:hover { background: #8f1d17; color: #fff; }
.btn-sm { padding: .45rem .9rem; font-size: .88rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ------------------------------ Chips ------------------------------ */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface); color: var(--ink); line-height: 1.3; }
.chip-cat { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chip-new { background: var(--accent); color: #fff; }
.chip-time { background: rgba(20, 15, 10, .72); color: #fff; backdrop-filter: blur(6px); }
.chip-light { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.chip-season { background: var(--primary-soft); color: var(--ink); }
.chip-time-sm { font-family: var(--font-body); font-size: .75rem; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }

/* ----------------------------- En-tête ----------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: .78rem; color: var(--muted); }
.logo-bg { fill: var(--primary-soft); }
.logo-pot { fill: var(--primary); }
.logo-lid { fill: var(--ink); }
.logo-leaf { fill: var(--accent); }
.logo-steam { stroke: var(--muted); }
.main-nav { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.nav-link { padding: .5rem .85rem; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .96rem; }
.nav-link:hover { background: var(--primary-soft); color: var(--ink); }
.nav-link.is-active { background: var(--ink); color: var(--bg); }
.nav-search { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .2rem .15rem .9rem; margin: 0 .4rem; }
.nav-search input { border: 0; background: transparent; outline: none; width: 170px; font: inherit; font-size: .92rem; color: var(--ink); }
.nav-search button { border: 0; background: var(--primary); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .3s; }

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; background: var(--bg); padding: 1rem 1.25rem 1.5rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(-120%); transition: transform .35s var(--ease); }
  .main-nav.is-open { transform: none; }
  .nav-search { margin: .5rem 0; }
  .nav-search input { width: 100%; }
  .nav-link { padding: .8rem 1rem; }
}

/* --------------------------- Carrousel --------------------------- */
.hero-carousel { position: relative; height: clamp(420px, 68vh, 640px); overflow: hidden; background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); }
.carousel-track, .carousel-slide { position: absolute; inset: 0; }
.carousel-slide { opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility .9s; }
.carousel-slide.is-active { opacity: 1; visibility: visible; }
.carousel-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s linear; }
.carousel-slide.is-active .carousel-img { transform: scale(1); }
.carousel-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 10, 6, .78) 0%, rgba(15, 10, 6, .45) 45%, rgba(15, 10, 6, 0) 75%), linear-gradient(0deg, rgba(15, 10, 6, .45), transparent 40%); }
.carousel-content { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; color: #fff; padding-bottom: 2rem; }
.carousel-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.carousel-title { color: #fff; font-size: clamp(2.2rem, 5.5vw, 4.2rem); max-width: 20ch; font-weight: 800; text-shadow: 0 2px 20px rgba(0, 0, 0, .3); }
.carousel-sub { max-width: 46ch; font-size: 1.15rem; color: rgba(255, 255, 255, .9); margin-bottom: 1.6rem; }
.carousel-slide.is-active .carousel-content > * { animation: rise .8s var(--ease) both; }
.carousel-slide.is-active .carousel-content > *:nth-child(2) { animation-delay: .1s; }
.carousel-slide.is-active .carousel-content > *:nth-child(3) { animation-delay: .2s; }
.carousel-slide.is-active .carousel-content > *:nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); transition: background .2s; }
.carousel-nav:hover { background: rgba(255, 255, 255, .3); }
.carousel-nav.prev { left: 1.25rem; }
.carousel-nav.next { right: 1.25rem; }
.carousel-dots { position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); display: flex; gap: .5rem; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .3s var(--ease), background .3s; padding: 0; }
.carousel-dots button.is-active { width: 34px; background: #fff; }
@media (max-width: 700px) { .carousel-nav { display: none; } .carousel-overlay { background: linear-gradient(0deg, rgba(15, 10, 6, .85) 10%, rgba(15, 10, 6, .2) 80%); } .carousel-content { justify-content: flex-end; padding-bottom: 4rem; } }

.hero-empty { padding: 5rem 0 3rem; text-align: center; background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.hero-empty .lead { margin-inline: auto; }

/* ---------------------------- Accueil ---------------------------- */
.welcome-band { background: var(--surface); border-bottom: 1px solid var(--line); }
.welcome-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; padding: 2.4rem 0; }
.welcome-title { font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin-bottom: .2rem; }
.big-search { display: flex; gap: .5rem; background: var(--bg); border: 2px solid var(--line); border-radius: 999px; padding: .35rem .35rem .35rem 1.2rem; max-width: 640px; }
.big-search:focus-within { border-color: var(--primary); }
.big-search input { flex: 1; border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); min-width: 0; }
@media (max-width: 860px) { .welcome-inner { grid-template-columns: 1fr; } }

.section { padding: 3.5rem 0 1rem; }
.section-tight { padding: 1.6rem 0 .4rem; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .15rem; }
.section-head p.muted { margin: 0; }
.link-more { font-weight: 700; text-decoration: none; white-space: nowrap; }

.cat-scroller { display: flex; gap: .6rem; overflow-x: auto; padding: .3rem .1rem .8rem; scrollbar-width: thin; }
.cat-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.05rem .55rem .55rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.cat-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); color: var(--ink); }
.cat-pill small { color: var(--muted); font-weight: 500; }
.cat-icon { width: 34px; height: 34px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 50%; font-size: 1.1rem; }

/* ----------------------------- Grilles ----------------------------- */
.grid { display: grid; gap: 1.6rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* -------------------------- Carte recette -------------------------- */
.recipe-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.recipe-card:hover { transform: translateY(-6px) rotate(-.3deg); box-shadow: var(--shadow-lg); }
.recipe-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.recipe-card-link:hover { color: inherit; }
.recipe-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.recipe-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.recipe-card:hover .recipe-card-media img { transform: scale(1.06); }
.recipe-card-media .chip-cat { position: absolute; top: .8rem; left: .8rem; }
.recipe-card-media .chip-new { position: absolute; top: .8rem; right: .8rem; }
.recipe-card-media .chip-time { position: absolute; bottom: .8rem; left: .8rem; }
.recipe-card-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.recipe-card-title { font-size: 1.22rem; margin: 0; }
.recipe-card-summary { font-size: .93rem; color: var(--muted); margin: 0; }
.recipe-card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: .6rem; border-top: 1px dashed var(--line); font-size: .85rem; color: var(--ink-soft); }
.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.reasons li { font-size: .76rem; background: var(--primary-soft); color: var(--ink); padding: .18rem .55rem; border-radius: 999px; }
.fridge-match { font-size: .85rem; margin: 0; }
.difficulty { display: inline-flex; align-items: center; gap: 3px; }
.difficulty i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: inline-block; }
.difficulty.d1 i:nth-child(-n+1), .difficulty.d2 i:nth-child(-n+2), .difficulty.d3 i { background: var(--primary); }
.seasons-mini span { margin-left: 2px; }

/* --------------------------- Produits --------------------------- */
.produce-band { background: var(--bg-alt); padding: 3rem 0 2.5rem; margin-top: 3rem; border-block: 1px solid var(--line); }
.produce-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.produce-list a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .95rem .45rem .6rem; background: var(--surface); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .93rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: transform .2s var(--ease), background .2s; }
.produce-list a:hover { transform: translateY(-2px) rotate(-1deg); background: var(--primary-soft); color: var(--ink); }
.produce-list a span { font-size: 1.2rem; }
.produce-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.produce-col { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.produce-list-col { flex-direction: column; }
.produce-list-col a { width: 100%; box-shadow: none; background: var(--bg); }
.newcomers { background: var(--accent-soft); padding: 1rem 1.3rem; border-radius: var(--radius); }
@media (max-width: 860px) { .produce-columns { grid-template-columns: 1fr; } }

/* ----------------------------- Livres ----------------------------- */
.books-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.books-grid-lg { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .books-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .books-grid, .books-grid-lg { grid-template-columns: 1fr; } }
.book-card { --book: var(--primary); position: relative; display: flex; min-height: 220px; border-radius: 6px 18px 18px 6px; overflow: hidden; text-decoration: none; color: #fff; background: var(--book); box-shadow: 6px 8px 0 -2px color-mix(in srgb, var(--book) 60%, #000), var(--shadow); transition: transform .3s var(--ease); }
.book-card:hover { transform: translateY(-6px) rotate(-1deg); color: #fff; }
.book-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; mix-blend-mode: multiply; }
.book-spine { width: 16px; background: rgba(0, 0, 0, .22); box-shadow: inset -3px 0 6px rgba(0, 0, 0, .2); flex-shrink: 0; position: relative; z-index: 1; }
.book-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .35rem; padding: 1.4rem; }
.book-body strong { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.15; }
.book-body small { opacity: .9; font-size: .9rem; }
.book-body em { margin-top: auto; font-style: normal; font-weight: 700; font-size: .85rem; opacity: .9; }
.book-body .chip-new { align-self: flex-start; background: #fff; color: var(--book); }
.book-icon { font-size: 2rem; }
.book-banner { background: var(--book, var(--primary)) !important; color: #fff; }
.book-banner h1, .book-banner .lead, .book-banner .muted, .book-banner .eyebrow, .book-banner a { color: #fff !important; }
.book-banner-inner { display: flex; justify-content: space-between; gap: 2rem; align-items: center; }
.book-banner-cover { width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); transform: rotate(3deg); }

/* --------------------------- Bannières --------------------------- */
.page-banner { padding: 3.2rem 0 2.2rem; background: linear-gradient(180deg, var(--bg-alt), transparent); border-bottom: 1px solid var(--line); }
.page-banner h1 { margin-bottom: .3rem; }
.month-picker { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.4rem; }
.month-picker a { padding: .4rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.month-picker a.is-now { border-color: var(--accent); }
.month-picker a.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ----------------------------- Filtres ----------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; background: var(--surface); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.filters input, .filters select { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font: inherit; font-size: .93rem; color: var(--ink); }
.filters input[type=search] { flex: 1 1 200px; }

.pagination { display: flex; justify-content: center; gap: .4rem; margin: 2.5rem 0 1rem; flex-wrap: wrap; }
.pagination a, .pagination span { padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface); font-weight: 600; }
.pagination .current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.empty-state { text-align: center; padding: 3rem 1rem; background: var(--surface); border-radius: var(--radius); border: 2px dashed var(--line); }
.empty-state span { font-size: 3rem; display: block; }

/* ------------------------- Page recette ------------------------- */
.draft-banner { background: #fff3cd; color: #6b4e00; text-align: center; padding: .6rem; font-weight: 600; }
.recipe-hero { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; min-height: 560px; }
.recipe-hero-media { position: relative; overflow: hidden; background: var(--bg-alt); }
.recipe-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.recipe-hero-card { padding: 2.5rem clamp(1.5rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: center; gap: .8rem; background: var(--surface); }
.breadcrumb { font-size: .85rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.recipe-title { font-size: clamp(2rem, 4vw, 3.2rem); margin: .2rem 0; }
.recipe-hero-card .chip-cat { align-self: flex-start; background: var(--primary-soft); box-shadow: none; }
.recipe-summary { font-size: 1.15rem; color: var(--ink-soft); }
.recipe-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .4rem 0; }
.recipe-facts div { background: var(--bg); border-radius: var(--radius-sm); padding: .7rem .9rem; border: 1px solid var(--line); }
.recipe-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.recipe-facts dd { margin: 0; font-weight: 700; font-family: var(--font-display); font-size: 1.1rem; }
.recipe-badges, .recipe-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 900px) { .recipe-hero { grid-template-columns: 1fr; } .recipe-hero-media { aspect-ratio: 4 / 3; } }
@media (max-width: 500px) { .recipe-facts { grid-template-columns: repeat(2, 1fr); } }

.recipe-intro { max-width: 820px; padding-top: 2.5rem; font-size: 1.15rem; }
.recipe-intro p::first-letter { font-family: var(--font-display); font-size: 3.4em; float: left; line-height: .9; margin: .05em .12em 0 0; color: var(--primary); font-weight: 800; }
.season-note { max-width: 820px; margin-top: 1rem; background: var(--primary-soft); border-radius: var(--radius); padding: 1rem 1.3rem; }
.season-note p { margin: .2rem 0; }

.recipe-layout { display: grid; grid-template-columns: 360px 1fr; gap: 3rem; padding-block: 2.5rem; align-items: start; }
@media (max-width: 960px) { .recipe-layout { grid-template-columns: 1fr; } }
.ingredients-panel { position: relative; }
.panel-sticky { position: sticky; top: 96px; background: var(--surface); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow); border-top: 6px solid var(--primary); }
.servings-control { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border-radius: 999px; padding: .3rem; margin-bottom: 1rem; }
.servings-control button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 1.3rem; cursor: pointer; }
.ing-group { font-family: var(--font-hand); font-size: 1.5rem; color: var(--accent); margin: 1rem 0 .2rem; font-weight: 600; }
.ingredients { list-style: none; margin: 0 0 1rem; padding: 0; }
.ingredients li { border-bottom: 1px dashed var(--line); }
.ingredients label { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; padding: .55rem 0; cursor: pointer; }
.ingredients input { accent-color: var(--primary); transform: translateY(2px); }
.ingredients input:checked ~ span { text-decoration: line-through; opacity: .5; }
.ing-qty { font-weight: 700; color: var(--primary); }
.ing-unit { font-weight: 600; }
.ing-note { width: 100%; padding-left: 1.4rem; color: var(--muted); font-size: .88rem; }

.steps-panel h2 small { font-family: var(--font-body); font-size: .9rem; font-weight: 500; }
.progress { height: 6px; background: var(--line); border-radius: 999px; margin: 0 0 1.5rem; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s var(--ease); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 1.2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); transition: opacity .3s; }
.step-num { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--primary); background: var(--surface); color: var(--primary); font: 800 1.35rem var(--font-display); cursor: pointer; transition: background .2s, color .2s; }
.step.is-done { opacity: .5; }
.step.is-done .step-num { background: var(--primary); color: #fff; }
.step-body h3 { margin-bottom: .3rem; }
.step-body p { margin-bottom: .6rem; }
.step-img { border-radius: var(--radius); margin: .5rem 0 .8rem; max-height: 420px; object-fit: cover; width: 100%; }
.tips-card { margin-top: 2rem; background: var(--accent-soft); border-radius: var(--radius); padding: 1.4rem 1.6rem; border-left: 6px solid var(--accent); }
.recipe-footer-meta { margin-top: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { padding: .25rem .7rem; background: var(--bg-alt); border-radius: 999px; text-decoration: none; font-size: .85rem; font-weight: 600; }

/* Mode cuisine : gros texte, écran allumé */
body.cook-mode { font-size: 1.3rem; }
body.cook-mode .site-header, body.cook-mode .site-footer, body.cook-mode .recipe-hero-media, body.cook-mode .recipe-intro, body.cook-mode .section { display: none; }
body.cook-mode .recipe-hero { grid-template-columns: 1fr; min-height: 0; }
body.cook-mode .recipe-layout { grid-template-columns: 380px 1fr; }
body.cook-mode .step-body p { font-size: 1.35rem; line-height: 1.6; }

.timer-toast { position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 80; background: var(--ink); color: var(--bg); padding: .8rem 1rem .8rem 1.3rem; border-radius: 999px; display: flex; gap: .8rem; align-items: center; box-shadow: var(--shadow-lg); font: 700 1.2rem var(--font-display); }
.timer-toast[hidden] { display: none; }
.timer-toast button { background: rgba(255, 255, 255, .15); border: 0; color: inherit; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.timer-toast.is-ringing { background: var(--accent); animation: ring .5s infinite alternate; }
@keyframes ring { to { transform: scale(1.06); } }

/* ----------------------------- Connexion ----------------------------- */
.login-wrap { min-height: 70vh; display: grid; place-items: center; padding: 3rem 1rem; }
.login-card { width: min(100%, 420px); background: var(--surface); border-radius: var(--radius-lg); padding: 2.4rem; box-shadow: var(--shadow-lg); text-align: center; border-top: 6px solid var(--primary); }
.login-icon { font-size: 3rem; }
.login-back { margin: 1.2rem 0 0; font-size: .9rem; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; text-align: left; margin-top: 1.2rem; }
.form-stack label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .92rem; }
.form-stack input { padding: .8rem 1rem; border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: var(--bg); color: var(--ink); }
.form-stack input:focus { border-color: var(--primary); outline: none; }
.code-input { text-align: center; font-size: 1.6rem !important; letter-spacing: .4em; font-family: var(--font-display) !important; }
.alert { padding: .8rem 1rem; border-radius: var(--radius-sm); margin: .8rem 0; font-weight: 500; text-align: left; }
.alert-error { background: #fde7e5; color: #8f1d17; }
.alert-success { background: #e3f4e1; color: #1f5f1b; }
.alert-warning { background: #fff3cd; color: #6b4e00; }
.alert-info { background: #e2eef9; color: #1d4a72; }

/* ---------------------------- Erreurs ---------------------------- */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-emoji { font-size: 5rem; animation: wobble 2.5s ease-in-out infinite; display: inline-block; }
.error-code { font-family: var(--font-hand); font-size: 1.8rem; color: var(--accent); margin: 0; }
.error-page .lead { margin: 0 auto 1.5rem; }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* ----------------------------- Pied ----------------------------- */
.site-footer { margin-top: 5rem; color: var(--bg); }
.footer-wave svg { display: block; width: 100%; height: 60px; fill: var(--ink); }
.footer-inner { background: var(--ink); padding: 2.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin: 0; }
.footer-season { opacity: .8; }
.site-footer h3 { color: var(--bg); font-size: 1.05rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer a { color: color-mix(in srgb, var(--bg) 80%, transparent); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .hand { color: var(--accent-soft); }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; opacity: .75; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------- Effets saisonniers ---------------------- */
.season-fx { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
html[data-effects="off"] .season-fx { display: none; }
.fx-particle { position: absolute; top: -40px; user-select: none; will-change: transform; animation: fall linear forwards; opacity: .85; }
@keyframes fall { to { transform: translate3d(var(--drift, 40px), 110vh, 0) rotate(var(--rot, 360deg)); } }
@media (prefers-reduced-motion: reduce) { .season-fx { display: none; } * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ----------------------------- Impression ----------------------------- */
@media print {
  .site-header, .site-footer, .no-print, .season-fx, .recipe-actions, .breadcrumb, .timer-toast { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .recipe-hero { grid-template-columns: 1fr 1fr; min-height: 0; }
  .recipe-hero-media { min-height: 220px; }
  .recipe-layout { grid-template-columns: 1fr 1.6fr; gap: 1.5rem; }
  .panel-sticky { position: static; box-shadow: none; border: 1px solid #ddd; }
  .step { break-inside: avoid; padding: .6rem 0; }
  .recipe-card { break-inside: avoid; }
}
