/* =====================================================================
   PETITS-DÉJEUNERS ET REPAS À EMPORTER
   Extension propre à cette page : chapitres illustrés, choix et checklist.
   Les styles et la navigation communs restent dans leurs feuilles actuelles.
   ===================================================================== */

/* 01. Entrée et accès directs aux six chapitres. */
.repas-guide {
  --repas-green: #075b37;
  --repas-border: #d6e4d8;
  --repas-soft: #eef6ef;
}

.repas-guide .repas-start {
  padding: clamp(20px, 3vw, 36px);
  margin-top: 30px;
  border: 1px solid var(--repas-border);
  border-radius: 20px;
  background: #f7faf6;
}

.repas-guide .repas-lead {
  max-width: 85ch;
  line-height: 1.75;
}

.repas-guide .repas-anchors,
.repas-guide .repas-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.repas-guide .repas-anchors a,
.repas-guide .repas-related a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  color: var(--repas-green);
  background: white;
  border: 1px solid var(--repas-border);
  border-radius: 999px;
  text-decoration: none;
}

.repas-guide .repas-note {
  font-size: .88em;
  color: #52685b;
  line-height: 1.65;
}

/* 02. Une photographie entière à côté du titre de chaque chapitre. */
.repas-guide .repas-chapter {
  scroll-margin-top: 170px;
  margin-top: clamp(35px, 5vw, 70px);
}

.repas-guide .repas-chapter-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(16px, 2.5vw, 28px);
  border: 1px solid var(--repas-border);
  border-radius: 24px;
  background: #f4f8f3;
}

.repas-guide .repas-chapter:nth-of-type(even) .repas-chapter-intro {
  background: #fbf8f1;
}

.repas-guide .repas-chapter-intro figure {
  min-width: 0;
  margin: 0;
}

.repas-guide .repas-chapter-intro img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 945;
  border-radius: 16px;
}

.repas-guide .repas-chapter-intro h2 {
  margin-top: 10px;
  color: var(--repas-green);
  line-height: 1.25;
  text-wrap: balance;
}

.repas-guide .repas-chapter-intro p:last-child {
  margin-bottom: 0;
  line-height: 1.75;
}

/* 03. Exemples et encadrés verts : lisibles, sans texte sur les photos. */
.repas-guide .repas-card {
  display: flex;
  flex-direction: column;
  border-top: 4px solid #8aac91;
}

.repas-guide .repas-card p {
  margin: 0 0 16px;
}

.repas-guide .repas-card p:last-child {
  margin-bottom: 0;
}

.repas-guide .repas-card > a {
  margin-top: auto;
  padding-top: 10px;
  color: var(--repas-green);
  font-weight: 700;
}

.repas-guide .repas-tag {
  color: #55735d;
  font-size: .82em;
  font-weight: 700;
}

.repas-guide .repas-retain {
  margin-top: 26px;
  padding: 22px 26px;
  color: #1f4930;
  border-left: 5px solid #21834c;
  border-radius: 0 16px 16px 0;
  background: #e5f3e7;
}

.repas-guide .repas-retain > strong {
  color: var(--repas-green);
  font-size: 1.08em;
}

.repas-guide .repas-retain p {
  margin-bottom: 0;
  line-height: 1.75;
}

/* 04. Choix de repas, préparation et liste à cocher. */
.repas-guide .repas-selector,
.repas-guide .repas-checklist {
  padding: clamp(20px, 3vw, 32px);
  margin-top: 26px;
  border: 1px solid var(--repas-border);
  border-radius: 18px;
  background: #f7faf7;
}

.repas-guide #repas-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 24px;
}

.repas-guide #repas-choice label,
.repas-guide #repas-choice select,
.repas-guide #repas-choice output {
  grid-column: 1 / -1;
}

.repas-guide #repas-choice label {
  font-weight: 700;
  color: var(--repas-green);
}

.repas-guide #repas-choice select {
  width: 100%;
  min-height: 48px;
  background: white;
}

.repas-guide #repas-choice button {
  justify-self: start;
}

.repas-guide #repas-choice output {
  min-height: 70px;
  margin-top: 4px;
  line-height: 1.65;
}

.repas-guide .repas-routine {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: routine;
  padding: 0;
  margin-top: 26px;
  list-style: none;
}

.repas-guide .repas-routine li {
  padding: 24px;
  border: 1px solid var(--repas-border);
  border-radius: 16px;
  background: white;
}

.repas-guide .repas-routine li::before {
  counter-increment: routine;
  content: counter(routine, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  color: #659570;
  font-size: 1.4em;
}

.repas-guide #repas-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--repas-border);
  cursor: pointer;
  line-height: 1.55;
}

.repas-guide #repas-checklist input {
  width: 21px;
  height: 21px;
  margin-top: 4px;
  flex: 0 0 21px;
  accent-color: var(--repas-green);
}

.repas-guide #repas-check-status {
  font-weight: 700;
  color: var(--repas-green);
}

.repas-guide .repas-faq {
  margin-top: 30px;
}

.repas-guide .repas-faq summary {
  line-height: 1.5;
}

/* 05. Mobile : la photo précède le titre, sans recadrage supplémentaire. */
@media (max-width: 800px) {
  .repas-guide .repas-chapter-intro,
  .repas-guide .repas-routine {
    grid-template-columns: minmax(0, 1fr);
  }

  .repas-guide .repas-chapter {
    scroll-margin-top: 120px;
  }

  .repas-guide .repas-chapter-intro h2 {
    font-size: clamp(25px, 6vw, 33px);
  }
}

/* 06. Impression : éviter six grandes images et les commandes interactives. */
@media print {
  body.repas-emporter-page .site-header,
  body.repas-emporter-page footer,
  body.repas-emporter-page .a-nav,
  body.repas-emporter-page .repas-anchors,
  body.repas-emporter-page .repas-selector,
  body.repas-emporter-page .repas-related,
  body.repas-emporter-page figure {
    display: none !important;
  }

  .repas-guide .repas-chapter-intro,
  .repas-guide .pratique-grid,
  .repas-guide .repas-routine {
    display: block;
  }

  .repas-guide .repas-chapter,
  .repas-guide .repas-start {
    margin-top: 16px;
  }

  .repas-guide .repas-card,
  .repas-guide .repas-routine li {
    margin-top: 12px;
  }

  .repas-guide h2,
  .repas-guide h3 {
    break-after: avoid;
  }

  .repas-guide .repas-faq details > * {
    display: block !important;
  }
}
