/* Identité de Pratiques et pratiques.
   Palette et familles du fond officiel : https://pratiquesetpratiques.github.io/fr/about.html */
@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Black";
  src: url("fonts/ArchivoBlack-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Special Elite";
  src: url("fonts/SpecialElite-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Homemade Apple";
  src: url("fonts/HomemadeApple-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("fonts/NotoSans-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Egyptian Hieroglyphs";
  src: url("fonts/NotoSansEgyptianHieroglyphs-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("fonts/Cinzel-Variable.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #222;
  --sans: "Archivo", "Noto Sans", Arial, sans-serif;
  --mono: "Space Mono", monospace;
  --display: "Archivo Black", "Archivo", sans-serif;
  --pp-max: 900px;
  --pp-baw-red: #8d3221;
  --pp-baw-orange: #ed7d29;
  --pp-baw-blue: #20415d;
}

body {
  isolation: isolate;
  font-family: var(--serif);
  background: #fdfbf4 linear-gradient(
    90deg,
    #d2bcff 0%,
    #f2cbe0 8%,
    #ffefe8 22%,
    #fff7eb 38%,
    #fdfbf4 50%,
    #f5faeb 62%,
    #eefaf7 78%,
    #e3efff 92%,
    #d2bcff 100%
  ) fixed;
}

#pp-identity-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.site-header {
  padding: 24px 16px;
  border-bottom: none;
}

.site-header,
.site-footer {
  color: #222;
  font: 400 1rem/1.6 var(--serif);
  letter-spacing: 0;
  hyphens: none;
  overflow-wrap: normal;
}

:is(.site-header, .site-footer) .container {
  max-width: var(--pp-max);
  margin: 0 auto;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  color: inherit;
  text-decoration: none;
}

.site-header .brand img {
  width: auto;
  height: 72px;
  vertical-align: middle;
}

.site-header .brand .title {
  display: none;
}

.site-header .lang-switch {
  float: right;
}

.site-header .mix-2,
.site-header .nav-mixed {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.site-header nav a {
  margin-right: 24px;
  white-space: nowrap;
}

.site-header .pp-type-glyph {
  display: inline-block;
  overflow: hidden;
  vertical-align: baseline;
}

.site-header nav a:hover {
  text-decoration: underline;
}

main.shell {
  width: 100%;
  max-width: var(--pp-max);
  padding: 24px;
}

.site-footer {
  display: block;
  margin: 0;
  padding: 24px 16px;
  border-top: none;
  position: relative;
  z-index: 1;
  color: #666;
  font-size: .95rem;
}

.site-footer .small { color: #222; }
.site-footer a { text-underline-offset: auto; }
.site-footer a:hover { color: inherit; }

.site-footer .boma-logo-wrap {
  margin: 0 auto .8rem;
  position: relative;
  z-index: 2;
  text-align: center;
  line-height: 0;
}

.site-footer .boma-logo {
  display: block;
  width: 240px;
  max-width: min(240px, 80vw);
  height: auto;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  opacity: .3;
}

.intro {
  display: block;
  padding: 0 0 1.1rem;
}

.intro h1 {
  display: inline-block;
  margin: 0;
  font: 400 1.35rem/1.6 var(--serif);
  letter-spacing: 0;
  white-space: nowrap;
}

.intro h1 span {
  margin: 0;
  color: inherit;
}

.intro p {
  margin: 0;
  color: var(--ink);
  font: 400 1rem/1.6 var(--serif);
}

.site-header .f1,
.intro .f1,
.pp-action-label .f1 {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
}

.site-header .f2,
.intro .f2,
.pp-action-label .f2 {
  font-family: "Special Elite", cursive;
  font-weight: 400;
}

.site-header .nav-mixed .f3,
.intro .f3,
.pp-action-label .f3 {
  font-family: var(--serif);
  font-weight: 700;
}

.site-header .nav-mixed .f4,
.intro .f4,
.pp-action-label .f4 {
  font-family: "Noto Sans", sans-serif;
  font-weight: 700;
}

.pp-type-glyph {
  display: inline-block;
  inline-size: var(--pp-glyph-width, auto);
  text-align: center;
  vertical-align: baseline;
}

.pp-type-character {
  transition: font-family .8s ease;
}

.pp-motion-paused .pp-type-character {
  transition: none;
}

.globe-stage {
  background: transparent;
}

.search-area :where(input, button, select) {
  font-family: var(--sans);
}

.pp-action-label {
  white-space: nowrap;
}

.search-submit {
  color: #111;
  border: 2px solid transparent;
  border-radius: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .82), rgba(255, 255, 255, .82)) padding-box,
    linear-gradient(90deg, #ff453a 25%, #ffd60a 25% 50%, #30d158 50% 75%, #0a84ff 75%) border-box;
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
}

.search-submit:hover {
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #ff453a 25%, #ffd60a 25% 50%, #30d158 50% 75%, #0a84ff 75%) border-box;
}

.filter-toggle {
  color: var(--pp-baw-red);
  border: 2px solid #ff453a;
  background: rgba(255, 255, 255, .5);
  font-family: "Special Elite", cursive;
  font-weight: 400;
}

.filter-toggle:hover,
.filter-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, .84);
}

.detour-button {
  position: relative;
  color: var(--pp-baw-blue);
  border: 1px solid var(--pp-baw-blue);
  border-radius: 0;
  background: rgba(255, 255, 255, .5);
  font-family: "Cinzel", serif;
}

.detour-button::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--pp-baw-red) 33.333%, var(--pp-baw-orange) 33.333% 66.666%, var(--pp-baw-blue) 66.666%);
}

.detour-button > span:not(.pp-action-label) {
  color: var(--pp-baw-red);
}

.detour-button .pp-action-label,
.detour-button .pp-action-label span {
  color: inherit;
  font-size: inherit;
  font-style: normal;
  line-height: inherit;
}

.detour-button .pp-action-label,
.detour-button .pp-action-label .pp-type-character {
  font-family: inherit;
}

.detour-button:hover {
  color: var(--pp-baw-blue);
  background: rgba(255, 255, 255, .85);
}

/* Renvois du sommaire et filets des liens bibliographiques de PP. */
#quick-discovery {
  min-width: 0;
  column-gap: 1rem;
}

:is(#quick-discovery, #facets) .discovery-term,
.chip,
.card-tag,
#gesture-options button,
#gesture-toggle,
.globe-controls button,
.small-button,
.back-button,
.read-link,
.result-jump {
  color: var(--pp-baw-blue);
  border: 0;
  border-radius: 0;
  background: transparent;
}

:is(#quick-discovery, #facets) .discovery-term {
  padding: .2rem 0;
  font: 400 .9rem/1.45 "Manrope", sans-serif;
}

:is(#quick-discovery, #facets) .discovery-label,
.chip,
.card-tag,
#gesture-options button,
.small-button,
.back-button,
.read-link,
.result-jump,
.citation-actions a {
  text-decoration: underline;
  text-decoration-color: var(--pp-baw-orange);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

:is(#quick-discovery, #facets) .discovery-count {
  color: var(--pp-baw-red);
  align-self: flex-start;
  padding-top: .07em;
  font: 600 .69rem/1.45 "Cinzel", serif;
}

#facets .discovery-heading {
  color: var(--ink);
  font: 400 .84rem/1.45 "Archivo Black", sans-serif;
}

#facets .discovery-more > summary {
  color: var(--pp-baw-blue);
  font: 400 .79rem/1.5 var(--sans);
  list-style: none;
}

#facets .discovery-more > summary::-webkit-details-marker {
  display: none;
}

#facets .discovery-more > summary::before {
  display: inline-block;
  margin-inline-end: .45em;
  color: var(--pp-baw-red);
  content: "›";
}

#facets .discovery-more[open] > summary::before {
  transform: rotate(90deg);
}

.chip,
.card-tag,
#gesture-options button,
.small-button,
.back-button,
.read-link,
.result-jump {
  padding-inline: 0;
  font-family: var(--sans);
}

.chip,
.card-tag[aria-pressed="true"],
#gesture-options button[aria-pressed="true"] {
  color: var(--pp-baw-red);
  border-color: transparent;
  background: transparent;
  font-weight: 700;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

#gesture-options,
.active-filters,
.card-tags {
  column-gap: .8rem;
}

#gesture-toggle,
.globe-controls button {
  font-family: var(--serif);
}

.globe-controls button {
  font-size: 1.4rem;
}

:is(#quick-discovery, #facets) .discovery-term:is(:hover, :focus-visible) .discovery-label,
:is(.chip, .card-tag, .small-button, .back-button, .read-link, .result-jump, .citation-actions a):is(:hover, :focus-visible),
:is(#gesture-options button, #gesture-toggle, .globe-controls button, #facets summary):is(:hover, :focus-visible) {
  color: var(--pp-baw-red);
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: .18em;
}

:is(#quick-discovery, #facets) .discovery-term:focus-visible,
:is(.chip, .card-tag, .small-button, .back-button, .read-link, .result-jump, .citation-actions a):focus-visible,
:is(#gesture-options button, #gesture-toggle, .globe-controls button, #facets summary):focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

@media (max-width: 670px) {
  #quick-discovery {
    column-gap: .7rem;
  }

  :is(#quick-discovery, #facets) .discovery-term {
    font-size: .84rem;
  }
}

[data-section="GBD"] :is(.article-meta, .article-title, .article-lead, .article-evidence, .citation-list) {
  font-family: "Archivo", sans-serif;
}

[data-section="GBD"] :is(.issue-number, h2, h3, h4) {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
}

[data-section="GBD"] .issue-number {
  color: #0a84ff;
}

[data-section="LEAS"] :is(.article-meta, .article-title, .article-lead, .article-evidence, h2, h3, h4, .issue-number) {
  font-family: "Special Elite", cursive;
  font-weight: 400;
}

[data-section="LEAS"] .issue-number {
  color: #ff453a;
}

[data-section="BAW"] :is(.article-meta, .article-title, .article-lead, .article-evidence) {
  font-family: "Manrope", sans-serif;
}

[data-section="BAW"] :is(h2, h3, h4, .issue-number) {
  font-family: "Cinzel", serif;
}

[data-section="BAW"] .issue-number {
  color: var(--pp-baw-red);
  font-weight: 600;
  letter-spacing: .02em;
}

[data-section="BAW"] :is(h3, h4) {
  color: var(--pp-baw-blue);
  font-weight: 400;
}

.result-card[data-section] .issue-number::after {
  content: ".";
  padding: 0;
}

@media (max-width: 800px) {
  .site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: .95rem;
  }

  .site-header nav a {
    margin-right: 10px;
    margin-bottom: 18px;
    white-space: normal;
  }

  main.shell {
    padding-top: 3px;
  }
}

@media (max-width: 600px) {
  .intro h1 {
    font-size: 1.18rem;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .site-header, .site-footer {
    width: 72vw;
    max-width: 72vw;
    margin-inline: auto;
    padding: 12px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp-type-character {
    transition: none;
  }
}
