/* ==========================================================================
   Jeanne Arte — blocks.css · the content blocks (js/blocks.js), La Carte
   Used by journal articles (blog.html) and the shop pages (store/product).
   Every block is set with the system's type only: Spectral at reading size,
   tracked capitals for labels, italics for asides, hairlines and lozenges.
   Colours come from the tokens in css/site.css — none are written here.
   ========================================================================== */

/* ---------------------------------------------------------------- flow */
.blocks { text-align: left; }
.blocks > .blk + .blk { margin-top: var(--s5); }
.blocks > .blk-space + .blk,
.blocks > .blk + .blk-space { margin-top: 0; }

/* A page may set the whole article in .prose (css/site.css). Its link,
   blockquote and list rules must not reach the blocks' own buttons, quotes and
   lists, hence the .blocks prefix on the rules below that could collide. */
.blocks .btn { color: var(--text-strong); text-decoration: none; }
.blocks .btn--fill,
.blocks .btn--fill:hover { color: var(--btn-text); }
.blocks .blk-quote blockquote,
.blocks .blk-testi blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
}

/* the heading of a list, a FAQ, a gallery, the reviews — the size of a
   « ## » heading in a text block, so an article reads as one hierarchy */
.blk__title {
  font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem);
  line-height: 1.2;
  color: var(--text-strong);
}
.blk__title + * { margin-top: var(--s2); }

/* ---------------------------------------------------------------- hero (journal) */
.blk-hero { text-align: center; }
.blk-hero__title {
  font-size: var(--fs-h2);
  line-height: 1.12;
  letter-spacing: -.005em;
}
.blk-hero__sub { max-width: 30em; margin: var(--s2) auto 0; }
.blk-hero__note { margin-top: var(--s1); font-size: var(--fs-small); }

/* ---------------------------------------------------------------- bullet list
   Lozenges, as in the carte's benefits and the .prose lists. */
.blk-list__intro {
  margin-top: var(--s1);
  font-style: italic;
  color: var(--text-muted);
}
.blk-list .blk-list__items { margin-top: var(--s2); padding-left: 0; }
.blk-list .blk-list__items > li {
  position: relative;
  padding-left: 1.3em;
  line-height: 1.5;
}
.blk-list .blk-list__items > li + li { margin-top: .5em; }
.blk-list .blk-list__items > li::before {
  content: '';
  position: absolute;
  left: .25em;
  top: .62em;
  width: 6px;
  height: 6px;
  background: var(--ornament);
  transform: rotate(45deg);
}
.blk-list > .blk-list__items:first-child { margin-top: 0; }

/* ---------------------------------------------------------------- quote: the motto */
.blk-quote {
  margin-inline: auto;
  max-width: 18em;
  text-align: center;
}
.blk-quote blockquote { margin: 0; }
.blk-quote blockquote p {
  font-size: var(--fs-quote);
  line-height: 1.3;
  font-style: italic;
  color: var(--text-strong);
  text-wrap: balance;
}
.blk-quote .blk-quote__tr {
  margin-top: var(--s2);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text);
}
.blk-quote figcaption { margin-top: var(--s2); }

/* ---------------------------------------------------------------- testimonial: a review */
.blk-testi {
  margin-inline: auto;
  max-width: 33em;
  text-align: center;
}
.blk-testi blockquote { margin: 0; }
.blk-testi blockquote p {
  font-size: 1.25rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--text-strong);
}
.blk-testi figcaption { margin-top: var(--s2); }

/* ---------------------------------------------------------------- stat: a numeral and its label */
.blk-stat {
  margin-inline: auto;
  max-width: 28em;
  text-align: center;
}
.blk-stat__value {
  font-size: clamp(3rem, 2.2rem + 3vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: lining-nums;
  color: var(--text-strong);
}
.blk-stat__label {
  margin-top: var(--s2);
  font-size: var(--fs-lead);
  line-height: 1.45;
  font-style: italic;
  color: var(--text-strong);
}
.blk-stat__label--alone {
  margin-top: 0;
  padding-block: var(--s3);
  border-block: 1px solid var(--line-2);
}
.blk-stat__caption { margin-top: var(--s1); font-size: var(--fs-small); }

/* ---------------------------------------------------------------- images
   Full column width in a hairline mount; dimmed a little by candlelight. */
.blk-fig { margin: 0; }
.blk-fig--narrow { max-width: 420px; margin-inline: auto; }
.blk-fig__frame {
  display: block;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
}
.blk-fig__frame img {
  display: block;
  width: 100%;
  height: auto;
}
html.dark .blk-fig__frame img,
html.dark .blk-social__thumb img { filter: brightness(.88); }
.blk-fig figcaption,
.blk-gallery__item figcaption,
.blk-video figcaption {
  margin-top: var(--s1);
  font-size: var(--fs-small);
  line-height: 1.5;
  text-align: center;
}

/* ---------------------------------------------------------------- gallery: a simple grid */
.blk-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
}
@media (min-width: 760px) { .blk-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blk-gallery__item { margin: 0; }
.blk-gallery__grid:not(.blk-gallery__grid--masonry) .blk-fig__frame img {
  aspect-ratio: 1;
  object-fit: cover;
}
.blk-gallery__grid--masonry { display: block; columns: 2; column-gap: var(--s2); }
@media (min-width: 760px) { .blk-gallery__grid--masonry { columns: 3; } }
.blk-gallery__grid--masonry .blk-gallery__item { break-inside: avoid; margin-bottom: var(--s2); }

/* ---------------------------------------------------------------- video: 16:9, click to load */
.blk-video { margin: 0; }
.blk-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.blk-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.blk-video .blk-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--s2);
  color: var(--text-strong);
  text-align: center;
  text-decoration: none;
}
.blk-video__icon {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.2;
  transition: transform .3s var(--ease);
}
.blk-video__icon path { fill: var(--accent); stroke: none; }
.blk-video__cta {
  font-size: .9375rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.blk-video__note {
  font-size: .9375rem;
  font-style: italic;
  color: var(--text-muted);
}
.blk-video__play:hover .blk-video__icon { transform: scale(1.06); }
.blk-video__play:focus-visible { outline-offset: -6px; }

/* ---------------------------------------------------------------- social post: a framed link */
.blocks .blk-social,
.blk-social {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s;
}
.blk-social:hover { border-color: var(--field); }
.blk-social__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.blk-social__body { display: grid; gap: 4px; padding: var(--s3); }
.blk-social__title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-h3);
  line-height: 1.35;
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--line-2);
}
.blk-social__title .i { width: 16px; height: 16px; flex: none; align-self: center; color: var(--accent); }
.blk-social:hover .blk-social__title { text-decoration-color: currentColor; }
.blk-social__desc { font-size: var(--fs-small); color: var(--text-muted); font-style: italic; }
@media (min-width: 560px) {
  .blk-social:has(.blk-social__thumb) { grid-template-columns: 200px minmax(0, 1fr); }
  .blk-social__thumb img { height: 100%; aspect-ratio: auto; }
}

/* ---------------------------------------------------------------- FAQ: « En savoir plus » rows
   A <details class="more"> per question (site.css animates its opening). */
.blk-faq__list { border-bottom: 1px solid var(--line); }
.blk-faq__item { border-top: 1px solid var(--line); }
.blk-faq .more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  min-height: 56px;
  padding: 10px 0;
  color: var(--text-strong);
  font-size: var(--fs-h3);
  line-height: 1.35;
  transition: color .2s;
}
.blk-faq .more summary:hover { color: var(--accent); }
.blk-faq .more summary:focus-visible { outline-offset: 2px; }
.blk-faq .i--pm {
  width: 24px;
  height: 24px;
  padding: 3px;
  flex: none;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 50%;
  stroke-width: 1.8;
}
.blk-faq .i--pm .v { transform-origin: 12px 12px; transition: transform .3s var(--ease); }
.blk-faq .more[open] .i--pm .v { transform: scaleY(0); }
.blk-faq .more__body { padding: 0 0 var(--s3); }
.blk-faq .more__body p { max-width: 34em; }

/* ---------------------------------------------------------------- divider: the fleuron, or air */
.blk-divider { padding-block: var(--s2); }
.blk-space { height: var(--s6); }

/* ---------------------------------------------------------------- call to action: a small framed card, one button */
.blk-cta {
  position: relative;
  padding: var(--s4) var(--s3);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  text-align: center;
}
.blk-cta::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid var(--line);
  pointer-events: none;
}
@media (min-width: 760px) { .blk-cta { padding: var(--s5); } }
.blk-cta__title {
  font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem);
  line-height: 1.25;
  color: var(--text-strong);
}
.blk-cta__text {
  max-width: 30em;
  margin: var(--s2) auto 0;
  font-style: italic;
}
.blk-cta__title + .blk-cta__text { margin-top: var(--s1); }
.blk-cta__phone {
  margin-top: var(--s2);
  font-size: var(--fs-h3);
  color: var(--text-strong);
}
.blk-cta__action { position: relative; margin-top: var(--s3); }
.blk-cta > .blk-cta__action:first-child { margin-top: 0; }
.blk-cta .btn { white-space: normal; text-align: center; }

/* ---------------------------------------------------------------- reviews block (filled by js/reviews.js, css/reviews.css) */
.blk-reviews__host > :first-child { margin-top: 0; }

/* ---------------------------------------------------------------- print */
@media print {
  .blk-video__play, .blk-cta__action { display: none !important; }
  html.dark .blk-fig__frame img { filter: none; }
}
