/*
 * Pages Guides et Référence
 *
 * Une seule mesure gouverne le titre, le visuel et le contenu. Sur les
 * guides longs, le sommaire occupe la colonne latérale sans déplacer l'axe
 * de lecture.
 */

.pz-page-shell--guide,
.pz-page-shell--reference {
  --pz-editorial-measure: 720px;
  --pz-editorial-rail: 142px;
  --pz-editorial-gap: 30px;
  max-width: 1180px !important;
}

.pz-page-shell--guide > .pz-page,
.pz-page-shell--reference > .pz-page,
.pz-editorial-layout > .pz-page {
  box-sizing: border-box;
  width: min(100%, var(--pz-editorial-measure)) !important;
  max-width: var(--pz-editorial-measure) !important;
  min-width: 0 !important;
  margin-inline: auto !important;
}

.pz-editorial-layout {
  display: block;
  width: 100%;
  min-width: 0;
}

.pz-editorial-layout > .pz-guide-rail {
  display: none;
}

.pz-page-shell--guide :is(.pz-page__header, .pz-page-hero, .pz-page__content),
.pz-page-shell--reference :is(.pz-page__header, .pz-page-hero, .pz-page__content) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pz-page-shell--guide .pz-page__header,
.pz-page-shell--reference .pz-page__header {
  margin-bottom: 28px !important;
}

.pz-page-shell--guide .pz-page__header h1,
.pz-page-shell--reference .pz-page__header h1 {
  width: 100%;
  max-width: 100% !important;
  min-width: 0;
  font-size: clamp(2.05rem, 2.45vw, 2.58rem) !important;
  line-height: 1.055 !important;
  letter-spacing: -.039em !important;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.pz-page-shell--guide .pz-page-hero,
.pz-page-shell--reference .pz-page-hero {
  margin-top: 3px !important;
  margin-bottom: 34px !important;
  overflow: hidden;
  border: 1px solid #2b3942;
  border-radius: 10px;
  background: #081016;
  box-shadow: 0 26px 72px rgba(0, 0, 0, .42), 0 0 40px rgba(8, 231, 241, .028);
}

.pz-page-shell--guide .pz-page-hero img,
.pz-page-shell--reference .pz-page-hero img,
.pz-page-shell--guide .pz-page__content :is(img, video, iframe),
.pz-page-shell--reference .pz-page__content :is(img, video, iframe) {
  display: block;
  max-width: 100% !important;
  height: auto;
}

.pz-page-shell--guide .pz-page-hero img,
.pz-page-shell--reference .pz-page-hero img {
  width: 100%;
}

.pz-page-hero--content > figure {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.pz-page-shell--guide .pz-page__content > *,
.pz-page-shell--reference .pz-page__content > * {
  box-sizing: border-box;
  max-width: 100% !important;
  min-width: 0;
}

.pz-page-shell--guide .pz-page__content > :is(figure, .wp-block-image, .wp-block-group, .wp-block-columns, blockquote, .wp-block-quote, .wp-block-table),
.pz-page-shell--reference .pz-page__content > :is(figure, .wp-block-image, .wp-block-group, .wp-block-columns, blockquote, .wp-block-quote, .wp-block-table) {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.pz-page-shell--guide .pz-page__content > :is(figure, .wp-block-image),
.pz-page-shell--reference .pz-page__content > :is(figure, .wp-block-image) {
  margin-top: 28px !important;
  margin-bottom: 34px !important;
}

.pz-page-shell--guide .pz-page__content > :is(figure, .wp-block-image) img,
.pz-page-shell--reference .pz-page__content > :is(figure, .wp-block-image) img {
  width: 100%;
  border: 1px solid #26343d !important;
  border-radius: 12px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, .34) !important;
}

.pz-page-shell--guide .pz-page__content h2,
.pz-page-shell--reference .pz-page__content h2 {
  margin-top: 2.2em !important;
  font-size: 1.48rem !important;
  line-height: 1.17 !important;
}

.pz-page-shell--guide .pz-page__content h3,
.pz-page-shell--reference .pz-page__content h3 {
  font-size: 1.14rem !important;
}

.pz-page-shell--guide .pz-page__content .wp-block-group,
.pz-page-shell--reference .pz-page__content .wp-block-group {
  border-radius: 10px !important;
}

.pz-page-shell--guide .pz-page__content :is(.wp-block-table, pre),
.pz-page-shell--reference .pz-page__content :is(.wp-block-table, pre),
.pz-page-shell--guide .pz-page__content > table,
.pz-page-shell--reference .pz-page__content > table {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.pz-page-shell--guide .pz-page__content > table,
.pz-page-shell--reference .pz-page__content > table {
  display: block;
  width: 100% !important;
}

.pz-guide-rail {
  position: sticky;
  top: 92px;
  width: var(--pz-editorial-rail);
  max-height: calc(100vh - 130px);
  padding-top: 7px;
  overflow: auto;
  scrollbar-width: none;
}

.pz-guide-rail::-webkit-scrollbar {
  display: none;
}

.pz-guide-rail__kicker {
  display: block;
  margin-bottom: 10px;
  color: #6f7e87;
  font-size: .57rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.pz-guide-rail ol {
  position: relative;
  margin: 0;
  padding: 0 0 0 13px;
  list-style: none;
  border-left: 1px solid #26323a;
}

.pz-guide-rail li {
  margin: 0;
}

.pz-guide-rail a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 4px;
  padding: 7px 0;
  color: #7f8d95;
  font-size: .67rem;
  line-height: 1.28;
  text-decoration: none;
  transition: color .15s ease;
}

.pz-guide-rail a b {
  color: #52616a;
  font-size: .53rem;
  letter-spacing: .04em;
}

.pz-guide-rail a span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pz-guide-rail a:hover,
.pz-guide-rail a.is-active {
  color: #eef5f7;
}

.pz-guide-rail a.is-active b {
  color: var(--pz-cyan);
}

.pz-guide-rail__progress {
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 0;
  width: 2px;
  pointer-events: none;
}

.pz-guide-rail__progress i {
  display: block;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(var(--pz-cyan), var(--pz-pink));
  box-shadow: 0 0 9px rgba(8, 229, 239, .28);
  transition: height .18s ease;
}

.pz-guide-mobile-toc {
  display: none;
}

.pz-page-hero--tofu img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 1181px) {
  .pz-editorial-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--pz-editorial-measure)) minmax(0, 1fr);
    gap: var(--pz-editorial-gap);
    align-items: start;
  }

  .pz-editorial-layout > .pz-guide-rail {
    display: block;
    grid-column: 1;
    justify-self: end;
  }

  .pz-editorial-layout > .pz-page {
    grid-column: 2;
    width: 100% !important;
    margin-inline: 0 !important;
  }
}

@media (max-width: 1180px) {
  .pz-guide-mobile-toc {
    display: block;
    width: 100%;
    margin: 0 0 26px;
  }

  .pz-guide-mobile-toc .pz-toc {
    margin: 0;
  }
}

@media (max-width: 720px) {
  .pz-page-shell--guide .pz-page__header h1,
  .pz-page-shell--reference .pz-page__header h1 {
    font-size: 1.95rem !important;
    line-height: 1.07 !important;
    letter-spacing: -.036em !important;
  }

  .pz-page-shell--guide .pz-page__content > :is(figure, .wp-block-image),
  .pz-page-shell--reference .pz-page__content > :is(figure, .wp-block-image) {
    margin-top: 20px !important;
    margin-bottom: 24px !important;
  }
}

@media (max-width: 390px) {
  .pz-page-shell--guide .pz-page__header h1,
  .pz-page-shell--reference .pz-page__header h1 {
    font-size: 1.86rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pz-guide-rail__progress i {
    transition: none;
  }
}
