/* La Pierre et la Plume: the book page, as rich as a Big Bike Tours tour page.
   The body is written in LaFactory Blocks; this sheet gives those blocks the
   site's palette (through their --lfb-* variables) and the book page layout:
   sticky section bar, sections, slideshows, chalk figures, press, schools,
   technical sheet. Loaded on product pages and in the editor. */

:root {
  --lfb-font: var(--lpp-body);
  --lfb-ink: var(--lpp-ink);
  --lfb-text: var(--lpp-ink-2);
  --lfb-text-strong: var(--lpp-ink);
  --lfb-muted: var(--lpp-muted);
  --lfb-subtle: var(--lpp-muted);
  --lfb-faint: var(--lpp-line);
  --lfb-accent: var(--lpp-forest);
  --lfb-accent-strong: var(--lpp-leaf);
  --lfb-accent-soft: var(--lpp-paper-2);
  --lfb-on-accent: var(--lpp-chalk);
  --lfb-dark: var(--lpp-forest);
  --lfb-on-dark: var(--lpp-chalk);
  --lfb-surface: var(--lpp-white);
  --lfb-surface-soft: var(--lpp-paper-2);
  --lfb-surface-hover: var(--lpp-paper);
  --lfb-border: var(--lpp-line);
  --lfb-border-strong: var(--lpp-shelf-2);
  --lfb-success: var(--lpp-leaf);
  --lfb-shadow: rgba(13, 40, 23, 0.14);
  --lfb-radius: 8px;
}

:is(.lpp, .editor-styles-wrapper) :is(.lfb-card__title, .lfb-callout__title, .lfb-band__title, .lfb-title, .lfb-h1) {
  font-family: var(--lpp-display);
  font-weight: 400;
}

/* ---------- Sections ---------- */
.lpp-rich { display: flex; flex-direction: column; }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section {
  padding-block: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--lpp-line);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.lpp-rich > .lpp-book-section:first-child { border-top: 0; }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section h2,
.lpp-specs > h2 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  margin: 0;
  color: var(--lpp-ink);
}
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section h3 {
  font-size: 1.45rem;
  margin: 0 0 14px;
  color: var(--lpp-forest);
}
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section p { margin: 0; }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--soft,
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press {
  border-top: 0;
  border-radius: 12px;
  padding-inline: clamp(22px, 4vw, 52px);
  margin-block: 12px;
}
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--soft { background: var(--lpp-white); }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press { background: var(--lpp-forest); color: var(--lpp-chalk); }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press h2 { color: var(--lpp-chalk); }
:is(.lpp-rich, .editor-styles-wrapper) p.is-style-lfb-prose-lead {
  font-family: var(--lpp-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.4;
  color: var(--lpp-ink);
  max-width: 40em;
}
:is(.lpp-rich, .editor-styles-wrapper) p.lpp-tagline {
  font-family: var(--lpp-display);
  font-size: 1.45rem;
  color: var(--lpp-forest);
}

/* ---------- The book: text and a picture of the inside ---------- */
:is(.lpp-rich, .editor-styles-wrapper) .lfb-split {
  max-width: none;
  padding: 0;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
}
:is(.lpp-rich, .editor-styles-wrapper) .lfb-split > div {
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--lpp-ink-2);
  font-size: 1.06rem;
}
:is(.lpp-rich, .editor-styles-wrapper) .lfb-split__img {
  aspect-ratio: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 40px -22px rgba(13, 40, 23, 0.45);
}
@media (max-width: 860px) {
  :is(.lpp-rich, .editor-styles-wrapper) .lfb-split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Key figures: chalk on a market slate ---------- */
:is(.lpp-rich, .editor-styles-wrapper) .lfb-stats {
  background: var(--lpp-slate);
  border: 3px solid var(--lpp-wood);
  border-radius: 10px;
  margin-block: 8px 12px;
  box-shadow: 0 8px 18px -10px rgba(23, 35, 27, 0.4);
}
:is(.lpp-rich, .editor-styles-wrapper) .lfb-stats__grid {
  max-width: none;
  padding: 26px clamp(18px, 3vw, 36px);
  gap: 18px;
  text-align: center;
}
:is(.lpp-rich, .editor-styles-wrapper) .lfb-stat__num {
  font-family: var(--lpp-hand);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  line-height: 1;
  color: var(--lpp-chalk);
}
:is(.lpp-rich, .editor-styles-wrapper) .lfb-stat__label {
  color: var(--lpp-chalk-2);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
@media (max-width: 640px) {
  :is(.lpp-rich, .editor-styles-wrapper) .lfb-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Slideshows ---------- */
:is(.lpp-rich, .editor-styles-wrapper) .lfb-slideshow--contain .lfb-slider__stage > figure img {
  background: var(--lpp-paper-2);
  padding: clamp(8px, 2vw, 22px);
  box-sizing: border-box;
}
.lpp-rich .lfb-slideshow .lfb-slider__stage > figure figcaption { font-size: 0.9rem; color: var(--lpp-muted); }
.lpp .lfb-slider__arrow { border-color: var(--lpp-forest); color: var(--lpp-forest); }
.lpp .lfb-slider__arrow:hover:not(:disabled) { background: var(--lpp-forest); color: var(--lpp-chalk); }
.lpp .lfb-slider__dot.is-active { background: var(--lpp-sun-2); }

/* ---------- Along the pages: the chalk list, a core list block ---------- */
:is(.lpp-rich, .editor-styles-wrapper) ul.lpp-chalk {
  list-style: none;
  margin: 0;
  padding: 24px 28px;
  background: var(--lpp-forest);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}
:is(.lpp-rich, .editor-styles-wrapper) ul.lpp-chalk li {
  font-family: var(--lpp-hand);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--lpp-chalk);
  padding-block: 5px;
  border-bottom: 1px dashed rgba(244, 242, 234, 0.25);
  margin: 0;
}
:is(.lpp-rich, .editor-styles-wrapper) ul.lpp-chalk li::first-letter { text-transform: uppercase; }
:is(.lpp-rich, .editor-styles-wrapper) ul.lpp-chalk li:last-child { border-bottom: 0; }
:is(.lpp-rich, .editor-styles-wrapper) .wp-block-columns { gap: clamp(24px, 4vw, 56px); margin: 0; }
:is(.lpp-rich, .editor-styles-wrapper) .lfb-checks { margin: 0; }
:is(.lpp-rich, .editor-styles-wrapper) .lfb-check { font-size: 1.02rem; line-height: 1.5; color: var(--lpp-ink-2); }
:is(.lpp-rich, .editor-styles-wrapper) .lfb-check span:first-child {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lpp-sun);
  color: var(--lpp-forest-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* ---------- The press: quotes in the serif, chalk on green ---------- */
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press .lfb-cards { gap: 20px; }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press .lfb-card {
  background: rgba(244, 242, 234, 0.06);
  border: 1px solid rgba(244, 242, 234, 0.18);
  border-radius: 10px;
  padding: 26px 26px 22px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 16px;
}
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press .lfb-card__text {
  font-family: var(--lpp-display);
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--lpp-chalk);
}
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press .lfb-card__text::before { content: "«\00a0"; color: var(--lpp-sun); }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press .lfb-card__text::after { content: "\00a0»"; color: var(--lpp-sun); }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--press .lfb-card__title {
  font-family: var(--lpp-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lpp-sun);
  margin: 0;
}
@media (max-width: 900px) {
  :is(.lpp-rich, .editor-styles-wrapper) .lfb-cards { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Schools: the callout as a mirabelle panel ---------- */
:is(.lpp-rich, .editor-styles-wrapper) .lfb-callout {
  background: var(--lpp-sun);
  border: 0;
  border-radius: 12px;
  padding: clamp(22px, 3vw, 34px);
  flex-wrap: wrap;
}
:is(.lpp-rich, .editor-styles-wrapper) .lfb-callout__title { font-size: 1.6rem; color: var(--lpp-forest-2); }
:is(.lpp-rich, .editor-styles-wrapper) .lfb-callout__sub { font-size: 1.02rem; color: var(--lpp-forest-2); max-width: 44em; margin-top: 6px; }
.lpp .lfb-callout a.lfb-btn {
  background: var(--lpp-forest);
  color: var(--lpp-chalk);
  border-radius: 999px;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  padding: 0 26px;
}
.lpp .lfb-callout a.lfb-btn:hover { background: var(--lpp-forest-2); color: var(--lpp-chalk); }

/* ---------- "+N" thumbnail, to the slideshow ---------- */
.lpp a.lpp-thumb--more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--lpp-hand);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--lpp-forest);
  text-decoration: none;
  opacity: 1;
}
.lpp a.lpp-thumb--more:hover { background: var(--lpp-sun); color: var(--lpp-forest-2); }

/* Kadence wraps every group's children in .wp-block-group__inner-container; on
   the pages a site rule takes it out of the layout, here (product body, outside
   .entry-content) it would swallow the section's gap. */
.lpp-rich .wp-block-group__inner-container { display: contents; }

/* The lead of "Le livre" is a long paragraph: the sans at a reading size, not the display serif. */
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section p.is-style-lfb-prose-lead {
  font-family: var(--lpp-body);
  font-size: clamp(1.12rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  font-weight: 500;
  color: var(--lpp-ink);
}

@media (max-width: 640px) {
  :is(.lpp-rich, .editor-styles-wrapper) .lfb-callout__title { font-size: 1.3rem; }
}

/* As many columns as the book has figures (three for most, five for Terres de France). */
:is(.lpp-rich, .editor-styles-wrapper) .lfb-stats__grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ---------- Page layout (LaFactory Blocks content and sticky column) ---------- */
.lpp .lfb-sticky { gap: clamp(32px, 4vw, 56px); margin-top: 8px; }
/* Under the sticky header (its height is measured by LaFactory Blocks into --lfb-sticky-top). */
.lpp .lfb-sticky__side.is-sticky { top: calc(var(--lfb-sticky-top, 0px) + 18px); }
/* Anchors land under the sticky header and the section bar (58 px). */
html { scroll-padding-top: calc(var(--lfb-sticky-top, 0px) + 76px); }

/* Book head: title and the book on its stage, first in the main column */
.lpp-bookhead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.lpp-bookhead > *, .lpp-bookhead > .wp-block-group__inner-container > * { margin: 0 !important; }
.lpp .lpp-bookhead__title { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.04; margin: 0; }
.lpp-bookhead__sub { font-family: var(--lpp-display); font-size: 1.35rem; color: var(--lpp-ink-2); line-height: 1.25; }
.lpp-rich .lpp-gallery { margin-bottom: 30px; }
.lpp-rich .lpp-gallery__stage { aspect-ratio: 16 / 10; }
.lpp-rich .lpp-gallery__cover { width: min(34%, 260px); }
@media (max-width: 640px) {
  .lpp-rich .lpp-gallery__stage { aspect-ratio: 1 / 1; }
  .lpp-rich .lpp-gallery__cover { width: min(56%, 260px); }
}

/* Section bar (LaFactory Blocks) */
.lpp .lfb-secnav {
  background: rgba(246, 247, 241, 0.96);
  backdrop-filter: blur(6px);
  border-color: var(--lpp-line);
  margin-inline: -4px;
}
.lpp .lfb-secnav__links a { font-size: 0.92rem; color: var(--lpp-ink-2); min-height: 56px; }
.lpp .lfb-secnav__links a:hover { color: var(--lpp-ink); }
.lpp .lfb-secnav__links a.is-current { color: var(--lpp-forest); border-bottom-color: var(--lpp-sun); }

/* Buy card (LaFactory Blocks), in the site's colours: forest card, slate price, mirabelle button */
.lpp .lfb-buy { background: var(--lpp-forest); color: var(--lpp-chalk); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(13, 40, 23, 0.5); }
.lpp .lfb-buy__head { gap: 16px; padding: 26px 26px 22px; border-bottom-color: rgba(244, 242, 234, 0.16); }
.lpp .lfb-buy__name { font-family: var(--lpp-display); font-weight: 400; font-size: 1.45rem; line-height: 1.15; }
.lpp .lfb-buy__head .lpp-slate { align-self: flex-start; }
.lpp .lfb-buy__body { padding: 20px 26px 26px; gap: 16px; }
.lpp .lfb-buy__stock { color: var(--lpp-chalk); }
.lpp .lfb-buy__stock::before { background: var(--lpp-sun); }
.lpp .lfb-buy__stock.is-out::before { background: var(--lpp-chalk-2); }
.lpp .lfb-buy__excerpt p { color: var(--lpp-chalk-2); opacity: 1; font-size: 0.95rem; }
.lpp .lfb-buy__form form.cart { flex-direction: column; align-items: stretch; gap: 12px; }
.lpp .lfb-buy__form form.cart .quantity { align-self: flex-start; }
.lpp .lfb-buy__form .single_add_to_cart_button.button { flex: none; width: 100%; white-space: nowrap; }
.lpp .lfb-buy__form .quantity { height: 54px; border-color: rgba(244, 242, 234, 0.3); background: rgba(244, 242, 234, 0.08); }
.lpp .lfb-buy__form .quantity input.qty { color: var(--lpp-chalk); width: 36px; min-height: 0; border-radius: 0; }
.lpp .lfb-buy__form .quantity .lpp-step { color: var(--lpp-chalk); }
.lpp .lfb-buy__form .quantity .lpp-step:hover { background: rgba(244, 242, 234, 0.12); color: var(--lpp-chalk); }
.lpp .lfb-buy__form .single_add_to_cart_button.button.alt { background: var(--lpp-sun) !important; color: var(--lpp-forest-2) !important; border-radius: 999px; }
.lpp .lfb-buy__form .single_add_to_cart_button.button.alt:hover { background: #F6CD6A !important; }
.lpp .lfb-buy__form .single_add_to_cart_button::after { background-color: var(--lpp-forest) !important; background-image: var(--lpp-ico-bag-sun, none); }
.lpp .lfb-buy .lpp-press { border-top-color: rgba(244, 242, 234, 0.16); }
.lpp .lfb-buy .lpp-press p { color: var(--lpp-chalk); font-size: 1.1rem; }
.lpp .lfb-buy .lpp-press p::before, .lpp .lfb-buy .lpp-press p::after { color: var(--lpp-sun); }
.lpp .lfb-buy .lpp-press .lpp-eyebrow { color: var(--lpp-sun); }
.lpp .lfb-buy .lpp-meta dt { color: var(--lpp-chalk-2); }
.lpp .lfb-buy .lpp-meta dd, .lpp .lfb-buy .lpp-meta a { color: var(--lpp-chalk); }
.lpp .lfb-buy .wc-stripe-express-checkout-element, .lpp .lfb-buy #wc-stripe-express-checkout-element { margin-top: 4px; }

/* Buy bar on phones and tablets */
.lpp .lfb-buybar { background: var(--lpp-forest-2); color: var(--lpp-chalk); padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.lpp .lfb-buybar__name { font-family: var(--lpp-display); font-size: 0.9rem; color: var(--lpp-chalk-2); opacity: 1; }
.lpp .lfb-buybar .lpp-slate { font-size: 1.35rem; padding: 0 10px 2px; border-width: 2px; margin-top: 4px; }
.lpp .lfb-buybar a.lfb-buybar__btn { background: var(--lpp-sun); color: var(--lpp-forest-2); border-radius: 999px; min-height: 48px; display: inline-flex; align-items: center; padding: 0 22px; font-weight: 700; }
.lpp .lfb-buybar a.lfb-buybar__btn.added { background: var(--lpp-leaf); color: #fff; }
@media (max-width: 1024px) { body.lpp.lfb-has-buybar .lpp-toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }

/* Technical sheet (LaFactory Blocks product details) */
.lpp .lfb-specs { gap: 24px; }
.lpp .lfb-specs__title { font-size: clamp(2rem, 4.2vw, 3rem); color: var(--lpp-ink); }
.lpp .lfb-specs .lfb-table { max-width: 760px; }
.lpp .lfb-specs .lfb-table th,
.lpp .lfb-specs .lfb-table td {
  border: 0;
  border-bottom: 1px solid var(--lpp-line);
  background: none;
  padding: 14px 0;
  font-size: 1rem;
  text-align: left;
  vertical-align: top;
}
.lpp .lfb-specs .lfb-table th { width: 200px; padding-right: 20px; font-weight: 600; color: var(--lpp-ink); }
.lpp .lfb-specs .lfb-table tr:last-child :is(th, td) { border-bottom: 0; }

/* Newsletter (LaFactory Blocks) in the footer, the mockup's pill field */
.lpp-footer .lfb-newsletter { gap: 9px; }
.lpp-footer .lfb-newsletter__label { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lpp-sun); font-weight: 600; }
.lpp-footer .lfb-newsletter__intro { color: var(--lpp-chalk-2); font-size: 0.92rem; }
.lpp-footer .lfb-newsletter__row { gap: 6px; background: rgba(244, 242, 234, 0.08); border-radius: 999px; padding: 5px; }
.lpp-footer .lfb-newsletter__row input { min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--lpp-chalk); }
.lpp-footer .lfb-newsletter__row input::placeholder { color: #A7B1A6; }
.lpp-footer .lfb-newsletter__btn { min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--lpp-sun); color: var(--lpp-forest-2); font-weight: 700; font-family: var(--lpp-body); }
.lpp-footer .lfb-newsletter__btn:hover { background: #F6CD6A; color: var(--lpp-forest-2); }
.lpp-footer .lfb-newsletter__msg { color: var(--lpp-chalk); font-size: 0.9rem; }

:root { --lpp-ico-bag-sun: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23F2C14E%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M5 8h14l-1.2 12H6.2L5 8z%27/%3E%3Cpath d=%27M9 8V6a3 3 0 0 1 6 0v2%27/%3E%3C/svg%3E"); }
.lpp .lfb-buy__form .single_add_to_cart_button::after { background-size: 18px; background-position: center; background-repeat: no-repeat; }

/* Extract of a book: the speciality box next to the text */
:is(.lpp-rich, .editor-styles-wrapper) .lpp-aside { background: var(--lpp-white); border-left: 4px solid var(--lpp-sun); border-radius: 8px; padding: 22px 26px; display: flex; flex-direction: column; gap: 10px; max-width: 46em; }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-aside p { color: var(--lpp-ink-2); }

/* "Le livre": more room for the text than for the picture, in the main column */
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section .lfb-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
/* Extract: the spread at full width above its text */
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--extract .lfb-split { grid-template-columns: minmax(0, 1fr); }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--extract .lfb-split__img { order: -1; }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section--extract h3 { margin: -10px 0 0; }
@media (max-width: 860px) { :is(.lpp-rich, .editor-styles-wrapper) .lpp-book-section .lfb-split { grid-template-columns: minmax(0, 1fr); } }

/* Footer sign-up between 861 and 1279 px: the column is about 220 px, too narrow for the field
   and the button side by side ("Votre e-mail" was cut to "Votre e-m"). Field over button. */
@media (min-width: 861px) and (max-width: 1279px) {
  .lpp-footer .lfb-newsletter__row { flex-direction: column; align-items: stretch; border-radius: 26px; }
  .lpp-footer .lfb-newsletter__row input { padding-inline: 16px; }
  .lpp-footer .lfb-newsletter__btn { justify-content: center; }
}

/* Book head: a bound field left empty (no subtitle) takes no room. */
:is(.lpp-rich, .editor-styles-wrapper) .lpp-bookhead p:empty { display: none; }
:is(.lpp-rich, .editor-styles-wrapper) .lpp-bookhead .wp-block-post-terms a { color: inherit; text-decoration: none; }

/* Editor canvas: the head of a book page and "Vous aimerez aussi" sit at the left, as on the site
   (WordPress centres every block there with auto side margins). */
.editor-styles-wrapper :is(.lpp-bookhead, .lpp-related) .wp-block { margin-left: 0 !important; margin-right: 0 !important; max-width: none; }

/* A book without an author line (empty bound field) leaves no gap in its head. */
.lpp-bookhead p:empty { display: none; }
