/* ==========================================================================
   Pages lexique — préfixe .gl-  (/lexique et /lexique/:slug, voir js/pages/glossary.js)
   Le héros, les sections, la barre collante, les cartes de guides et le bandeau d'appel à l'action
   viennent de seo.css (classes seo-* et st-*).
   ========================================================================== */

/* ---------- Index : champ de filtre (dans le héros) ---------- */
.gl-search {
  display: flex; align-items: center; gap: 12px; max-width: 640px; height: 60px; margin-top: 28px; padding: 0 22px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: #fff; box-shadow: var(--shadow-sm);
  color: var(--muted); transition: box-shadow 0.2s, border-color 0.2s;
}
.gl-search:focus-within { border-color: var(--ink); box-shadow: var(--shadow); }
.gl-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: var(--fs-base); }
.gl-search input::placeholder { color: var(--faint); }
.gl-search input:focus, .gl-search input:focus-visible { outline: 0; box-shadow: none; }
.gl-search input::-webkit-search-decoration, .gl-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.gl-clear { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: -8px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); cursor: pointer; transition: background 0.15s, color 0.15s; }
.gl-clear:hover { background: var(--line); color: var(--ink); }
.gl-count { min-height: 1.5em; margin: 12px 0 0 8px; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Index : barre alphabétique (collante, basée sur .seo-jump) ---------- */
.gl-alpha .seo-jump-inner { gap: 4px; }
.gl-alpha a { min-width: 38px; padding: 8px 10px; text-align: center; }

/* ---------- Index : liste groupée par lettre ---------- */
.gl-list { padding-top: 16px; padding-bottom: 72px; }
.gl-group { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px 24px; padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.gl-letter { margin: 0; font-size: 2.75rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--brand); }
.gl-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 48px; margin: 0; padding: 0; list-style: none; }
.gl-item { min-width: 0; }
.gl-term { margin: 0 0 4px; font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.015em; }
.gl-term a { color: var(--ink); }
.gl-term a:hover { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.gl-aka { margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.gl-aka-label { font-weight: 600; }
.gl-short { margin: 0; line-height: 1.6; color: var(--ink-2); }
.gl-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 36px; padding: 22px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: #fff; }
.gl-empty p { flex: 1 1 320px; margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.gl-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* ---------- Terme : synonymes et abréviations (dans le héros) ---------- */
.gl-aka-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; }
.gl-aka-title { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.gl-aka-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gl-aka-list .chip { cursor: default; white-space: normal; }

/* ---------- Terme : corps et colonne latérale ---------- */
.gl-main { padding: 48px 0 64px; }
.gl-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(0, 320px); gap: 72px; justify-content: start; align-items: start; }
.gl-article { min-width: 0; }
.gl-aside { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gl-box { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.gl-box-title { margin: 0 0 14px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.gl-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gl-pills .chip { max-width: 100%; }
.gl-skills { display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; padding: 0; list-style: none; }
.gl-skill { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius); font-weight: 600; color: var(--ink); transition: background 0.15s; }
.gl-skill:hover { background: var(--surface); text-decoration: none; }
.gl-skill-label { flex: 1; min-width: 0; line-height: 1.3; }
.gl-skill > .icon { flex-shrink: 0; color: var(--muted); }
.gl-share { padding: 16px 22px; }

/* ---------- Terme : navigation précédent / suivant ---------- */
.gl-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gl-pager-link { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: box-shadow 0.2s, border-color 0.2s; }
.gl-pager-link:hover { box-shadow: var(--shadow-sm); border-color: var(--line-strong); text-decoration: none; }
.gl-pager-link > .icon { flex-shrink: 0; color: var(--muted); }
.gl-pager-next { grid-column: 2; justify-content: flex-end; text-align: right; }
.gl-pager-text { min-width: 0; line-height: 1.4; }
.gl-pager-text small { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.gl-pager-text strong { display: block; font-size: 1.125rem; overflow-wrap: anywhere; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .gl-layout { gap: 48px; }
}

@media (max-width: 960px) {
  .gl-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .gl-aside { position: static; }
  .gl-terms { gap: 26px 32px; }
}

@media (max-width: 744px) {
  .gl-search { height: 54px; margin-top: 22px; padding: 0 18px; }
  .gl-list { padding-bottom: 48px; }
  .gl-group { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 26px 0; scroll-margin-top: 52px; }
  .gl-letter { font-size: 2.25rem; }
  .gl-terms { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .gl-more { grid-template-columns: minmax(0, 1fr); }
  .gl-main { padding: 32px 0 44px; }
  .gl-box { padding: 18px; }
  .gl-pager { grid-template-columns: minmax(0, 1fr); }
  .gl-pager-next { grid-column: 1; }
  .gl-pager-link { padding: 16px 18px; }
  .gl-alpha a { min-width: 36px; padding: 8px; }
}
