/* ==========================================================================
   DALENZO — feuille de style commune
   Approche mobile-first. Couleurs de la charte : beige, bleu marine, bleu.
   ========================================================================== */

/* 1. Variables
   ------------------------------------------------------------------------ */
:root {
  --beige: #EBE4DB;          /* beige officiel DALENZO */
  --beige-soft: #F5F1EB;     /* fond de page */
  --beige-line: #D9CFC3;     /* filets et bordures */
  --paper: #FFFFFF;
  --navy: #163047;           /* texte principal, boutons */
  --navy-deep: #10263A;
  --blue: #426D96;           /* accent, focus */
  --ink-soft: #5A554E;       /* texte secondaire */

  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --wrap: 1160px;
  --gutter: 20px;
  --section: 64px;
  --header-h: 64px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section: 96px; --header-h: 76px; }
}

/* 2. Base
   ------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--navy);
  background: var(--beige-soft);
  text-rendering: optimizeLegibility;
}
@media (min-width: 768px) { body { font-size: 1.0625rem; } }

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.65rem, 1.2rem + 2vw, 2.5rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius-s);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--paper); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34em;
}
@media (min-width: 768px) { .lead { font-size: 1.25rem; } }

.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; line-height: 1.55; }

/* 3. Boutons
   ------------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font: 600 0.95rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: var(--paper); }

.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--paper); }

.btn--light { background: var(--beige); border-color: var(--beige); color: var(--navy); }
.btn--light:hover { background: var(--paper); border-color: var(--paper); color: var(--navy); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--beige-line);
  text-decoration-thickness: 2px;
}
.text-link:hover { text-decoration-color: currentColor; }

/* Liens Amazon : masqués tant qu'aucune adresse n'est renseignée (js/main.js) */
[data-amazon][hidden] { display: none !important; }

/* 4. En-tête et navigation
   ------------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 235, 0.96);
  border-bottom: 1px solid var(--beige-line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(245, 241, 235, 0.88); backdrop-filter: blur(8px); }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; padding: 6px 0; }
.brand img { width: 132px; height: auto; }
@media (min-width: 768px) { .brand img { width: 150px; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid var(--beige-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font: 600 0.9rem/1 var(--font);
  cursor: pointer;
}
.nav-toggle-icon { position: relative; width: 18px; height: 12px; }
.nav-toggle-icon::before,
.nav-toggle-icon::after,
.nav-toggle-icon span {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s, opacity .2s, top .2s;
}
.nav-toggle-icon::before { top: 0; }
.nav-toggle-icon span { top: 5px; }
.nav-toggle-icon::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 5px; transform: rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon span { opacity: 0; }

.nav-menu {
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  display: none;
  padding: 8px var(--gutter) 24px;
  background: var(--beige-soft);
  border-bottom: 1px solid var(--beige-line);
  box-shadow: 0 18px 30px -24px rgba(22, 48, 71, .35);
}
.nav-menu.is-open { display: block; }

.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid var(--beige-line);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
}
.nav-list li:last-child a { border-bottom: 0; }
.nav-list a[aria-current="page"] { font-weight: 700; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-list { display: flex; align-items: center; gap: 6px; }
  .nav-list a {
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    font-size: 0.95rem;
  }
  .nav-list a:hover { background: var(--beige); color: var(--navy); }
  .nav-list a[aria-current="page"] { background: var(--beige); font-weight: 600; }
}

/* 5. Sections génériques
   ------------------------------------------------------------------------ */
.section { padding: var(--section) 0; }
.section--beige { background: var(--beige); }
.section--paper { background: var(--paper); }
.section--navy { background: var(--navy); color: var(--beige); }
.section--navy h2, .section--navy h3 { color: var(--paper); }
.section--navy a:not(.btn) { color: var(--beige); }
.section--navy :focus-visible { outline-color: var(--beige); }
.section--navy .note { color: rgba(235, 228, 219, .8); }

.section-head { max-width: 40em; margin-bottom: 40px; }
h2 + .lead, h2 + p { margin-top: 14px; }

.split {
  display: grid;
  gap: 36px;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .split--reverse > :first-child { order: 2; }
}

.media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--beige);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--white { background: var(--paper); }

/* Liste de points simples */
.ticks { list-style: none; margin: 20px 0 0; padding: 0; }
.ticks li {
  position: relative;
  padding: 10px 0 10px 30px;
  border-top: 1px solid var(--beige-line);
}
.ticks li:last-child { border-bottom: 1px solid var(--beige-line); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 1.05em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

/* Trois bénéfices côte à côte */
.benefits {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.benefits li { padding: 24px 0; border-top: 1px solid var(--beige-line); }
.benefits h3 { margin-bottom: 8px; }
.benefits p { color: var(--ink-soft); }
@media (min-width: 768px) {
  .benefits { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .benefits li { padding: 28px 0 0; border-top: 2px solid var(--navy); }
}

/* Étapes réellement séquentielles */
.steps { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative;
  counter-increment: step;
  padding: 0 0 22px 52px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.9rem;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 16px; top: 38px; bottom: 4px;
  width: 2px;
  background: var(--beige-line);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: 4px; font-size: 1.05rem; }
.steps p { color: var(--ink-soft); }

/* Bandeau d'appel */
.cta-band { text-align: left; }
.cta-band .wrap { display: grid; gap: 24px; align-items: center; }
.cta-band p { max-width: 36em; }
@media (min-width: 900px) {
  .cta-band .wrap { grid-template-columns: 1.4fr auto; gap: 48px; }
  .cta-band .btn-row { margin-top: 0; justify-content: flex-end; }
}

/* 6. Accueil
   ------------------------------------------------------------------------ */
.hero {
  padding: 36px 0 var(--section);
  background: var(--beige);
}
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-top: 20px; color: #4E4943; }
.hero-media { aspect-ratio: 4 / 3; }
@media (min-width: 900px) {
  .hero { padding-top: 72px; }
  .hero-grid { grid-template-columns: 1fr 1.08fr; gap: 64px; }
}

.recipe-doors { display: grid; gap: 16px; }
@media (min-width: 700px) { .recipe-doors { grid-template-columns: 1fr 1fr; } }

.door {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  padding: 28px;
  border: 1.5px solid var(--beige-line);
  border-radius: var(--radius-m);
  background: var(--paper);
  text-decoration: none;
  transition: border-color .2s;
}
.door:hover { border-color: var(--navy); color: var(--navy); }
.door h3 { font-size: 1.45rem; }
.door p { color: var(--ink-soft); }
.door .door-go { margin-top: auto; font-weight: 600; text-decoration: underline; text-decoration-color: var(--beige-line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.door:hover .door-go { text-decoration-color: var(--navy); }

.help-links { display: grid; gap: 12px; margin-top: 28px; list-style: none; padding: 0; }
.help-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-m);
  background: var(--paper);
  text-decoration: none;
  font-weight: 600;
}
.help-links a span { font-weight: 400; color: var(--ink-soft); font-size: 0.9rem; }
.help-links a:hover { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }

/* 7. Page produit
   ------------------------------------------------------------------------ */
.product-hero { padding: 32px 0 var(--section); background: var(--beige); }
.product-hero-grid { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .product-hero { padding-top: 64px; }
  .product-hero-grid { grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
}
.product-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); }
.product-hero .brandline { display: block; margin-bottom: 10px; font-weight: 600; color: var(--blue); font-size: 1rem; letter-spacing: 0; }
.product-hero .lead { margin-top: 18px; }

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 86%;
  gap: 12px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  list-style: none;
}
.gallery li { scroll-snap-align: start; }
.gallery .media { aspect-ratio: 1 / 1; border-radius: var(--radius-m); }
.gallery-hint { margin-top: 8px; font-size: 0.85rem; color: var(--ink-soft); }
@media (min-width: 960px) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    grid-auto-columns: auto;
    margin: 0; padding: 0;
    overflow: visible;
  }
  .gallery li:first-child { grid-column: 1 / -1; }
  .gallery li:first-child .media { aspect-ratio: 4 / 3; }
  .gallery-hint { display: none; }
}

.uses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}
.uses li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--beige-line);
  font-size: 0.92rem;
  font-weight: 500;
}

/* Schéma des dimensions */
.dims { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .dims { grid-template-columns: 1.25fr 1fr; gap: 64px; } }
.dims-figure {
  margin: 0;
  padding: 24px 16px 16px;
  border-radius: var(--radius-l);
  background: var(--paper);
}
.dims-figure figcaption { margin-top: 12px; text-align: center; font-size: 0.85rem; color: var(--ink-soft); }
.dims-svg text { font-family: var(--font); }

.facts { margin: 0; display: grid; gap: 0; }
.facts div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--beige-line);
}
.facts div:first-child { border-top: 1px solid var(--beige-line); }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

/* Échelle de température */
.temp {
  margin: 32px 0 0;
  padding: 24px;
  border-radius: var(--radius-m);
  background: var(--paper);
}
.temp-bar {
  position: relative;
  height: 14px;
  margin: 18px 0 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #C9D6E3 0%, var(--beige) 22%, #E2C9A6 100%);
}
.temp-ends { display: flex; justify-content: space-between; gap: 12px; }
.temp-ends strong { display: block; font-size: 1.35rem; letter-spacing: -0.01em; }
.temp-ends span { font-size: 0.875rem; color: var(--ink-soft); }
.temp-ends div:last-child { text-align: right; }

.care-grid { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .care-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.care-grid li { padding: 24px; border-radius: var(--radius-m); background: var(--paper); }
.care-grid h3 { margin-bottom: 8px; }
.care-grid p { color: var(--ink-soft); }

.note { margin-top: 20px; font-size: 0.85rem; color: var(--ink-soft); max-width: 48em; }

/* 8. Pages simples (à propos, contact)
   ------------------------------------------------------------------------ */
.page-head { padding: 48px 0 40px; background: var(--beige); }
@media (min-width: 768px) { .page-head { padding: 80px 0 64px; } }
.page-head h1 { max-width: 16ch; }
.page-head .lead { margin-top: 18px; }

.prose { max-width: 38em; }
.prose p { margin-bottom: 1.2em; }
.prose .intro { font-size: 1.2rem; line-height: 1.55; color: var(--navy); font-weight: 500; }

.contact-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 72px; } }

.contact-card { padding: 24px; border-radius: var(--radius-m); background: var(--paper); }
.contact-card + .contact-card { margin-top: 16px; }
.contact-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
.contact-card a { font-weight: 600; word-break: break-word; }

.form { padding: 24px; border-radius: var(--radius-l); background: var(--paper); }
@media (min-width: 768px) { .form { padding: 36px; } }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; }
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--beige-line);
  border-radius: var(--radius-s);
  background: var(--beige-soft);
  color: var(--navy);
  font: 400 1rem/1.5 var(--font);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--blue); outline: 3px solid rgba(66, 109, 150, .25); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: #A23B2A; }
.field-error { margin-top: 6px; font-size: 0.875rem; color: #A23B2A; font-weight: 500; }
.form-status { margin-top: 16px; font-size: 0.95rem; }

/* 9. Pied de page
   ------------------------------------------------------------------------ */
.site-footer {
  padding: 56px 0 28px;
  background: var(--navy);
  color: var(--beige);
  font-size: 0.95rem;
}
.site-footer a { color: var(--beige); text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--beige); }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; } }
.footer-brand img { width: 140px; margin-bottom: 16px; }
.footer-brand p { color: rgba(235, 228, 219, .78); max-width: 26em; }
.footer-col h2 { font-size: 0.95rem; letter-spacing: 0; margin-bottom: 14px; color: var(--paper); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col address { font-style: normal; color: rgba(235, 228, 219, .78); }
.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(235, 228, 219, .18);
  font-size: 0.85rem;
  color: rgba(235, 228, 219, .7);
}

/* 10. Page recettes
   ------------------------------------------------------------------------ */
.rec-head { padding: 36px 0 28px; background: var(--beige); }
@media (min-width: 768px) { .rec-head { padding: 64px 0 44px; } }
.rec-head h1 { max-width: 14ch; }
.rec-head .lead { margin-top: 14px; }
.rec-head .help { margin-top: 14px; font-size: 0.95rem; }

.rec-tools { padding: 20px 0 8px; background: var(--beige); border-bottom: 1px solid var(--beige-line); }

.type-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--beige-soft);
  border: 1px solid var(--beige-line);
  max-width: 460px;
}
.type-switch button {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font: 600 0.95rem/1.1 var(--font);
  cursor: pointer;
}
.type-switch button[aria-pressed="true"] { background: var(--navy); color: var(--paper); }
.type-switch button:not([aria-pressed="true"]):hover { background: var(--paper); }

.search { position: relative; margin-top: 16px; max-width: 460px; }
.search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 44px 12px 16px;
  border: 1.5px solid var(--beige-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font: 400 1rem/1.4 var(--font);
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: #857E75; }
.search input:focus { border-color: var(--blue); outline: 3px solid rgba(66, 109, 150, .25); outline-offset: 0; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--beige);
  color: var(--navy);
  font: 600 1.1rem/1 var(--font);
  cursor: pointer;
}

.chips-label { margin: 18px 0 8px; font-size: 0.875rem; font-weight: 600; }
.chips {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter) 12px;
  overflow-x: auto;
  scrollbar-width: none;
  list-style: none;
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .chips { flex-wrap: wrap; margin: 0; padding: 2px 0 12px; overflow: visible; }
}
.chip {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border: 1.5px solid var(--beige-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font: 500 0.9rem/1.2 var(--font);
  white-space: nowrap;
  cursor: pointer;
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.chip .count { font-weight: 400; opacity: .75; margin-left: 4px; }

.rec-results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 22px 0 14px;
}
.rec-count { margin: 0; font-weight: 600; }
.reset-btn {
  min-height: 40px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--navy);
  font: 600 0.9rem/1 var(--font);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.rec-grid {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0 0 var(--section);
  padding: 0;
}
@media (min-width: 640px) { .rec-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .rec-grid { grid-template-columns: repeat(3, 1fr); } }

.rec-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 20px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-m);
  background: var(--paper);
  text-decoration: none;
  color: var(--navy);
  transition: border-color .2s;
}
.rec-card:hover { border-color: var(--navy); color: var(--navy); }
.rec-card-cat { font-size: 0.85rem; color: var(--ink-soft); }
.rec-card-cat .type { font-weight: 600; color: var(--blue); }
.rec-card h2 { margin: 6px 0 14px; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
.rec-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--beige-line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.rec-card-meta strong { color: var(--navy); font-weight: 600; }

.empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border-radius: var(--radius-m);
  background: var(--paper);
  text-align: center;
}
.empty h2 { font-size: 1.3rem; margin-bottom: 8px; }

/* Fiche recette (plein écran sur mobile) */
.rec-dialog {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  background: rgba(16, 38, 58, .55);
}
.rec-dialog.is-open { display: block; }
.rec-sheet {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--beige-soft);
}
@media (min-width: 900px) {
  .rec-sheet {
    inset: 32px auto 32px 50%;
    width: min(920px, calc(100% - 64px));
    transform: translateX(-50%);
    border-radius: var(--radius-l);
  }
}
.rec-sheet-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter);
  background: var(--beige-soft);
  border-bottom: 1px solid var(--beige-line);
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--beige-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--navy);
  font: 600 0.95rem/1 var(--font);
  cursor: pointer;
}
.back-btn:hover { border-color: var(--navy); }
.back-btn svg { width: 16px; height: 16px; }

.wake-btn {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font: 500 0.875rem/1.2 var(--font);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wake-btn[aria-pressed="true"] { background: var(--navy); color: var(--paper); text-decoration: none; }

.rec-sheet-body { padding: 24px var(--gutter) 48px; }
@media (min-width: 900px) { .rec-sheet-body { padding: 36px 48px 56px; } }

.rec-cat { font-size: 0.95rem; color: var(--ink-soft); }
.rec-cat .type { font-weight: 600; color: var(--blue); }
.rec-title { margin: 6px 0 14px; font-size: clamp(1.7rem, 1.3rem + 2vw, 2.4rem); }
.rec-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rec-tags li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--beige);
  font-size: 0.85rem;
  font-weight: 500;
}

.rec-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 24px 0 0;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--beige-line);
}
@media (min-width: 640px) { .rec-facts { grid-template-columns: repeat(4, 1fr); } }
.rec-facts div { padding: 14px 16px; background: var(--paper); }
.rec-facts dt { font-size: 0.8rem; color: var(--ink-soft); }
.rec-facts dd { margin: 2px 0 0; font-weight: 600; line-height: 1.35; }

.rec-cols { display: grid; gap: 32px; margin-top: 32px; }
@media (min-width: 760px) { .rec-cols { grid-template-columns: 1fr 1.35fr; gap: 44px; } }
.rec-cols h2 { font-size: 1.25rem; margin-bottom: 4px; }
.rec-cols .hint { margin: 0 0 12px; font-size: 0.85rem; color: var(--ink-soft); }

.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { border-bottom: 1px solid var(--beige-line); }
.ing-list label {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 8px 2px;
  cursor: pointer;
}
.ing-list input {
  width: 20px; height: 20px;
  margin: 0;
  accent-color: var(--navy);
}
.ing-qty { font-weight: 600; text-align: right; white-space: nowrap; }
.ing-list input:checked ~ span { color: #8C857C; text-decoration: line-through; }

.step-list { list-style: none; margin: 0; padding: 0; counter-reset: rstep; }
.step-list li { counter-increment: rstep; }
.step-list button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 12px 14px 54px;
  margin-bottom: 8px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--navy);
  font: 400 1.02rem/1.55 var(--font);
  text-align: left;
  cursor: pointer;
}
.step-list button::before {
  content: counter(rstep);
  position: absolute;
  left: 12px; top: 13px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.875rem;
}
.step-list button:hover { border-color: var(--beige-line); }
.step-list button[aria-pressed="true"] { background: transparent; color: #8C857C; }
.step-list button[aria-pressed="true"]::before { content: "✓"; background: var(--beige-line); color: var(--navy); }

.rec-tip {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: var(--radius-m);
  background: var(--beige);
}
.rec-tip strong { display: block; margin-bottom: 4px; }

.rec-portion { margin-top: 14px; font-size: 0.9rem; color: var(--ink-soft); }

body.has-dialog { overflow: hidden; }

/* Conseils en bas de la page recettes */
.tips-grid { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 700px) { .tips-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tips-grid { grid-template-columns: repeat(3, 1fr); } }
.tips-grid li { padding: 22px; border-radius: var(--radius-m); background: rgba(235, 228, 219, .08); border: 1px solid rgba(235, 228, 219, .2); }
.tips-grid h3 { margin-bottom: 6px; font-size: 1.05rem; }
.tips-grid p { color: rgba(235, 228, 219, .85); font-size: 0.95rem; }

/* 11. Mouvement réduit et impression
   ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .rec-tools, .rec-sheet-bar, .skip-link { display: none !important; }
  body, .rec-sheet { background: #fff; }
  .rec-dialog.is-open { position: static; background: none; }
  body.has-dialog main { display: none !important; }
  .rec-dialog.is-open .rec-sheet { inset: auto; }
  .rec-sheet { position: static; overflow: visible; transform: none; width: auto; }
}

/* Ajustements */
.split--top { align-items: start; }
.temp-note { margin-top: 16px; }
@media (min-width: 900px) { .split--top .temp { margin-top: 0; } }
.rec-title:focus { outline: none; }
.back-btn { flex: none; white-space: nowrap; }
.wake-btn { text-align: right; line-height: 1.25; }
.gallery { scroll-padding-inline: var(--gutter); }
@media (min-width: 960px) { .gallery { scroll-padding-inline: 0; } }
address { font-style: normal; }
.rec-head { padding-bottom: 12px; }
@media (min-width: 768px) { .rec-head { padding-bottom: 16px; } }

/* Sélecteur de langue */
.nav-lang a { font-weight: 600; }
@media (min-width: 900px) {
  .nav-list .nav-lang { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--beige-line); }
  .nav-list .nav-lang a { padding: 8px 10px; font-size: 0.9rem; }
}
.footer-lang { margin-top: 14px; }
