/* © Camarade Agency (camarade.agency) */
/* -------------------------------------------------------------------------- */
/* GLOSSARY                                                                   */
/* -------------------------------------------------------------------------- */
/* Trigger term inline span */
.glossary-term {
  display: inline;
  cursor: pointer;
  border-bottom: 1px dashed currentColor;
}
/* Popover — structural rules (box, arrow, close button) shared via .ca-popover
   in assets/popover.css. This file only keeps what's specific to glossary. */
#glossary-popover {
  width: 320px;
}
.glossary-popover-definition {
  font-size: .9em;
  color: var(--e-global-color-text);
  line-height: var(--e-global-typography-text-line-height);
}
.glossary-popover-link {
  display: inline-block;
  font-size:.8em;
  font-weight:bold;
  font-family: var(--e-global-typography-primary-font-family), Sans-serif;
  text-transform: uppercase;
}
.glossary-popover-link i {
  margin-right:10px;
}
/* -------------------------------------------------------------------------- */
/* WIDGET — 2 colonnes : navigation (thèmes + alphabet) / définitions         */
/* -------------------------------------------------------------------------- */
.glossary-entry {
  scroll-margin-top: calc(var(--header-height-shrink, 50px) + 20px);
  padding:20px;
  border:1px solid #C8D5DC;
  display:flex;
  flex-direction:column;
  gap:15px;
  border-radius:4px;
}
/* Applied by assets/glossary.js when the URL points directly at one word
   entry (#mot-{slug}), so the reader can actually see which entry they were
   sent to, not just find it already visible like the others by default. */
.glossary-entry.is-target {
  border-color: var(--e-global-color-primary);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--e-global-color-primary) 25%, transparent);
}
.glossary-entry-title-row {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.glossary-entry-title {
  margin:0;
}
.glossary-entry-subtitle {
  display:block;
  font-size:.7em;
}
.glossary-entry .nav_link {
  font-size:.8em;
  margin-block-start:7.5px;
}
.glossary-entry-definition {
  color: var(--e-global-color-text);
  line-height: var(--e-global-typography-text-line-height);
  line-height: var(--e-global-typography-text-line-height);
}
.glossary-entry-definition > *:last-child {
  margin-bottom: 0;
  margin-block-end: 0;
}
.glossary-widget {
  display:grid;
  grid-template-columns: minmax(max-content, 320px) 1fr;
  gap:60px;
  align-items: start;
}
@media (max-width: 767px) {
  .glossary-widget {
    grid-template-columns: 1fr;
  }
}
.glossary-nav {
  display: flex;
  flex-direction: column;
  gap:30px;
}
.glossary-widget-nav {
  position: sticky;
  top:65px;
}
.glossary-nav-title {
  font-size: .8em !important;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--e-global-color-text);
  font-family: var(--e-global-typography-primary-font-family), Sans-serif;
  margin: 0 0 7.5px 0;
}
.glossary-nav-thema {
  display: flex;
  flex-direction: column;
}
/* Pill-style toggle buttons for thema filtering — same visual "head" as the
   timeline toolbar's theme toggles (assets/timeline.css), but its own
   classes : no dependency between the two modules, just a shared look. */
.glossary-toggle-themas {
  display:flex;
  flex-direction:column;
  gap:15px;
  list-style:none;
  margin:0;
  padding:0;
  width:100%;
}
.glossary-toggle-thema {
  display: flex;
  align-items: center;
  width: 100%;
  padding:0;
  overflow: hidden;
  font-weight:900;
  cursor: pointer;
  gap:5px;
  transition: box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.glossary-toggle-thema i {
  display:none;
}
.glossary-toggle-thema.is-active {
  color: var(--e-global-color-primary);
}
.glossary-toggle-thema.is-active i {
  display:inline-block;
}
.glossary-toggle-thema:hover {
  color: var(--e-global-color-primary);
}
.glossary-toggle-thema:focus-visible {
  outline: 2px solid var(--e-global-color-primary);
  outline-offset: 2px;
}
.glossary-letters-list {
  display: flex;
  flex-wrap: wrap;
  gap:7.5px;
  list-style: none;
  margin: 0;
  /* width:0 removes this list from the column's max-content calculation
     (a flex-wrap row otherwise reports the sum of ALL unwrapped items as its
     intrinsic width, which would blow up the sidebar) — min-width:100% then
     restretches it to the column's final resolved width once known. */
  width: 0;
  min-width: 100%;
  padding: 0;
}
.glossary-letter {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #C8D5DC;
  background: #fff;
  color: var(--e-global-color-text);
  font-size: .8em;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
  transition: box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.glossary-letter:hover {
  box-shadow: 0px 0px 0px 5px rgba(0,0,0,0.2);
  border-color:var(--e-global-color-text);
}
.glossary-letter.is-active {
  background: var(--e-global-color-primary);
  border-color: var(--e-global-color-primary);
  color: #fff;
}
.glossary-letter.is-active:hover {
  box-shadow: 0px 0px 0px 5px color-mix(in srgb, var(--e-global-color-primary) 20%, transparent);
}
.glossary-letter:focus-visible {
  outline: 2px solid var(--e-global-color-primary);
  outline-offset: 2px;
}
.glossary-widget-results {
  display: flex;
  flex-direction: column;
  gap:30px;
}
.glossary-no-results {
  display: none;
  font-style: italic;
  color: color-mix(in srgb, var(--e-global-color-text) 65%, transparent);
}
/* Mobile : nav toggle + dépliable en flux normal */
.glossary-nav-toggle {
  display: none;
}
@media (max-width: 767px) {
  .glossary-nav-toggle {
    display: flex;
    align-items: center;
    gap:10px;
    background-color: #000;
    border: 1px solid #000;
    color: #fff;
    padding: 10px 15px;
    cursor: pointer;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: bold;
    font-size:1em;
    text-transform:uppercase;
    transition: box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
  }
  .glossary-widget-nav.is-open .glossary-nav-toggle {
    border-color: var(--e-global-color-primary);
    background-color: var(--e-global-color-primary);
  }
  .glossary-nav-toggle:hover {
    box-shadow: 0px 0px 0px 5px rgba(0,0,0,0.2);
  }
  .glossary-widget-nav.is-open .glossary-nav-toggle:hover {
    box-shadow: 0px 0px 0px 5px color-mix(in srgb, var(--e-global-color-primary) 20%, transparent);
  }
  .glossary-widget-nav.is-open .glossary-nav-toggle:focus-visible {
    outline: 2px solid var(--e-global-color-primary);
    outline-offset: 2px;
  }
  .glossary-widget-nav {
    position:relative;
    top:0;
  }
  .glossary-widget-nav .glossary-nav {
    display: none;
  }
  .glossary-widget-nav.is-open {
    border:1px solid #C8D5DC;
  }
  .glossary-widget-nav.is-open .glossary-nav {
    border-top:1px solid #C8D5DC;
    display: flex;
    padding:15px;
  }
}
/* -------------------------------------------------------------------------- */
/* [glossary_thema] SHORTCODE — standalone themed list, no nav                */
/* Masonry-style via CSS columns : entries pack top-to-bottom per column      */
/* instead of a fixed-row grid, so uneven definition lengths don't leave gaps.*/
/* -------------------------------------------------------------------------- */
.glossary-thema-block {
  column-count: 3;
  column-gap: 60px;
}
.glossary-thema-block .glossary-entry {
  margin-bottom: 30px;
  break-inside: avoid; /* never split a single entry across two columns */
}
@media (max-width: 1024px) {
  .glossary-thema-block {
    column-count: 2;
  }
  .glossary-thema-block .glossary-entry {
    margin-bottom:0;
  }
}
@media (max-width: 767px) {
  .glossary-thema-block {
    column-count: 1;
  }
}
