/*
Theme Name: Labyrinthes
Description: Thème de blocs du site principal des Éditions Labyrinthes. Blanc, noir, filets clairs ; la couleur vient des couvertures.
Version: 1.0.0
Requires at least: 7.0
Requires PHP: 8.3
Text Domain: labyrinthes
License: Proprietary
Fonts: Montserrat et Alegreya, SIL Open Font License 1.1, hébergées dans assets/fonts.
*/

/* Ce que theme.json ne sait pas dire : surfaces du navigateur, en-tête, barre des collections. */

/* Space between header, content and footer: the content's top and bottom
   padding, the footer's top margin. About half the theme's largest spacing:
   40px on a computer, 24px on a phone. The child themes keep the largest
   spacing by redefining both variables. */
:root {
  --lab-respiration: clamp(1.5rem, 3vw, 2.5rem);
  --lab-respiration-haut: 0.5rem;
}

::selection {
  background: var(--wp--preset--color--encre);
  color: var(--wp--preset--color--papier);
}

:focus-visible {
  outline: 2px solid var(--wp--preset--color--encre);
  outline-offset: 3px;
}

/* Rules: two levels, named once. The strong rule frames the page (header,
   footer) and opens a section (section titles, table header). The soft rule
   separates inside a section: rows, lists, technical sheet, pager, notes,
   collections bar, footer bottom line. Fields, buttons and the procure panel
   keep an ink outline: they are objects, not rules. A child theme redefines
   the two levels for its own background. */
:root {
  --lab-trait-fort: var(--wp--preset--color--encre);
  --lab-trait-doux: var(--wp--preset--color--filet);
}

a {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

/* Hover: every link and button is underlined, never a colour change alone.
   An underline already shown at rest goes from 1 to 2px. `:root` lifts the
   rule above the components that remove the underline at rest, child themes
   included. The `:focus-visible` outline stays. */
:root :any-link:hover,
:root .wp-element-button:hover,
:root .wpcf7-form input[type="submit"]:hover,
:root .wp-block-navigation__responsive-container-open:hover,
:root .wp-block-navigation__responsive-container-close:hover {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
}

/* Covers are duplicate links of the title, hidden from assistive technology:
   hovering one underlines the title. */
.lab-piece:has(.lab-piece__couverture a:hover) .lab-piece__titre a,
.lab-etagere li:has(.lab-etagere__couverture:hover) .lab-etagere__titre a,
.lab-ligne:has(.lab-ligne__couverture:hover) .lab-ligne__titre a,
.lab-resultat:has(.lab-resultat__vignette:hover) .lab-resultat__titre a {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
}

/* The brand of the three sites keeps no hover effect, in the header and in
   the footer, by convention for a site's own logo. */
:root .lab-marque a:hover,
:root .lab-revue-marque__nom a:hover,
:root .lab-misfits-marque a:hover {
  text-decoration-line: none;
}

/* Links to another site open a new tab: screen readers hear it, nothing is
   drawn. A browser without the alternative-text syntax drops the rule. */
.lab-nouvel-onglet::after {
  content: "" / " (nouvel onglet)";
}

/* En-tête */

.lab-entete {
  border-bottom: 1px solid var(--lab-trait-fort);
}

/* The house's brand, in the header and in the footer: the round emblem, then
   « Labyrinthes » as text, in spaced Montserrat capitals. One link to the
   home page. The emblem is drawn from the theme's own file, at any size. */
.lab-marque {
  margin: 0;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lab-marque a {
  display: inline-flex;
  align-items: center;
  gap: 0.8125rem;
  text-decoration: none;
}

.lab-marque a::before {
  content: "";
  flex: none;
  width: 3rem;
  aspect-ratio: 367 / 342;
  background: url("assets/images/embleme-labyrinthes.png") center / contain no-repeat;
}

.lab-entete__barre {
  align-items: center;
}

/* One header bar height on the three sites: 6rem on a computer, 4.5rem on a
   phone. Each site keeps its own type and colours; the bar, the vertical
   centring and the « Menu » button on phones are shared. */
:root {
  --lab-entete-hauteur: 6rem;
}

@media (max-width: 52rem) {
  :root {
    --lab-entete-hauteur: 4.5rem;
  }
}

/* The header is one block closed by one strong rule: no rule between its two
   rows, the collections bar stands apart by its lowercase type. */
.lab-collections {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 500;
}

.lab-collections .wp-block-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-collections .wp-block-categories a,
.lab-collections .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.lab-collections .current-cat > a {
  text-decoration: underline;
}

/* Collections on the left, the two other sites on the right edge: the bar
   splits like the header above it, logo on the left, menu on the right. */
.lab-collections .lab-collections__liste {
  justify-content: space-between;
}

.lab-collections .lab-ailleurs {
  position: relative;
  padding-left: 1.75rem;
  font-weight: 400;
}

/* A short stroke at text height between the collections and the two other
   sites, rather than a rule touching both edges of the bar. */
.lab-collections .lab-ailleurs::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 1.125em;
  background: var(--wp--preset--color--gris);
  transform: translateY(-50%);
}

.lab-collections .lab-ailleurs .wp-block-navigation {
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

/* The two other sites sign in their own lettering, as in their own headers:
   Misfits in its heavy lowercase Alegreya, the Revue in its bold Montserrat
   with the red bracket. The red belongs to the Revue's palette alone. */
.lab-collections .lab-ailleurs .lab-signe-misfits .wp-block-navigation-item__content {
  font-family: var(--wp--preset--font-family--texte);
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.lab-collections .lab-ailleurs .lab-signe-revue .wp-block-navigation-item__content {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lab-signe-revue .lab-crochet {
  color: var(--wp--custom--rouge-revue);
}

/* Titres de section : capitales espacées sur un filet noir */

:is(.lab-section-titre, .is-style-section) {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--lab-trait-fort);
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Pied de page */

.lab-pied {
  border-top: 1px solid var(--lab-trait-fort);
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
}

.lab-pied .wp-block-navigation {
  font-size: var(--wp--preset--font-size--petit);
  letter-spacing: 0;
  text-transform: none;
}


/* Footer in three columns of links, sorted by use: the house, the other sites,
   the social accounts. Identity on the left, legal line at the bottom. */
.lab-pied__colonnes {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) repeat(3, minmax(8rem, 1fr));
  align-items: start;
  gap: 2rem var(--wp--custom--gouttiere);
}

.lab-pied__colonnes > *,
.lab-pied__maison > *,
.lab-pied__rubrique > * {
  margin: 0;
}

.lab-pied__maison > * + * {
  margin-block-start: 0.75rem;
}

.lab-pied__titre {
  margin-block-end: 0.5rem !important;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* A label on two lines, « Éditions Labyrinthes sur Facebook », reads as one
   link: tight line height inside a link, a gap between links. One-line links
   keep a 24px touch target. */
.lab-pied__rubrique .wp-block-navigation__container {
  gap: 0.5rem 0;
}

.lab-pied__rubrique .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  line-height: 1.25;
  text-decoration: none;
}

/* « Suivre »: the house's accounts, a logo in the text colour beside each
   name, one per line, set like the other footer links. The logos-only style
   would paint each logo in its network's colour. */
.lab-pied .lab-suivre.wp-block-social-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
  font-weight: 500;
}

.lab-pied .lab-suivre.is-style-logos-only .wp-social-link {
  display: flex;
  margin: 0;
  color: inherit;
  line-height: 1.25;
}

/* The block enlarges a link on hover; no other link of the site moves. */
.lab-pied .lab-suivre .wp-social-link:hover {
  transform: none;
}

.lab-pied .lab-suivre .wp-block-social-link-anchor {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.5rem;
  padding: 0;
  line-height: 1.25;
  text-decoration: none;
}

.lab-pied .lab-suivre .wp-block-social-link-anchor svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
}

/* The block shrinks labels to 0.65em; here they match the other links. */
.lab-pied .lab-suivre .wp-social-link .wp-block-social-link-label {
  margin: 0;
  font-size: inherit;
}

.lab-pied__bas {
  margin-block-start: var(--wp--preset--spacing--40);
  padding-block-start: 1rem;
  border-top: 1px solid var(--lab-trait-doux);
  color: var(--wp--preset--color--gris);
}

.lab-pied__bas > p {
  margin: 0;
}

/* House contact details, from « Réglages > Général » of the main site. */
.lab-coordonnees-bloc {
  font-style: normal;
}

.lab-coordonnees-bloc p {
  margin: 0;
}

.lab-coordonnees-bloc--pied p + p {
  margin-block-start: 0.5rem;
}

.lab-coordonnees-bloc--page p + p {
  margin-block-start: var(--wp--style--block-gap, 1.25rem);
}

/* The « Menu » button up to 52rem, the themes' phone limit, not only below
   WordPress's 600px: between the two the menu wrapped on three lines beside
   the logo. The same on the three sites. */
@media (min-width: 600px) and (max-width: 52rem) {
  .lab-entete .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex;
  }

  .lab-entete .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none;
  }
}

/* Migrated content still asks for the old theme's « small » size, which no
   preset of this theme defines: it takes the small size of this one. */
.has-small-font-size {
  font-size: var(--wp--preset--font-size--petit) !important;
}

/* Search link of the header: a magnifying glass, its label kept for screen
   readers, shown again in the phone menu. A line under the glass marks hover. */
.lab-entete .lab-nav-recherche .wp-block-navigation-item__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lab-entete .lab-nav-recherche .wp-block-navigation-item__content {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 1.5rem;
  min-height: 1.5rem;
}

.lab-entete .lab-nav-recherche .wp-block-navigation-item__content::before {
  content: "";
  width: 1.125rem;
  height: 1.125rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lab-entete .lab-nav-recherche .wp-block-navigation-item__content:hover {
  box-shadow: inset 0 -2px 0 currentColor;
}

/* Navigation of the main site (menu, collections bar, footer lists) and the
   two links of a book in a list, « Commander » and « Lire la fiche »: on
   hover, a highlighter stroke runs under the word, left to right, in the
   highlight colour, instead of the underline. The stroke is the link's own
   background, so the header's paper cannot hide it and it follows a word that
   wraps. Placed from the middle of the line, it covers the lower half of the
   letters whatever the line height. The padding is given back in margin:
   nothing moves. Without motion, the stroke appears at once. Links inside
   text keep their underline. */
.lab-site-editions :is(
  .lab-entete .wp-block-navigation-item:not(.lab-nav-recherche) > .wp-block-navigation-item__content,
  .lab-collections a,
  .lab-pied__rubrique a,
  .lab-piece__liens a
) {
  margin-inline: -0.25em;
  padding-inline: 0.25em;
  background: linear-gradient(var(--wp--preset--color--surligneur), var(--wp--preset--color--surligneur)) 0 calc(50% + 0.21em) / 0 0.6em no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.35s ease-out;
}

:root .lab-site-editions :is(
  .lab-entete .wp-block-navigation-item:not(.lab-nav-recherche) > .wp-block-navigation-item__content,
  .lab-collections a,
  .lab-pied__rubrique a,
  .lab-piece__liens a
):hover {
  background-size: 100% 0.6em;
  text-decoration-line: none;
}

@media (prefers-reduced-motion: reduce) {
  .lab-site-editions :is(
    .lab-entete .wp-block-navigation-item:not(.lab-nav-recherche) > .wp-block-navigation-item__content,
    .lab-collections a,
    .lab-pied__rubrique a,
    .lab-piece__liens a
  ) {
    transition: none;
  }
}

.lab-entete .wp-block-navigation__responsive-container.is-menu-open .lab-nav-recherche .wp-block-navigation-item__label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

@media (max-width: 52rem) {
  .lab-collections .wp-block-group.lab-collections__liste {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }

  .lab-collections .wp-block-categories {
    flex-wrap: nowrap;
    gap: 0 1.25rem;
  }

  .lab-collections .wp-block-categories li {
    flex: none;
  }

  .lab-collections .lab-ailleurs {
    padding-left: 1.25rem;
  }

  /* On a phone, identity on its own row, then the three lists two by two. */
  .lab-pied__colonnes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-pied__maison {
    grid-column: 1 / -1;
  }

  /* The accounts, alone on the third row, take its width rather than wrap. */
  .lab-pied__rubrique:has(.lab-suivre) {
    grid-column: 1 / -1;
  }
}

/* Pages : titre, chapeau, statut */

.lab-page {
  padding-block: var(--lab-respiration);
}

.lab-page__titre {
  margin-block-end: 0;
  /* « Accompagnement » ne tient pas sur un téléphone en corps de titre. */
  hyphens: auto;
  overflow-wrap: break-word;
}

:is(.lab-chapeau, .is-style-chapeau) {
  max-width: 40rem;
  font-size: var(--wp--preset--font-size--moyen);
  font-style: italic;
  line-height: 1.4;
  text-wrap: balance;
}

.lab-statut {
  margin: 0 0 0.75rem;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Accroche : le mot-clé d'un ouvrage, en étiquette au-dessus du titre. */
.lab-accroche {
  margin: 0 0 0.375rem;
  font-family: var(--wp--preset--font-family--texte);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.3;
  color: var(--wp--preset--color--gris);
}

.lab-statut span {
  font-weight: 400;
  color: var(--wp--preset--color--gris);
}

/* Recherche et listes à filets */

.lab-recherche {
  max-width: 40rem;
}

.lab-recherche .wp-block-search__input {
  min-height: 3rem;
  border: 1px solid var(--wp--preset--color--encre);
  border-radius: 0;
  font-size: 1.125rem;
}

:is(.lab-liste-filets, .is-style-filets) {
  max-width: 44rem;
  padding: 0;
  list-style: none;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.9375rem;
}

:is(.lab-liste-filets, .is-style-filets) li {
  padding-block: 0.625rem;
  border-bottom: 1px solid var(--lab-trait-doux);
}

/* Colonne de page : 78rem centrés, contenus alignés à gauche à l'intérieur */

.lab-page {
  box-sizing: content-box;
  max-width: var(--wp--style--global--wide-size);
  margin-inline: auto;
  padding-inline: var(--wp--custom--gouttiere);
}

.lab-entete > * + * {
  margin-block-start: 0;
}

.lab-entete__barre {
  min-height: var(--lab-entete-hauteur);
  padding-block: 0;
}

/* Fiche ouvrage */

:is(.lab-fil, .is-style-fil) {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
}

.lab-fiche {
  gap: var(--wp--custom--gouttiere);
  margin-block-start: var(--wp--preset--spacing--40);
}

.lab-fiche__couverture {
  align-self: flex-start;
  position: sticky;
  top: 2rem;
}

.lab-couverture img,
.lab-etagere img {
  box-shadow: var(--wp--custom--ombre-couverture);
}

.lab-fiche__titre {
  margin-block-start: 0;
  font-size: var(--wp--preset--font-size--tres-grand);
}

.lab-fiche__auteurs,
.lab-auteurs {
  margin-block-start: 0.5rem;
  font-family: var(--wp--preset--font-family--texte);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.lab-auteurs a {
  text-decoration: none;
}

.lab-faits {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.5rem;
  margin-block: 1.75rem 0;
  padding-block: 1rem;
  border-block: 1px solid var(--lab-trait-doux);
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
}

.lab-faits dt {
  color: var(--wp--preset--color--gris);
}

.lab-faits dd {
  margin: 0;
}

/* Se procurer */

.lab-procurer {
  margin-block-start: 2rem;
  /* Reached from the lists' « Se procurer » buttons: some air above it. */
  scroll-margin-block-start: 1.5rem;
  font-family: var(--wp--preset--font-family--titrage);
}

.lab-note {
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--lab-trait-doux);
  font-size: 0.9375rem;
}

.lab-note strong {
  display: block;
  margin-bottom: 0.25rem;
}

.lab-procurer__volet {
  border: 1px solid var(--wp--preset--color--encre);
}

.lab-procurer__volet summary {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 0 1.25rem;
  background: var(--wp--preset--color--encre);
  color: var(--wp--preset--color--papier);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.lab-procurer__volet summary:hover {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.lab-procurer__volet ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-procurer__volet li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 1.125rem 1.25rem;
}

.lab-procurer__volet li + li {
  border-top: 1px solid var(--lab-trait-doux);
}

.lab-procurer__nom {
  font-size: 0.9375rem;
  font-weight: 600;
}

.lab-procurer__aide {
  grid-column: 1;
  font-size: var(--wp--preset--font-size--petit);
  color: var(--wp--preset--color--gris);
}

.lab-procurer__liens {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Several links, such as the bookshops, line up under the name and help text. */
.lab-procurer__volet li.lab-procurer__option--liens {
  grid-template-columns: 1fr;
}

.lab-procurer__option--liens .lab-procurer__liens {
  grid-column: 1;
  grid-row: auto;
  justify-content: flex-start;
  margin-block-start: 0.5rem;
}

.lab-procurer__lien {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid var(--wp--preset--color--encre);
  font-size: var(--wp--preset--font-size--petit);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.lab-procurer__lien:hover,
.lab-procurer__lien--principal {
  background: var(--wp--preset--color--encre);
  color: var(--wp--preset--color--papier);
}

.lab-procurer__lien--principal:hover {
  background: var(--wp--preset--color--papier);
  color: var(--wp--preset--color--encre);
}

.lab-prose {
  max-width: 36rem;
  margin-block-start: 2.5rem;
  text-wrap: pretty;
}

/* Encart auteur et étagère */

.lab-encart {
  margin-block-start: 3rem;
}

.lab-encart :is(.lab-section-titre, .is-style-section) a {
  text-decoration: none;
}

.lab-encart__bio {
  max-width: 36rem;
}

.lab-plus {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Order, then read: the two links of a book, side by side, parted by a
   faint vertical rule. The rule stands between the links, outside their
   boxes: the highlighter stroke of the hover stops at the word. */
.lab-piece__liens {
  display: flex;
  gap: 1.75rem;
  margin: 0;
}

.lab-piece__liens a + a {
  position: relative;
}

.lab-piece__liens a + a::before {
  content: "";
  position: absolute;
  inset-block: 0.15em;
  inset-inline-start: calc(0.25em - 0.875rem);
  border-inline-start: 1px solid var(--lab-trait-doux);
}

:is(.lab-liste-filets, .is-style-filets) span {
  float: right;
  color: var(--wp--preset--color--gris);
  font-variant-numeric: tabular-nums;
}

.lab-meme-collection {
  margin-block-start: var(--wp--preset--spacing--60);
}

.lab-meme-collection :is(.lab-section-titre, .is-style-section) a {
  text-decoration: none;
}

.lab-etagere {
  display: flex;
  gap: var(--wp--custom--gouttiere);
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.lab-etagere li {
  flex: 0 1 11rem;
  /* A cover's own width must not hold the item wider: square Revue covers are 300px. */
  min-width: 0;
}

.lab-etagere__couverture img {
  display: block;
  width: 100%;
  height: auto;
}

.lab-etagere__titre {
  margin: 0.75rem 0 0;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
}

.lab-etagere__titre a,
.lab-etagere__auteurs a {
  text-decoration: none;
}

.lab-etagere__auteurs {
  margin: 0.125rem 0 0;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--wp--preset--color--gris);
}

/* 24px tap target for the title and each author under a cover. */
.lab-etagere__titre a,
.lab-etagere__auteurs a {
  display: inline-block;
  min-height: 1.5rem;
}

.lab-sans-couverture {
  display: block;
  aspect-ratio: 2 / 3;
  background: repeating-linear-gradient(135deg, var(--lab-trait-doux) 0 1px, transparent 1px 12px);
  border: 1px solid var(--lab-trait-doux);
}

@media (max-width: 52rem) {
  .lab-fiche__couverture {
    position: static;
    max-width: 13rem;
  }

  /* One column: the cover of a book or an issue is centred, as in the lists.
     `.lab-fiche` lifts the rule above the flex layout's own zero margin. */
  .lab-fiche .lab-fiche__couverture {
    margin-inline: auto;
  }

  .lab-procurer__volet li {
    grid-template-columns: 1fr;
  }

  .lab-procurer__liens {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }

  /* Positionnée, l'étagère retient aussi les textes masqués pour les lecteurs d'écran. */
  .lab-etagere {
    position: relative;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .lab-etagere li {
    flex: 0 0 8.5rem;
  }
}

.lab-prose :is(.lab-section-titre, .is-style-section) {
  margin-block-start: 2.5rem;
}

.lab-pied {
  padding-block: var(--wp--preset--spacing--50);
  margin-block-start: var(--lab-respiration);
}

.lab-collections .lab-ailleurs {
  flex: none;
}

.lab-collections .lab-ailleurs .wp-block-navigation__container {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.lab-collections .wp-block-categories {
  flex: none;
}

/* Accrochage : un livre par rangée, alternance gauche et droite */

.lab-accrochage {
  padding-block-start: 0;
}

/* One gap between the sections of the home page, whatever they hold: the
   last row of a showcase drops its bottom padding, which doubled the gap. */
.lab-accueil > * + * {
  margin-block-start: var(--wp--preset--spacing--50);
}

/* The hidden page title comes first: the first section keeps the page's own top space. */
.lab-accueil > .screen-reader-text + * {
  margin-block-start: 0;
}

.lab-piece:last-child {
  padding-block-end: 0;
}

.lab-accueil > .lab-accrochage:first-of-type :is(.lab-section-titre, .is-style-section) {
  border-top: 0;
  padding-top: 0;
}

/* La revue sur l'accueil : le dernier numéro en vignette, sous les nouveautés */


.lab-accueil .lab-numeros .lab-etagere li {
  flex: 0 1 13rem;
}

.lab-numeros--vignettes .lab-etagere__titre {
  font-size: 0.9375rem;
  font-weight: 700;
}

.lab-numeros--vignettes .lab-etagere__sous-titre {
  display: block;
  font-weight: 400;
  color: var(--wp--preset--color--gris);
}

@media (max-width: 52rem) {
  .lab-accueil .lab-numeros .lab-etagere li {
    flex-basis: 10rem;
  }
}

:is(.lab-section-titre, .is-style-section) small {
  margin-left: 0.75rem;
  font-weight: 400;
  color: var(--wp--preset--color--gris);
  letter-spacing: 0.08em;
  font-size: 0.875rem;
}

.lab-accrochage__liste {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lab-piece {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 0 var(--wp--custom--gouttiere);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.lab-piece + .lab-piece {
  border-top: 1px solid var(--lab-trait-doux);
}

.lab-piece:first-child {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.lab-piece__couverture {
  grid-column: 2 / span 4;
  max-width: calc(72svh * 0.63);
}

.lab-piece__texte {
  grid-column: 7 / span 5;
}

.lab-piece:nth-child(even) .lab-piece__couverture {
  grid-column: 8 / span 4;
  grid-row: 1;
  justify-self: end;
}

.lab-piece:nth-child(even) .lab-piece__texte {
  grid-column: 2 / span 5;
  grid-row: 1;
}

.lab-piece__couverture img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: var(--wp--custom--ombre-couverture);
}

.lab-piece__titre {
  margin: 0;
  font-size: var(--wp--preset--font-size--grand);
  text-wrap: balance;
}

.lab-piece__titre a {
  text-decoration: none;
}

.lab-piece .lab-auteurs {
  font-size: 1.25rem;
}

.lab-piece__lieu {
  margin: 1rem 0 0;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
  color: var(--wp--preset--color--gris);
}

/* Link to the collection: 24px tap target, in the grey of the line. */
.lab-piece__lieu a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  color: inherit;
}

.lab-piece__extrait {
  max-width: 34rem;
  margin: 1.25rem 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}

.lab-accrochage--a_paraitre .lab-piece__couverture {
  grid-column: 2 / span 5;
  justify-self: end;
  max-width: calc(66svh * 0.63);
}

.lab-accrochage--a_paraitre .lab-piece__titre {
  font-size: var(--wp--preset--font-size--tres-grand);
}

.lab-accrochage--petite .lab-piece {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.lab-accrochage--petite .lab-piece__couverture {
  grid-column: 3 / span 3;
  max-width: calc(46svh * 0.63);
}

.lab-accrochage--petite .lab-piece:nth-child(even) .lab-piece__couverture {
  grid-column: 8 / span 3;
}

.lab-accrochage--petite .lab-piece__titre {
  font-size: var(--wp--preset--font-size--moyen);
}

.lab-pages {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--lab-trait-doux);
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
}

.lab-pages a {
  font-weight: 600;
}

/* Page de collection */

.lab-collection__texte {
  margin-block-start: 1.5rem;
}

.lab-autres-collections {
  margin-block-start: var(--wp--preset--spacing--60);
}

.lab-autres-collections .wp-block-categories {
  font-family: var(--wp--preset--font-family--titrage);
}

@media (max-width: 52rem) {
  .lab-piece,
  .lab-accrochage--petite .lab-piece {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .lab-piece .lab-piece__couverture,
  .lab-piece .lab-piece__texte,
  .lab-piece:nth-child(even) .lab-piece__couverture,
  .lab-piece:nth-child(even) .lab-piece__texte,
  .lab-accrochage--a_paraitre .lab-piece__couverture,
  .lab-accrochage--petite .lab-piece .lab-piece__couverture,
  .lab-accrochage--petite .lab-piece:nth-child(even) .lab-piece__couverture {
    grid-column: 1;
    grid-row: auto;
  }

  /* One column: every cover is centred, whatever its side on a wide screen. */
  .lab-piece .lab-piece__couverture,
  .lab-piece:nth-child(even) .lab-piece__couverture {
    width: min(72%, 20rem);
    justify-self: center;
  }

  .lab-accrochage--a_paraitre .lab-piece__couverture {
    width: min(52%, 14rem);
  }

  .lab-accrochage--petite .lab-piece .lab-piece__couverture {
    width: min(56%, 14rem);
  }
}

.lab-piece__couverture {
  width: 100%;
}

@media (max-width: 52rem) {
  .lab-entete .lab-marque {
    font-size: 0.9375rem;
  }

  .lab-entete .lab-marque a {
    gap: 0.625rem;
  }

  .lab-entete .lab-marque a::before {
    width: 2.5rem;
  }

  .lab-page {
    padding-block-start: var(--lab-respiration-haut);
  }

  .lab-accrochage {
    padding-block-start: 0;
  }
}

/* Fiche auteur et annuaire */

.lab-liens__liste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

:is(.lab-chapeau, .is-style-chapeau):empty {
  display: none;
}

.lab-contributions__groupe {
  margin-block-start: var(--wp--preset--spacing--50);
}

.lab-annuaire__total {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
  color: var(--wp--preset--color--gris);
}

.lab-annuaire__lettres {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-block: 2rem 0;
  background: var(--wp--preset--color--papier);
  border-bottom: 1px solid var(--lab-trait-doux);
}

.lab-annuaire__lettres ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
}

.lab-annuaire__lettres a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2.75rem;
  text-decoration: none;
}

.lab-annuaire__lettre {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--lab-trait-doux);
  scroll-margin-top: 3.5rem;
}

.lab-annuaire__lettre h2 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1;
}

/* A short directory, the authors of one site, has no letters. */
.lab-annuaire__court {
  margin-block-start: 1.5rem;
  padding-block: 1.5rem;
  border-block: 1px solid var(--lab-trait-doux);
}

:is(.lab-annuaire__lettre, .lab-annuaire__court) ul {
  columns: 3 14rem;
  column-gap: var(--wp--custom--gouttiere);
  margin: 0;
  padding: 0;
  list-style: none;
}

:is(.lab-annuaire__lettre, .lab-annuaire__court) li {
  break-inside: avoid;
}

:is(.lab-annuaire__lettre, .lab-annuaire__court) a {
  display: inline-block;
  padding-block: 0.375rem;
  font-size: 1.125rem;
  text-decoration: none;
}

.lab-annuaire__nom {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 1rem;
  font-weight: 600;
}

@media (max-width: 52rem) {
  .lab-annuaire__lettres ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }

  .lab-annuaire__lettres li {
    flex: none;
  }

  .lab-annuaire__lettre {
    grid-template-columns: 3rem 1fr;
  }

  .lab-annuaire__lettre h2 {
    font-size: 1.75rem;
  }
}

/* Recherche */

.lab-resultats__total {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
  color: var(--wp--preset--color--gris);
}

.lab-resultats__groupe {
  margin-block-start: var(--wp--preset--spacing--50);
}

.lab-resultats {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.lab-resultat {
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: center;
  gap: 1.25rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--lab-trait-doux);
}

.lab-resultat__vignette img,
.lab-resultat__vignette .lab-sans-couverture {
  display: block;
  width: 4rem;
  height: auto;
  box-shadow: 0 6px 14px -8px rgb(0 0 0 / 0.4);
}

.lab-resultat__nature {
  margin: 0;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gris);
}

.lab-resultat__titre {
  margin: 0.25rem 0 0;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 1.25rem;
  font-weight: 500;
}

.lab-resultat__titre a {
  text-decoration: none;
}

.lab-resultat__detail {
  margin: 0.125rem 0 0;
  font-style: italic;
  color: var(--wp--preset--color--gris);
}

.lab-resultat__detail a {
  text-decoration: none;
}

/* Pages de la maison : colonnes, critères, coordonnées, mentions */

.lab-colonnes {
  gap: var(--wp--custom--gouttiere);
  margin-block: var(--wp--preset--spacing--50);
}

.lab-criteres {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--lab-trait-doux);
  /* One label column for every row, as wide as the longest label. */
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 2rem;
}

.lab-criteres li {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: baseline;
  padding-block: 1rem;
  border-bottom: 1px solid var(--lab-trait-doux);
}

.lab-criteres strong {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lab-macaron img {
  mix-blend-mode: multiply;
}

.lab-cle {
  display: block;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--gris);
}

.lab-legal {
  max-width: 36rem;
}

.lab-legal h2 {
  margin-block: 2.5rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

/* Highlighted text, on the three sites: the « Surligner » tool of the editor,
   or a bare mark. Ink on yellow, also on Misfits' night. */
mark {
  padding-inline: 0.1em;
  background: var(--wp--preset--color--surligneur);
  color: #111111;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Formulaires Contact Form 7 */

.wpcf7-form {
  display: grid;
  gap: 1.25rem;
  max-width: 36rem;
}

.wpcf7-form p {
  margin: 0;
}

.wpcf7-form label {
  display: block;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
}

.wpcf7-form :is(.lab-facultatif, .lab-obligatoire) {
  font-weight: 400;
  color: var(--wp--preset--color--gris);
}

.wpcf7-form input:not([type="submit"]):not([type="file"]):not([type="radio"]):not([type="checkbox"]),
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.375rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--wp--preset--color--encre);
  border-radius: 0;
  background: var(--wp--preset--color--papier);
  font: inherit;
  font-family: var(--wp--preset--font-family--texte);
  font-size: 1rem;
  font-weight: 400;
  box-sizing: border-box;
}

.wpcf7-form textarea {
  min-height: 10rem;
}

/* Choices, the newsletter's profile: a group with its question above, one
   choice per line, the button before its text. */
.wpcf7-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.wpcf7-form legend {
  margin-bottom: 0.5rem;
  padding: 0;
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.875rem;
  font-weight: 600;
}

.wpcf7-form .wpcf7-radio {
  display: grid;
  gap: 0.25rem;
}

.wpcf7-form .wpcf7-list-item {
  margin: 0;
}

.wpcf7-form .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2rem;
  font-weight: 400;
  cursor: pointer;
}

.wpcf7-form input[type="radio"] {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.125rem 0 0;
  accent-color: var(--wp--preset--color--encre);
}

.wpcf7-form .lab-aide,
.wpcf7-form .lab-consentement {
  font-family: var(--wp--preset--font-family--titrage);
  font-size: var(--wp--preset--font-size--petit);
  color: var(--wp--preset--color--gris);
}

.wpcf7-form input[type="submit"] {
  justify-self: start;
  min-height: 3rem;
  padding: 0 1.75rem;
  border: 1px solid var(--wp--preset--color--encre);
  border-radius: 0;
  background: var(--wp--preset--color--encre);
  color: var(--wp--preset--color--papier);
  font-family: var(--wp--preset--font-family--titrage);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.wpcf7-form input[type="submit"]:hover {
  background: var(--wp--preset--color--papier);
  color: var(--wp--preset--color--encre);
}

@media (max-width: 52rem) {
  .lab-criteres {
    grid-template-columns: 1fr;
  }

  .lab-criteres li {
    row-gap: 0.25rem;
  }
}

.lab-note {
  font-family: var(--wp--preset--font-family--titrage);
}

.lab-page__contenu > :is(.lab-chapeau, .is-style-chapeau) {
  margin-block-start: 1.25rem;
}

/* Bouton « Menu » du téléphone : cible de 44 px, comme la maquette. Its label
   is the one text under the 0.875rem floor, at Tristan's request: four spaced
   capitals read larger than their size. */

.lab-entete .wp-block-navigation__responsive-container-open,
.lab-entete .wp-block-navigation__responsive-container-close {
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 0.5rem;
  border: 1px solid var(--wp--preset--color--encre);
  font-family: var(--wp--preset--font-family--titrage);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* WordPress sets the size of these two buttons to the menu's, with a tripled
   class: the size needs a longer selector of its own. */
:root .lab-entete .wp-block-navigation :is(.wp-block-navigation__responsive-container-open, .wp-block-navigation__responsive-container-close) {
  font-size: 0.8125rem;
}

.lab-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  min-height: 2.75rem;
  font-size: 1rem;
}

/* Boutons des blocs de la Revue et de Misfits, aux couleurs de chaque site */

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 1.75rem;
}

.lab-bouton {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 1.125rem;
  border: 1px solid var(--wp--preset--color--encre);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.lab-bouton:hover,
.lab-bouton--principal {
  background: var(--wp--preset--color--encre);
  color: var(--wp--preset--color--papier);
}

.lab-bouton--principal:hover {
  background: var(--wp--preset--color--papier);
  color: var(--wp--preset--color--encre);
}

/* Main site: cut marks and reserved zones. Two faint rails bound the content
   column over the whole page, the margins outside them are hatched, the strong
   rules run across the page with a small cut cross where they meet the rails.
   Soft rules stay inside the column. Fields and buttons keep their ink outline. */
.lab-site-editions {
  --lab-trait-fort: rgb(17 17 17 / 0.12);
  --lab-trait-doux: rgb(17 17 17 / 0.07);
  --lab-rail: rgb(17 17 17 / 0.08);
  --lab-hachure: rgb(17 17 17 / 0.05);
  --lab-croix: rgb(17 17 17 / 0.35);
  /* The rails stand half a gutter outside the content, so nothing touches them. */
  --lab-retrait: calc(var(--wp--custom--gouttiere) / 2);
  --lab-colonne: min(var(--wp--style--global--wide-size) + 2 * var(--lab-retrait), 100% - 2 * var(--lab-retrait));
}

.lab-site-editions .wp-site-blocks {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background: repeating-linear-gradient(315deg, var(--lab-hachure) 0 1px, transparent 1px 10px);
}

/* The column: paper, between two rails. */
.lab-site-editions .wp-site-blocks::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: -1;
  width: var(--lab-colonne);
  transform: translateX(-50%);
  background: var(--wp--preset--color--papier);
  border-inline: 1px solid var(--lab-rail);
}

/* Header and footer stay plain paper across the page. */
.lab-site-editions .lab-entete,
.lab-site-editions .lab-pied {
  background: var(--wp--preset--color--papier);
}

/* Section rules cross the whole page, with a cut cross on each rail. */
.lab-site-editions :is(.lab-section-titre, .is-style-section) {
  position: relative;
  border-top: 0;
}

.lab-site-editions :is(.lab-section-titre, .is-style-section)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 1px;
  transform: translateX(-50%);
  background: var(--lab-trait-fort);
}

.lab-site-editions :is(.lab-section-titre, .is-style-section)::after,
.lab-site-editions .lab-collections__liste::after {
  content: "";
  position: absolute;
  left: calc(-5px - var(--lab-retrait));
  right: calc(-5px - var(--lab-retrait));
  height: 11px;
  pointer-events: none;
  background:
    linear-gradient(var(--lab-croix), var(--lab-croix)) left 5px top 0 / 1px 100% no-repeat,
    linear-gradient(var(--lab-croix), var(--lab-croix)) left 0 top 5px / 11px 1px no-repeat,
    linear-gradient(var(--lab-croix), var(--lab-croix)) right 5px top 0 / 1px 100% no-repeat,
    linear-gradient(var(--lab-croix), var(--lab-croix)) right 0 top 5px / 11px 1px no-repeat;
}

.lab-site-editions :is(.lab-section-titre, .is-style-section)::after {
  top: -5px;
}

/* The header's own rule: crosses on the rails, at its bottom edge. */
.lab-site-editions .lab-collections__liste {
  position: relative;
  overflow: visible;
}

.lab-site-editions .lab-collections__liste::after {
  bottom: -6px;
}

/* Inside the book page's text column, narrower than the page column (reviews,
   author box): a plain soft rule, no cut. */
.lab-site-editions .lab-fiche__corps :is(.lab-section-titre, .is-style-section) {
  border-top: 1px solid var(--lab-trait-doux);
}

.lab-site-editions .lab-fiche__corps :is(.lab-section-titre, .is-style-section)::before,
.lab-site-editions .lab-fiche__corps :is(.lab-section-titre, .is-style-section)::after,
.lab-site-editions .lab-accueil > .lab-accrochage:first-of-type :is(.lab-section-titre, .is-style-section)::before,
.lab-site-editions .lab-accueil > .lab-accrochage:first-of-type :is(.lab-section-titre, .is-style-section)::after {
  content: none;
}

