/* One centered frontispiece; the painting and all native hit shapes keep their geometry. */
body[data-mondes-hub] .hub-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "frontispiece" "painting";
  align-items: start;
  justify-items: center;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding-block: clamp(1.2rem, 2.5vw, 2rem);
}
.hub-frontispiece {
  grid-area: frontispiece;
  width: min(100%, 70rem);
  text-align: center;
}
.hub-intro-copy { min-width: 0; }
body[data-mondes-hub] .hub-intro .eyebrow[hidden] { display: none; }
body[data-mondes-hub] .hub-intro h1 {
  max-width: none;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  text-wrap: balance;
}
body[data-mondes-hub] .hub-intro .intro-text { margin-inline: auto; }
body[data-mondes-hub] .hub-intro .companion {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: .85rem;
  width: min(100%, 41rem);
  max-width: none;
  flex: none;
  margin: .7rem auto 0;
  text-align: left;
}
body[data-mondes-hub] .hub-intro .companion > div {
  min-width: 0;
}
body[data-mondes-hub] .hub-intro .companion img {
  display: block;
  width: clamp(48px, 5vw, 66px);
  height: auto;
}
body[data-mondes-hub] .hub-intro .companion blockquote {
  display: flex;
  align-items: center;
  min-height: 3em;
  font-size: clamp(.9rem, 1.3vw, 1rem);
  line-height: 1.5;
}
body[data-mondes-hub] .hub-intro .signature { font-size: .6875rem; line-height: 1.5; }
body[data-mondes-hub] .hub-intro .companion-next {
  position: relative;
  display: grid;
  place-items: center;
  align-self: start;
  justify-self: start;
  width: 76px;
  height: 76px;
  min-width: 48px;
  min-height: 48px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--hub-gold);
  cursor: pointer;
}
body[data-mondes-hub] .companion-next:focus-visible {
  outline: 2px solid var(--hub-gold);
  outline-offset: 4px;
}
body[data-mondes-hub] .companion-next:disabled { cursor: default; }
body[data-mondes-hub] .hub-intro .companion-next,
body[data-mondes-hub] .hub-intro .companion-next img {
  transform: none;
  animation: none;
  transition: none;
}
.hub-painting-group {
  grid-area: painting;
  align-self: start;
  justify-self: center;
  min-width: 0;
  width: min(100%, 1120px);
}
.hub-tool-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.35rem, 1.2vw, 1rem);
  padding-bottom: .85rem;
}
.hub-worlds-art {
  container-type: inline-size;
  --rail-side: clamp(20px, 6.5cqw, 68px);
  --rail-top: clamp(16px, 4.8cqw, 50px);
  --rail-bottom: clamp(17px, 5.5cqw, 57px);
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
}
.hub-gallery-frame {
  position: relative;
  border-style: solid;
  border-color: #35403c;
  border-width: var(--rail-top) var(--rail-side) var(--rail-bottom);
  border-image: url("/assets/revisions-20261103/cadre-galerie.webp") 11.15% 9% 14.1% 8.9% / 1 stretch;
  background: #30231d;
  box-shadow: 0 3px 5px #020506a1, 0 16px 26px -12px #020506d9;
}
.hub-gallery-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 2px 3px 7px #1c100b91;
}
.hub-gallery-frame > img {
  display: block;
  height: auto;
  width: 100%;
  aspect-ratio: 1672 / 941;

}
/* Each SVG uses a native-pixel viewBox around its object. Only the silhouette
   receives pointer events; the visible buttons remain generous touch targets. */
body[data-mondes-hub] .hub-object-trigger {
  position: absolute;
  left: calc(var(--object-x) * 100% / 1672);
  top: calc(var(--object-y) * 100% / 941);
  z-index: 2;
  display: block;
  width: calc(var(--object-width) * 100% / 1672);
  height: calc(var(--object-height) * 100% / 941);
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #fff0d2;
  pointer-events: none;
}
.hub-trophies-trigger { --object-x: 24; --object-y: 424; --object-width: 211; --object-height: 268; }
.hub-catalogue-trigger { --object-x: 209; --object-y: 624; --object-width: 986; --object-height: 309; }
.hub-globe-trigger { --object-x: 1531; --object-y: 371; --object-width: 141; --object-height: 290; }
.hub-object-art { display: block; width: 100%; height: 100%; pointer-events: none; }
.hub-object-hit { pointer-events: fill; cursor: pointer; }
.hub-object-lit { opacity: var(--hub-object-opacity, 0); filter: brightness(1.35) saturate(1.08); pointer-events: none; }
.hub-object-focus {
  opacity: 0;
  fill: none;
  stroke: #ffebbc;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px #101819);
  pointer-events: none;
}
body[data-mondes-hub] .hub-object-trigger:focus-visible { outline: none; }
.hub-object-trigger:focus-visible .hub-object-focus { opacity: 1; }
.hub-painting-group:has([data-hub-tool="trophies"]:is(:focus-visible, :active)) [data-hub-tool="trophies"],
.hub-painting-group:has([data-hub-tool="catalogue"]:is(:focus-visible, :active)) [data-hub-tool="catalogue"],
.hub-painting-group:has([data-hub-tool="atlas"]:is(:focus-visible, :active)) [data-hub-tool="atlas"] {
  --hub-object-opacity: 1;
  --hub-tool-color: #fff3d9;
  --hub-tool-glow: #d6b46e2b;
}
body[data-mondes-hub] #atlas-view { scroll-margin-block-start: 8rem; }
.hub-light-defs { position: absolute; pointer-events: none; }
.hub-door-choices {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: clamp(.35rem, 1.2vw, 1rem);
  padding-top: .85rem;
}
.hub-door-choices:not(:has(.hub-door:not([hidden]))) { display: none; }
body[data-mondes-hub] .hub-door,
body[data-mondes-hub] .hub-tool {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  padding: .3rem .8rem .3rem .45rem;
  background: linear-gradient(105deg, #b3894314, transparent 85%);
  color: #ead6ac;
  border: 0;
  border-block: 1px solid;
  border-image: linear-gradient(90deg, transparent, #bda06670 25%, #bda06666 70%, transparent) 1;
  font: 400 clamp(.94rem,1.65vw,1.28rem)/1.2 Georgia, serif;
  cursor: pointer;
}
body[data-mondes-hub] .hub-door,
body[data-mondes-hub] .hub-tool {
  justify-content: center;
  min-width: 0;
}
body[data-mondes-hub] .hub-tool {
  background: linear-gradient(105deg, var(--hub-tool-glow, #b3894314), transparent 85%);
  color: var(--hub-tool-color, #ead6ac);
}
body[data-mondes-hub] .hub-tool[aria-pressed=true] { color: #f6dbab; }
.hub-tool-title { white-space: nowrap; }
.hub-door-title { min-width: 0; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
body[data-mondes-hub] .hub-door[hidden] { display: none; }
.hub-insignia {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid #c4a16485;
  border-radius: 50%;
  background: radial-gradient(ellipse at 35% 22%, #cfab6e29, #0f191b 85%);
  color: #eacd92;
}
.hub-insignia svg { display: block; width: 63%; height: 63%; }
.hub-door-arrow { color: #c1a16e; margin-left: .15rem; }
.hub-arch {
  position: absolute;
  inset: var(--rail-top) auto auto var(--rail-side);
  width: calc(100% - 2 * var(--rail-side));
  height: auto;
  aspect-ratio: 1672 / 941;
  pointer-events: none;
}
.hub-arch-hit { pointer-events: fill; cursor: pointer; }
.hub-lit-paint {
  opacity: 0;
  filter: brightness(1.72) saturate(1.16);
}
.hub-door:focus-visible .hub-lit-paint, .hub-door:active .hub-lit-paint { opacity: 1; }
.hub-door:focus-visible, .hub-tool:focus-visible { outline: 2px solid var(--hub-gold); outline-offset: 3px; }
@media (hover: hover) {
  .hub-painting-group:has([data-hub-tool="trophies"]:hover) [data-hub-tool="trophies"],
  .hub-painting-group:has([data-hub-tool="catalogue"]:hover) [data-hub-tool="catalogue"],
  .hub-painting-group:has([data-hub-tool="atlas"]:hover) [data-hub-tool="atlas"] {
    --hub-object-opacity: 1;
    --hub-tool-color: #fff3d9;
    --hub-tool-glow: #d6b46e2b;
  }
  .hub-door:hover .hub-lit-paint { opacity: 1; }
  body[data-mondes-hub] .hub-door:hover { color: #fff3d9; }
}
@media (prefers-reduced-motion: no-preference) {
  .hub-object-lit { transition: opacity 180ms ease-in-out; }
  .hub-lit-paint { transition: opacity 350ms ease-in-out; }
}
@media (max-width: 820px) {
  body[data-mondes-hub] .hub-intro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "frontispiece" "painting";
    row-gap: .9rem;
  }
  body[data-mondes-hub] .hub-intro h1 { max-width: none; }
}
@media (max-width: 620px) {
  body[data-mondes-hub] .hub-intro { padding-block: 1rem .7rem; }
  body[data-mondes-hub] .hub-intro .companion { grid-template-columns: 60px minmax(0, 1fr); gap: .65rem; margin-top: .5rem; }
  body[data-mondes-hub] .hub-intro .companion-next { width: 60px; height: 60px; }
  body[data-mondes-hub] .hub-intro .companion blockquote { min-height: 4.5em; }
  .hub-tool-choices { gap: .35rem; padding-bottom: .65rem; }
  .hub-door-choices { gap: .35rem; }
  body[data-mondes-hub] .hub-door,
  body[data-mondes-hub] .hub-tool { gap: .35rem; padding-inline: .3rem; font-size: .91rem; }
  .hub-insignia { width: 1.45rem; height: 1.45rem; }
  .hub-door-arrow { display: none; }
}
@media (max-width: 420px) {
  body[data-mondes-hub] .hub-door,
  body[data-mondes-hub] .hub-tool { flex-direction: column; gap: .25rem; padding: .45rem .2rem; }
  .hub-door-title { display: flex; align-items: center; justify-content: center; min-height: 2.4em; }
}

