/* Mise en page du hub Psychologie (Monde : campus /hazen/worlds/campus.css) */
.hz-header {
  height: auto;
  min-height: var(--hz-header-h);
  padding-block: var(--hz-space-1);
}

.hub-bar,
.hub-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--hz-space-3);
}

.hub-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--hz-text);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.hub-nav {
  display: flex;
  align-items: center;
  gap: var(--hz-space-3);
}

.hub-nav .hz-nav-link {
  min-height: 44px;
}

.hub-lang-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hub-lang-select {
  appearance: none;
  min-height: 44px;
  padding: 0 2rem 0 0.75rem;
  border: 1px solid var(--hz-line-strong);
  border-radius: var(--hz-radius-sm);
  background: var(--hz-surface);
  color: var(--hz-text);
  font-family: inherit;
  font-size: var(--hz-text-xs);
  font-weight: 550;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color var(--hz-dur-fast) var(--hz-ease-out);
}

.hub-lang-select:hover {
  border-color: var(--hz-text);
}

.hub-lang-chevron {
  position: absolute;
  right: 0.65rem;
  color: var(--hz-text-2);
  pointer-events: none;
}

/* ─── Premier écran : titre à gauche, rayonnage des huit livres à droite ─── */
.hub-hero {
  padding-block: clamp(2.25rem, 1.5rem + 3vw, 4.5rem) clamp(2.5rem, 1.75rem + 3vw, 4.5rem);
}

.hub-hero__inner {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  padding-inline: var(--hz-gutter);
}

.hub-hero__copy {
  max-width: var(--hz-text-max);
}

.hub-hero__copy > * + * {
  margin-top: var(--hz-space-4);
}

.hub-hero__copy .hz-h1 {
  font-size: clamp(1.875rem, 1.35rem + 1.4vw, 2.625rem);
  hyphens: auto;
  overflow-wrap: break-word;
}

.hub-lead {
  max-width: 42ch;
}

/* Le rayonnage : deux colonnes sur téléphone, 4x2 sur tablette, 8 côte à côte sur grand écran */
.hub-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hz-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: stretch;
}

.hub-shelf__item {
  display: flex;
  min-width: 0;
}

@keyframes hub-book-settle {
  from {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hub-shelf__item {
    animation: hub-book-settle var(--hz-dur-slow) var(--hz-ease-out) backwards;
    animation-delay: calc(var(--i, 0) * 35ms);
  }
}

/* Une couverture de livre de poche : couleur pleine de la discipline, titre, une ligne */
.hub-book {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--hz-space-4);
  width: 100%;
  min-height: 12.25rem;
  padding: 0.9rem 0.8rem 0.85rem 0.95rem;
  border-radius: var(--hz-radius-sm);
  border-left: 1px solid color-mix(in srgb, var(--hz-on-accent) 28%, transparent);
  background: var(--hz-accent);
  color: var(--hz-on-accent);
  text-decoration: none;
  transition: transform var(--hz-dur-fast) var(--hz-ease-out);
}

.hub-book::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 4px;
  width: 1px;
  background: color-mix(in srgb, var(--hz-on-accent) 22%, transparent);
  pointer-events: none;
}

.hub-book:hover,
.hub-book:focus-visible {
  transform: translateY(-4px);
}

.hub-book:focus-visible {
  outline: 2px solid var(--hz-text);
  outline-offset: 3px;
}

.hub-book__title {
  display: block;
  font-family: var(--hz-font-display);
  font-variation-settings: var(--hz-display-settings);
  font-weight: var(--hz-display-weight);
  font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.125rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  hyphens: auto;
  overflow-wrap: break-word;
}

.hub-book__line {
  display: block;
  padding-top: var(--hz-space-2);
  border-top: 1px solid color-mix(in srgb, var(--hz-on-accent) 30%, transparent);
  font-family: var(--hz-font-sans);
  font-variation-settings: var(--hz-text-settings);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--hz-on-accent);
  overflow-wrap: break-word;
}

/* ─── Sections suivantes : marge rouge et fonctionnement ─── */
.hub-band {
  border-top: 1px solid var(--hz-line);
}

.hub-themes {
  display: grid;
  gap: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  max-width: 44rem;
}

.hub-theme {
  display: grid;
  gap: var(--hz-space-2);
}

.hub-theme__title {
  margin: 0;
}

.hub-theme__text,
.hub-how-text {
  margin: 0;
  color: var(--hz-text-2);
  font-size: var(--hz-text-body);
  line-height: var(--hz-leading-body);
  /* em, not ch: a zero is wide in Commissioner, so 65ch ran about 88 characters. */
  max-width: 33em;
}

.hub-how-grid {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 2.5rem);
  align-items: start;
}

.hz-footer {
  padding-bottom: 5rem;
}

.hz-footer p {
  margin: 0;
}

/* Tablette : deux rangées de quatre livres */
@media (min-width: 48rem) {
  .hub-shelf {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hz-space-4);
  }

  .hub-book {
    min-height: 14.5rem;
    padding: 1.1rem 0.9rem 1rem 1.05rem;
  }

  .hub-how-grid {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  }
}

/* Grand écran : titre sur le tiers gauche, huit couvertures côte à côte jusqu'au bord droit */
@media (min-width: 75rem) {
  .hub-hero__inner {
    grid-template-columns: clamp(17rem, 22vw, 21.5rem) minmax(0, 1fr);
    gap: clamp(1.5rem, 2.2vw, 2.75rem);
    align-items: end;
    padding-left: max(var(--hz-gutter), calc((100% - var(--hz-page-max)) / 2));
    padding-right: clamp(0.75rem, 1.2vw, 1.5rem);
  }

  .hub-hero__copy {
    padding-bottom: var(--hz-space-3);
  }

  .hub-shelf {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: clamp(0.375rem, 0.55vw, 0.625rem);
    padding-bottom: var(--hz-space-3);
    border-bottom: 2px solid var(--hz-text);
  }

  .hub-book {
    min-height: clamp(16.5rem, 14rem + 4vw, 19.5rem);
    padding: 0.75rem 0.5rem 0.7rem 0.625rem;
  }

  .hub-book__title {
    font-size: clamp(0.75rem, 0.35rem + 0.42vw, 0.9375rem);
    line-height: 1.16;
  }

  .hub-book__line {
    font-size: clamp(0.7rem, 0.56rem + 0.14vw, 0.78rem);
    line-height: 1.32;
  }
}
