/*
 * Copyright 2020 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

:root {
  /* sticky desktop header bar; 0 while the burger overlays the page (see `header`) */
  --header-height: 0px;
  --breadcrumbs-height: 40px;

  /* Les 2 Vaches brand palette */
  --l2v-crimson: #cb2e56;
  --l2v-pink: #f3aac8;
  --l2v-pink-strong: #ed87b2;
  --l2v-pink-light: #FFD9EA;
  --l2v-blue: #edf3ff;
  --l2v-cream: #faf6ee;
  --l2v-yellow: #f7cd7e;
  --l2v-green: #007f44;
  --l2v-ink: #111;

  /* Product colour palette — one shade per product, taken from the `aplat-produit`
     of each fiche on les2vaches.com. Shared by the hero band and the product-intro
     baseline, which is why it lives here and not in a block. */
  --l2v-product-brown: #5c2d29;
  --l2v-product-red: #ef4448;
  --l2v-product-magenta: #e2005e;
  --l2v-product-orange: #ff6a14;
  --l2v-product-caramel: #e98b4c;
  --l2v-product-dark-brown: #912d0d;
  --l2v-product-sky: #74abcf;
  --l2v-product-teal: #63b3ce;
  --l2v-product-teal-dark: #3d7791;
  --l2v-product-indigo: #2b41a9;
  --l2v-product-blue: #2444b4;
  --l2v-product-yellow: #ffca3c;
  --l2v-product-gold: #fdbd58;
  --l2v-product-mango: #fe781e;
  --l2v-product-green: #18673b;
  --l2v-product-pink: #fd6b82;

  /* Darker twins of the shades too light to be read as text on white or cream
     (WCAG 1.4.3, 4.5:1). Same hue; the aplat keeps the original shade. */
  --l2v-product-red-text: #e11318;
  --l2v-product-orange-text: #c54800;
  --l2v-product-caramel-text: #b55616;
  --l2v-product-sky-text: #3777a0;
  --l2v-product-teal-text: #2e7a93;
  --l2v-product-yellow-text: #926a00;
  --l2v-product-gold-text: #a16302;
  --l2v-product-mango-text: #bf4d01;
  --l2v-product-pink-text: #e30326;

/* Product colour carried by the page, not by each block: author `theme:
   produit-<shade>` in the page metadata and EDS turns it into a body class
   (decorateTemplateAndTheme). Anything in the page can then read
   --l2v-product-color for surfaces, and --l2v-product-text-color for text (falls
   back to the former when the shade is dark enough as is). */
body.produit-brown { --l2v-product-color: var(--l2v-product-brown); }

body.produit-red {
  --l2v-product-color: var(--l2v-product-red);
  --l2v-product-text-color: var(--l2v-product-red-text);
}

body.produit-magenta { --l2v-product-color: var(--l2v-product-magenta); }

body.produit-orange {
  --l2v-product-color: var(--l2v-product-orange);
  --l2v-product-text-color: var(--l2v-product-orange-text);
}

body.produit-caramel {
  --l2v-product-color: var(--l2v-product-caramel);
  --l2v-product-text-color: var(--l2v-product-caramel-text);
}

body.produit-dark-brown { --l2v-product-color: var(--l2v-product-dark-brown); }

body.produit-sky {
  --l2v-product-color: var(--l2v-product-sky);
  --l2v-product-text-color: var(--l2v-product-sky-text);
}

body.produit-teal {
  --l2v-product-color: var(--l2v-product-teal);
  --l2v-product-text-color: var(--l2v-product-teal-text);
}

body.produit-teal-dark { --l2v-product-color: var(--l2v-product-teal-dark); }
body.produit-indigo { --l2v-product-color: var(--l2v-product-indigo); }
body.produit-blue { --l2v-product-color: var(--l2v-product-blue); }

body.produit-yellow {
  --l2v-product-color: var(--l2v-product-yellow);
  --l2v-product-text-color: var(--l2v-product-yellow-text);
}

body.produit-gold {
  --l2v-product-color: var(--l2v-product-gold);
  --l2v-product-text-color: var(--l2v-product-gold-text);
}

body.produit-mango {
  --l2v-product-color: var(--l2v-product-mango);
  --l2v-product-text-color: var(--l2v-product-mango-text);
}

body.produit-green { --l2v-product-color: var(--l2v-product-green); }

body.produit-pink {
  --l2v-product-color: var(--l2v-product-pink);
  --l2v-product-text-color: var(--l2v-product-pink-text);
}


  /* colors */
  --background-color: white;
  --light-color: #f8f8f8;

  /* #505050 tombait à 4.38:1 sur le rose --l2v-pink, sous le minimum AA de 4.5:1
     pour du texte courant ; #4a4a4a passe à 4.81:1 (WCAG 1.4.3) */
  --dark-color: #4a4a4a;
  --text-color: var(--l2v-ink);
  --link-color: var(--l2v-crimson);
  --link-hover-color: #a01f42;

  /* fonts */
  --body-font-family: alsina, -apple-system, system-ui, 'Segoe UI', roboto, 'Helvetica Neue', arial, sans-serif;
  --heading-font-family: l2v, alsina, roboto-condensed, roboto-condensed-fallback, sans-serif;
  --accent-font-family: var(--body-font-family);

  /* body sizes */
  --body-font-size-m: 1.125rem;
  --body-font-size-s: 1rem;
  --body-font-size-xs: 0.875rem;

  /* heading sizes: fluid, one per level (h1 = xxl … h6 = xs), the same on every page */
  --heading-font-size-xxl: clamp(2.75rem, 4.7vw, 4.25rem);
  --heading-font-size-xl: clamp(2rem, 3.2vw, 2.75rem);
  --heading-font-size-l: clamp(1.625rem, 2.4vw, 2.125rem);
  --heading-font-size-m: clamp(1.5rem, 2vw, 1.75rem);
  --heading-font-size-s: clamp(1.375rem, 1.8vw, 1.625rem);
  --heading-font-size-xs: clamp(1.1875rem, 1.5vw, 1.375rem);

  /* nav height */
  --nav-height: 4.5rem;
}

/* fallback fonts */
@font-face {
  font-family: roboto-condensed-fallback;
  size-adjust: 88.82%;
  src: local('Arial');
}

@font-face {
  font-family: roboto-fallback;
  size-adjust: 99.529%;
  src: local('Arial');
}

@media (width >= 56.25rem) {
  :root {
    /* body sizes */
    --body-font-size-m: 1.25rem;
    --body-font-size-s: 1.125rem;
    --body-font-size-xs: 1rem;
  }
}

body {
  display: none;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-m);
  line-height: 1.6;
}

*{
  box-sizing: border-box;
}

body.appear {
  display: block;
}

header {
  height: 0;
}

/* Desktop: the header becomes a white bar that stays on top while scrolling
   (blocks/header, `.hdr-bar`). Its height is reserved here, before the block loads,
   so the page does not jump. Below 992px the burger overlays the page as before. */
@media (width >= 992px) {
  :root {
    --header-height: var(--nav-height);

    scroll-padding-top: var(--header-height);
  }

  /* breadcrumbs: a second row in the sticky header, on unless `breadcrumbs` = `false` */
  body.breadcrumbs-enabled {
    --header-height: calc(var(--nav-height) + var(--breadcrumbs-height));
  }

  /* above cards (1000), below the search overlay (2200) and the skip link (3000) */
  header {
    position: sticky;
    top: 0;
    z-index: 1100;
    height: var(--header-height);
    background: #fff;
  }
}

header .header,
footer .footer {
  visibility: hidden;
}

header .header[data-block-status="loaded"],
footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
  font-family: var(--heading-font-family);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  scroll-margin: 2.5rem;
}

h1 { font-size: var(--heading-font-size-xxl); }
h2 { font-size: var(--heading-font-size-xl); }
h3 { font-size: var(--heading-font-size-l); }
h4 { font-size: var(--heading-font-size-m); }
h5 { font-size: var(--heading-font-size-s); }
h6 { font-size: var(--heading-font-size-xs); }

p,
dl,
ol,
ul,
pre,
blockquote {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
}

code,
pre {
  font-size: var(--body-font-size-s);
}

pre {
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--light-color);
  overflow-x: auto;
  white-space: pre;
}

main > div {
  margin: 2.5rem 1rem;
}

input,
textarea,
select,
button {
  font: inherit;
}

/* links */
a:any-link {
  color: var(--link-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* skip link — off-screen but focusable, slides in on keyboard focus (WCAG 2.4.1).
   Declared after `a:any-link` so it keeps its own colour, and above the header,
   whose panels go up to z-index 2200. */
a.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  padding: 0.7em 1.4em;
  background-color: var(--l2v-ink);
  color: #fff;
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-s);
  text-decoration: none;
  transform: translateY(-110%);
}

a.skip-link:focus {
  transform: translateY(0);
}

a.skip-link:hover {
  color: #fff;
  text-decoration: none;
}

/* the skip target is focusable by script only — no ring when it receives focus */
main:focus {
  outline: none;
}

/* buttons — Les 2 Vaches black "pill".

   `.button-wrapper a` selects the same link as `a.button`: the paragraph only gets
   the class when the link is its whole content. It is listed alongside so the pill
   survives DA Quick Edit, where ProseMirror re-renders the paragraph from its own
   schema — the `.button` / `.button-wrapper` classes are gone and only the
   `.prosemirror-editor` wrapper carries the decoration (see tools/quick-edit).
   `.button-wrapper em a` is the editor's shape of `a.button.secondary`: in the
   editor the authored <em> is still there, decorateButtons having not replaced it. */
a.button:any-link,
.button-wrapper a:any-link,
button {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  margin: 1rem 0;
  padding: 0.5em 1.5em;
  font-family: var(--body-font-family);
  font-style: normal;
  font-weight: 400;
  font-size: 1.1em;
  line-height: 1.2;
  background: url('/icons/bg-cta-menu.svg') center / 100% 100% no-repeat;
  text-align: center;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

a.button:hover,
a.button:focus,
.button-wrapper a:hover,
.button-wrapper a:focus,
button:hover,
button:focus {
  color: #fff;
  text-decoration: none;
  transform: scale(1.04);
  cursor: pointer;
}

button:disabled,
button:disabled:hover {
  background-color: var(--light-color);
  border-color: var(--light-color);
  color: var(--dark-color);
  cursor: unset;
  transform: none;
}

/* secondary — outlined black pill on light, white pill on colour */
a.button.secondary,
.button-wrapper em a:any-link,
button.secondary {
  background-color: transparent;
  background-image: none;
  border-radius: 2em;
  border: 0.125rem solid var(--l2v-ink);
  color: var(--l2v-ink);
}

a.button.secondary:hover,
.button-wrapper em a:hover,
button.secondary:hover {
  background-color: var(--l2v-ink);
  color: #fff;
}

main img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.icon {
  display: inline-block;
  height: 1.5rem;
  width: 1.5rem;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* sections */
main > .section {
  margin: 2.5rem 0;
}

main > .section > div {
  max-width: 75rem;
  margin: auto;
  padding: 0 1.5rem;
}

main > .section:first-of-type {
  margin-top: 0;
}

/* empty trailing sections (e.g. page-metadata) must not push the footer */
main > .section:empty {
  display: none;
}

@media (width >= 56.25rem) {
  main > .section > div {
    padding: 0 2rem;
  }
}

/* section metadata */
main .section.light,
main .section.highlight {
  background-color: var(--light-color);
  margin: 0;
  padding: 2.5rem 0;
}

/* Les 2 Vaches coloured section bands (full-bleed, no vertical margin so they touch) */
main .section.pink,
main .section.light-blue {
  margin: 0;
  padding: 3.5rem 0;
}

main .section.pink {
  background-color: var(--l2v-pink);
}

/* a listing right under its filter bar: no second band of empty pink */
main .section.pink:has(.teasers-filters) {
  padding-top: 1.5rem;
}

main .section.light-blue {
  background-color: var(--l2v-blue);
}

/* Headings stay left-aligned in coloured bands, like les2vaches.com — only the
   hero band centres its own text (see blocks/hero/hero.css). */

/* Highlight — the brand marks key words with a slightly tilted black brush stroke
   and white type. DA can't put a class on inline text, so this is keyed on <u>:
   the author underlines a word. A scan of the indexed pages found <u> unused
   everywhere else, so nothing existing changes appearance. The source ships this
   as an SVG of a rotated black rect; a pseudo-element reproduces it without the
   asset and scales to any word length. */
main u {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 0 0.18em;
  font-family: var(--body-font-family);
  color: #fff;
  text-decoration: none;
}

main u::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -2% -1%;
  background-color: var(--l2v-ink);
  transform: rotate(-1.5deg);
}

/* Script accent — italics switch to the brand's handwriting face. Deliberately
   NOT global: <em> is already used across the site for footnotes, sources and
   ordinary italics, which must stay in the body face. Only headings (where <em>
   is unused) and the manifesto section opt in. */
main h1 em,
main h2 em,
main h3 em,
main h4 em,
main h5 em,
main h6 em,
main .section.manifesto em {
  font-family: var(--accent-font-family);
  font-style: normal;
  text-transform: none;
}

/* CTA caption — a short hand-lettered line right under a button, flanked by two
   drawn arrows (the source site's `.et-surtout`). Keyed on the structural pair
   "button-wrapper followed by a paragraph", which no other page authors.

   DA Quick Edit replaces every top-level prose node with
   `.prosemirror-editor > .ProseMirror > <node>`, so in the editor the pair is
   wrapper + wrapper, not p + p. The `.prosemirror-editor` half of each selector
   below — and of the ones further down this file — exists only to keep the rule
   matching there; the class never appears on preview or live. */
main .section .button-wrapper + p,
main .section .button-wrapper + .prosemirror-editor {
  position: relative;
  display: table;
  margin: 0.25rem auto 0;
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-xs);
  line-height: 1.35;
  color: var(--dark-color);
  text-align: center;
}

main .section .button-wrapper + p::before,
main .section .button-wrapper + p::after,
main .section .button-wrapper + .prosemirror-editor::before,
main .section .button-wrapper + .prosemirror-editor::after {
  content: '';
  position: absolute;
  top: -0.625rem;
  width: 1.375rem;
  height: 1.375rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

main .section .button-wrapper + p::before,
main .section .button-wrapper + .prosemirror-editor::before {
  left: -1.625rem;
  background-image: url('/icons/et-surtout1.svg');
}

main .section .button-wrapper + p::after,
main .section .button-wrapper + .prosemirror-editor::after {
  right: -1.625rem;
  background-image: url('/icons/et-surtout2.svg');
}

/* "Filtrer par thématique / par produit" — a row of compact outlined chips
   (fragments /fragments/filtre-blog et /fragments/filtre-produits). On small
   screens the row scrolls sideways instead of stacking; from 900px the label sits
   on the same line and the chips wrap. Blog: pink band; produits: white. */
main .section.blog-filters,
main .section.product-filters {
  margin: 0;
  padding: 1.5rem 0;
  background-color: var(--l2v-pink);
}

main .section.product-filters {
  background-color: var(--background-color);
}

main .section.blog-filters .default-content-wrapper > p,
main .section.product-filters .default-content-wrapper > p,
main .section.blog-filters .default-content-wrapper > .prosemirror-editor p,
main .section.product-filters .default-content-wrapper > .prosemirror-editor p {
  margin: 0 0 0.75rem;
  font-family: var(--body-font-family);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--l2v-ink);
}

/* the row bleeds to the screen edges so a cut-off chip hints at the scroll */
main .section.blog-filters ul,
main .section.product-filters ul {
  display: flex;
  gap: 0.5rem;
  margin: 0 -1.5rem;
  padding: 0.125rem 1.5rem;
  overflow-x: auto;
  list-style: none;
  scroll-padding-inline: 1.5rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

main .section.blog-filters ul::-webkit-scrollbar,
main .section.product-filters ul::-webkit-scrollbar {
  display: none;
}

main .section.blog-filters li,
main .section.product-filters li {
  flex: none;
  margin: 0;
  scroll-snap-align: start;
}

main .section.blog-filters li a,
main .section.product-filters li a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.25rem 1.125rem;
  border: 0.0625rem solid var(--l2v-ink);
  border-radius: 999px;
  background-color: var(--background-color);
  color: var(--l2v-ink);
  font-family: var(--body-font-family);
  font-size: 0.9375rem;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* current category, and hover: filled chip */
main .section.blog-filters li a:hover,
main .section.product-filters li a:hover,
main .section.blog-filters li a[aria-current='page'],
main .section.product-filters li a[aria-current='page'] {
  background-color: var(--l2v-ink);
  color: #fff;
  text-decoration: none;
}

@media (width >= 56.25rem) {
  main .section.blog-filters .default-content-wrapper,
  main .section.product-filters .default-content-wrapper {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
  }

  main .section.blog-filters .default-content-wrapper > p,
  main .section.product-filters .default-content-wrapper > p {
    flex: none;
    margin: 0;
  }

  main .section.blog-filters ul,
  main .section.product-filters ul {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}

/* Manifesto — the "who are we" statement runs in the display face, uppercase and
   oversized, with script connectors between the phrases. */
main .section.manifesto .default-content-wrapper > p:not(.button-wrapper),
main .section.manifesto .prosemirror-editor:not(.button-wrapper) p {
  font-family: var(--body-font-family);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.25;
  text-transform: uppercase;
}

/* template ingredient — fiche ingrédient (visuel détouré + prose centrée) */
body.ingredient main .default-content-wrapper {
  max-width: 45rem;
  margin: 0 auto;
}

body.ingredient main .default-content-wrapper > p:first-child img,
body.ingredient main .default-content-wrapper > .prosemirror-editor:first-child img {
  display: block;
  width: min(17.5rem, 70%);
  height: auto;
  margin: 0 auto;
}

body.ingredient main .default-content-wrapper > h1,
body.ingredient main .default-content-wrapper > .prosemirror-editor h1 {
  text-align: center;
}

body.ingredient main .default-content-wrapper > h1 + p > em,
body.ingredient main .default-content-wrapper
  > .prosemirror-editor:has(h1) + .prosemirror-editor em {
  display: block;
  text-align: center;
  color: var(--dark-color);
  font-style: normal;
}

/* Product intro — the presentation band under the product hero, mirroring
   .produit-title + .produit-intro on les2vaches.com. The baseline is a plain h2
   in the script face, coloured by the page; the prose below it is centred in the
   display face.
   Measured on the source: weight 500, 1100px container, 70px top margin (38px on
   mobile). */
main .section.product-intro,
main .section.hero-container + .section.product-intro {
  margin-top: 2.375rem;
  text-align: center;
}

main .section.product-intro .default-content-wrapper {
  max-width: 68.75rem;
  margin-inline: auto;
}

main .section.product-intro .default-content-wrapper > p:not(.button-wrapper),
main .section.product-intro .prosemirror-editor:not(.button-wrapper) p {
  margin: 0 0 1rem;
  font-family: var(--body-font-family);
  font-weight: 500;
}

/* The baseline is a plain h2: the script face in the product's own colour, with
   <strong> switching to the display face for the words the source sets in caps.
   Colour comes from the page (body.produit-*), so the heading carries no variant. */
main .section.product-intro .default-content-wrapper > h2,
main .section.product-intro .default-content-wrapper > .prosemirror-editor h2 {
  margin: 0 0 0.5rem;
  font-family: var(--accent-font-family);
  font-weight: 400;
  line-height: 1.1;
  color: var(--l2v-product-text-color, var(--l2v-product-color, var(--l2v-ink)));
}

main .section.product-intro .default-content-wrapper > h2 strong,
main .section.product-intro .default-content-wrapper > .prosemirror-editor h2 strong {
  font-family: var(--heading-font-family);
  font-weight: 500;
}

@media (width >= 56.25rem) {
  main .section.product-intro,
  main .section.hero-container + .section.product-intro {
    margin-top: 4.375rem;
  }
}

/* Page title on pages that have no hero (static pages, listings): the source site
   wraps it in a centred `.header-title` band. Templated pages (produit, blog) carry
   their h1 inside the hero block instead, so this never double-applies. */
main .section:first-child .default-content-wrapper > h1:first-child,
main .section:first-child .default-content-wrapper > .prosemirror-editor:first-child h1 {
  margin-top: 0;

  /* room for the burger logo, which overlays the page below 992px */
  padding: 6.5rem 0.625rem 1.875rem;
  text-align: center;
}

@media (width >= 992px) {
  main .section:first-child .default-content-wrapper > h1:first-child,
  main .section:first-child .default-content-wrapper > .prosemirror-editor:first-child h1 {
    padding-top: 1.875rem;
  }
}

/* body CTAs sit centred under their section content (hero keeps its own layout) */
main .section:not(.hero-container) .button-wrapper {
  text-align: center;
}

/* hero crimson band flows straight into the next section */
main .section.hero-container + .section {
  margin-top: 0;
}

.section.text-center {
  text-align: center;
}

.section.font-highlight {
  font-family: var(--heading-font-family);
}

/* Product page, Alpro-style (section style `product-detail`): a product header with
   the picture on the left and, on the right, a centred column holding title, text
   and the accordion. scripts.js splits the section into
   .product-detail-media and .product-detail-body; stacked below 900px. */
main .section.product-detail {
  box-sizing: border-box;
  max-width: 90rem;
  margin: 0 auto;

  /* room for the burger logo, which overlays the page below 992px */
  padding: 6.5rem 1rem 3.5rem;
}

main .section.product-detail > .product-detail-media,
main .section.product-detail > .product-detail-body {
  max-width: none;
  margin: 0;
  padding: 0;
}

main .section.product-detail .product-detail-body > div {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.product-detail .product-detail-media p {
  margin: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.product-detail .product-detail-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
}

main .section.product-detail .product-detail-body {
  width: min(100%, 36rem);
  margin-inline: auto;
  text-align: center;
}

/* also beats the centred first-section title band (h1 becomes :first-child once
   the picture is moved out) */
/* stylelint-disable-next-line no-descending-specificity */
main .section.product-detail .product-detail-body .default-content-wrapper > h1 {
  margin: 1.5rem 0 1.25rem;
  padding: 0;
  color: var(--l2v-product-text-color, var(--l2v-product-color, var(--l2v-ink)));
  font-size: var(--heading-font-size-xxl);
  line-height: 1.02;
  text-align: center;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.product-detail .default-content-wrapper > p {
  margin: 0 0 1rem;
}

/* accordion: flat rows separated by rules instead of the pink bands */
main .section.product-detail .accordion {
  text-align: left;
}

main .section.product-detail .accordion details {
  border: 0;
  border-bottom: 0.0625rem solid rgb(0 0 0 / 15%);
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

main .section.product-detail .accordion details + details {
  margin-top: 0;
}

main .section.product-detail .accordion details:first-of-type {
  border-top: 0.0625rem solid rgb(0 0 0 / 15%);
}

main .section.product-detail .accordion summary {
  padding: 0.875rem 3rem 0.875rem 0;
  line-height: 1.2;
  text-transform: uppercase;
}

main .section.product-detail .accordion summary:hover {
  color: var(--l2v-product-text-color, var(--l2v-product-color, var(--l2v-ink)));
}

main .section.product-detail .accordion summary::after {
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
}

main .section.product-detail .accordion .accordion-item-body {
  padding: 0 0 1rem;
  font-size: var(--body-font-size-s);
  line-height: 1.5;
}

main .section.product-detail .accordion .accordion-item-body td {
  padding: 0.375rem 0;
}

main .section.product-detail .accordion .accordion-item-body p,
main .section.product-detail .accordion .accordion-item-body ul {
  margin: 0 0 0.5rem;
}

@media (width >= 56.25rem) {
  main .section.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    padding: 3.5rem 2rem 5rem;
  }

  /* picture centred in its half, and kept in view while the accordion opens */
  main .section.product-detail > .product-detail-media {
    position: sticky;
    top: calc(var(--header-height, 0px) + 2rem);
    justify-self: center;
    width: min(100%, 34rem);
  }

  /* stylelint-disable-next-line no-descending-specificity */
  main .section.product-detail .product-detail-body .default-content-wrapper > h1 {
    margin-top: 0;
  }
}

/* Recipe page, Alpro-style (section style `recipe-detail`): portrait picture on the
   left, and on the right tags, title, intro, times, ingredients, numbered steps and
   tips. Same split as product-detail (scripts.js: .recipe-detail-media /
   .recipe-detail-body); stacked below 900px. Accent colour = the page's product
   colour when a `theme` is set, crimson otherwise. */
main .section.recipe-detail {
  --recipe-accent: var(--l2v-product-color, var(--l2v-crimson));

  /* stacked: the gap keeps the title off the picture, with or without tags above it */
  display: grid;
  gap: 1.5rem;
  box-sizing: border-box;
  max-width: 90rem;
  margin: 0 auto;

  /* room for the burger logo, which overlays the page below 992px */
  padding: 6.5rem 1rem 3.5rem;
}

main .section.recipe-detail > .recipe-detail-media,
main .section.recipe-detail > .recipe-detail-body,
main .section.recipe-detail .recipe-detail-body > div {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .recipe-detail-media p {
  margin: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .recipe-detail-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 1.5rem;
}

main .section.recipe-detail .recipe-detail-body {
  text-align: left;
}

/* categories: pills built from the page's tags (scripts.js), right above the title;
   the empty list already holds its line while the category sheet loads */
/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail ul.recipe-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 1.75rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

main .section.recipe-detail ul.recipe-categories a {
  display: block;
  padding: 0.15rem 0.75rem;
  background: var(--l2v-pink-light);
  color: var(--l2v-ink);
  font-family: var(--body-font-family);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-decoration: none;
  text-transform: uppercase;
}

@media (hover: hover) {
  main .section.recipe-detail ul.recipe-categories a:hover {
    text-decoration: underline;
  }
}

/* also beats the centred first-section title band */
/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .recipe-detail-body .default-content-wrapper > h1 {
  margin: 0 0 1rem;
  padding: 0;
  color: var(--recipe-accent);
  font-size: var(--heading-font-size-xxl);
  line-height: 1.02;
  text-align: left;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .default-content-wrapper > p {
  margin: 0 0 1rem;
  line-height: 1.6;
}

/* times / servings, authored as a paragraph in italics */
main .section.recipe-detail .default-content-wrapper > p:has(> em:only-child) {
  font-family: var(--body-font-family);
  text-transform: uppercase;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .default-content-wrapper > p > em:only-child {
  font-style: normal;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .default-content-wrapper > h2 {
  margin: 2.5rem 0 1.25rem;
  color: var(--l2v-ink);
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .default-content-wrapper > h3 {
  margin: 1.75rem 0 0.75rem;
  color: var(--l2v-ink);
}

/* ingredients: short accent dash instead of bullets */
/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .default-content-wrapper > h2 + ul {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

main .section.recipe-detail .default-content-wrapper > h2 + ul li {
  position: relative;
  margin-bottom: 0.75rem;
  padding-left: 1.75rem;
  line-height: 1.5;
}

main .section.recipe-detail .default-content-wrapper > h2 + ul li::before {
  content: '';
  position: absolute;
  top: 0.75em;
  left: 0;
  width: 1rem;
  height: 0.125rem;
  background: var(--recipe-accent);
}

/* steps: numbered accent circles */
main .section.recipe-detail .default-content-wrapper > ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: recipe-step;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .default-content-wrapper > ol li {
  position: relative;
  min-height: 2.5rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem 0 0 3.5rem;
  line-height: 1.5;
  counter-increment: recipe-step;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.recipe-detail .default-content-wrapper > ol li::before {
  content: counter(recipe-step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--recipe-accent);
  color: #fff;
  font-family: var(--body-font-family);
  font-size: 1.25rem;
}

@media (width >= 56.25rem) {
  main .section.recipe-detail {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 3vw, 3rem);
    align-items: start;
    padding: 3.5rem 2rem 5rem;
  }

  /* the picture stays in view while the steps scroll */
  main .section.recipe-detail > .recipe-detail-media {
    position: sticky;
    top: calc(var(--header-height, 0px) + 2rem);
  }
}

/* =========================================================
   ARTICLE LAYOUT (section styles `article-hero`, `quote`, `media-text`, `cream`)
   Long-form article pages: a two-column opening, pull quotes on a cream band and
   alternating text/picture sections — see blog/actualite pages.
   ========================================================= */

/* cream band, like `pink` / `light-blue` above */
main .section.cream {
  margin: 0;
  padding: 3.5rem 0;
  background-color: var(--l2v-cream);
}

/* ---- Opening: eyebrow, title left, standfirst right, full-bleed picture ---- */
main .section.article-hero {
  margin: 0 auto;
  padding: 6.5rem 1rem 2.5rem; /* room for the burger logo below 992px */
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-hero .default-content-wrapper > p:first-child {
  margin: 0 0 1.5rem;
  color: var(--dark-color);
  font-family: var(--heading-font-family);
  font-size: var(--body-font-size-s);
  text-transform: uppercase;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-hero .default-content-wrapper > h1 {
  margin: 0 0 1.5rem;
  padding: 0;
  color: var(--l2v-crimson);
  font-size: var(--heading-font-size-xxl);
  line-height: 1.05;
  text-align: left;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-hero .default-content-wrapper > p:not(:first-child) {
  margin: 0 0 1rem;
  line-height: 1.6;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-hero .default-content-wrapper > p:has(picture) {
  margin: 2rem 0 0;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-hero .default-content-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 1.5rem;
}

/* ---- Pull quote ---- */
main .section.quote .default-content-wrapper {
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.quote .default-content-wrapper > p {
  margin: 0 0 0.75rem;
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  line-height: 1.35;
}

main .section.quote .default-content-wrapper > p:first-child::before {
  content: '“';
  margin-right: 0.15em;
  color: var(--l2v-crimson);
}

main .section.quote .default-content-wrapper > p:first-child::after {
  content: '”';
  margin-left: 0.15em;
  color: var(--l2v-crimson);
}

/* attribution: the closing italic line */
main .section.quote .default-content-wrapper > p:last-child:has(> em:only-child) {
  color: var(--dark-color);
  font-family: var(--heading-font-family);
  font-size: var(--body-font-size-s);
  text-transform: uppercase;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.quote .default-content-wrapper > p > em:only-child {
  font-style: normal;
}

/* ---- Plain text section, kept to a readable column ---- */
main .section.article-body .default-content-wrapper {
  max-width: 52rem;
  margin-inline: auto;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-body .default-content-wrapper > h2 {
  margin: 0 0 1rem;
  line-height: 1.1;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-body .default-content-wrapper > h3 {
  margin: 1.5rem 0 0.75rem;
  line-height: 1.15;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.article-body .default-content-wrapper > p {
  margin: 0 0 1rem;
  line-height: 1.6;
}

/* ---- Alternating text / picture ---- */
main .section.media-text {
  box-sizing: border-box;
  max-width: 90rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

main .section.media-text > .media-text-media,
main .section.media-text > .media-text-body,
main .section.media-text .media-text-body > div {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.media-text .media-text-media p {
  margin: 0;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.media-text .media-text-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1.5rem;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.media-text .media-text-body > div > h2 {
  margin: 0 0 1rem;
  line-height: 1.1;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.media-text .media-text-body > div > h3 {
  margin: 1.5rem 0 0.75rem;
  line-height: 1.15;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.media-text .media-text-body p {
  margin: 0 0 1rem;
  line-height: 1.6;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.media-text .media-text-body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

/* stylelint-disable-next-line no-descending-specificity */
main .section.media-text .media-text-body li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

@media (width >= 56.25rem) {
  main .section.article-hero {
    max-width: 90rem;
    padding: 3.5rem 2rem 3rem;
  }

  main .section.article-hero .default-content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
  }

  /* stylelint-disable-next-line no-descending-specificity */
  main .section.article-hero .default-content-wrapper > p:is(:first-child, :has(picture)) {
    grid-column: 1 / -1;
  }

  main .section.article-hero .default-content-wrapper > h1 {
    grid-column: 1;
    margin-bottom: 0;
  }

  main .section.article-hero .default-content-wrapper > p:not(:first-child, :has(picture)) {
    grid-column: 2;
  }

  main .section.media-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
    padding: 4rem 2rem;
  }

  /* `media-text reverse`: picture on the right, text on the left */
  main .section.media-text.reverse > .media-text-media {
    order: 2;
  }
}
