.constellation {
  --nuit: #091626;
  --ivoire: #f7f3e8;
  --miel: #f2d799;
  position: relative;
  background: radial-gradient(ellipse at 15% 56%, #142c45 0, #0c1d31 37%, var(--nuit) 78%);
  color: var(--ivoire);
  padding-block: clamp(2.8rem, 6vw, 6.25rem);
}
.ancienne-ancre { position: absolute; inset: 0 auto auto 0; }
#approche-titre {
  padding-bottom: clamp(1.5rem, 3.5vw, 3.1rem);
  font: 400 clamp(3.2rem, 6.5vw, 6.5rem)/1 Georgia, serif;
  letter-spacing: -.06em;
}
#approche-titre em { color: var(--miel); font: italic 1em/1 Georgia, serif; }
.atlas { border-block: 1px solid #76899d66; }
.atlas.est-interactif {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}
.atlas [hidden] { display: none; }
.atlas-ciel { position: relative; isolation: isolate; min-width: 0; }
.carte { position: relative; width: 100%; overflow: hidden; background: #10223a; }
.carte-fond {
  display: block;
  width: 100%;
  height: auto;
  min-height: clamp(19rem, 32vw, 29rem);
  aspect-ratio: 1.35;
  object-fit: cover;
  object-position: var(--noyau-x, 66.6%) var(--noyau-y, 44.2%);
  transform-origin: var(--noyau-x, 66.6%) var(--noyau-y, 44.2%);
}
.carte::after {
  content: ""; pointer-events: none; position: absolute; inset: 0;
  background: linear-gradient(0deg, #0a172bd1, transparent 25%, transparent 85%, #0b1b304f),
              linear-gradient(90deg, #08172830, #07132505 40%, #08172852);
}
.carte-trace, .carte-etoiles { position: absolute; width: 100%; height: 100%; inset: 0; z-index: 1; }
.carte-trace { pointer-events: none; overflow: visible; }
.carte-trace polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trace-entiere { stroke: #fff2ceba; stroke-width: 1.35; stroke-dasharray: 2 5; filter: drop-shadow(0 1px 1px #091423); }
.trace-parcourue { stroke: #ffe1a0; stroke-width: 1.8; filter: drop-shadow(0 0 3px #fce4a77a); }
.voyageur {
  position: absolute; z-index: 1; width: .35rem; height: .35rem; border-radius: 50%;
  background: #fffbea; box-shadow: 0 0 .5rem .14rem #ffe1a0; pointer-events: none;
  transform: translate(-50%, -50%); opacity: 0;
}
.etoile {
  position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center;
  width: 2.85rem; height: 2.85rem; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #fff7d9; touch-action: manipulation;
}
.etoile::before, .etoile::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; }
.etoile::before {
  width: 2.1rem; height: 2.1rem;
  background: radial-gradient(circle, #ffe7a8a3 0, #dcba6545 32%, transparent 69%);
}
.etoile::after {
  width: 1.6rem; height: 1.6rem; border: 1px solid transparent;
  transition: border-color .25s, transform .25s;
}
.etoile[aria-selected="true"]::after {
  border-color: #fff1c6; transform: scale(1.26); box-shadow: 0 0 0 4px #fff0bb20, inset 0 0 8px #ffdb9838;
}
.etoile:hover::after { border-color: #fff0bd; }
.etoile .rayon {
  width: 1.12rem; height: 1.12rem; background: #fff8d9;
  clip-path: polygon(50% 0,58% 35%,79% 21%,67% 43%,100% 50%,64% 58%,78% 78%,56% 66%,50% 100%,43% 66%,21% 79%,34% 57%,0 50%,34% 43%,22% 22%,43% 35%);
}
.etoile[aria-selected="true"] .rayon { width: 1.45rem; height: 1.45rem; background: #fff8dc; }
.etoile .numero {
  position: absolute; left: 50%; top: calc(50% + 1.17rem); transform: translateX(-50%);
  font: 600 .86rem/1.15 "Source Sans 3", sans-serif; font-variant-numeric: tabular-nums;
  color: #fff6de; padding: .11rem .27rem; border-radius: .2rem; background: #07172bba;
}
.atlas-lecture {
  display: flex; flex-direction: column; justify-content: center; min-width: 0;
  padding: clamp(1.6rem, 3vw, 2.8rem) 0 clamp(1.5rem, 2.6vw, 2.3rem) clamp(1.6rem, 3.6vw, 3.9rem);
}
.atlas:not(.est-interactif) .atlas-lecture { padding-left: 0; max-width: 63ch; margin-inline: auto; }
.atlas:not(.est-interactif) .chapitre + .chapitre { margin-top: 2.2rem; }
.est-interactif .chapitres { display: grid; }
.est-interactif .chapitre { grid-area: 1 / 1; scroll-margin-top: 1rem; }
.est-interactif .chapitre[inert] { visibility: hidden; }
.chapitre .repere {
  color: var(--miel); font-size: .9rem; line-height: 1.3; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .85rem;
}
.chapitre h3 { font: 400 clamp(1.8rem, 2.6vw, 2.8rem)/1.11 Georgia, serif; letter-spacing: -.036em; text-wrap: balance; }
.chapitre p:not(.repere) { color: #dce3e9; font-size: 1.1rem; line-height: 1.55; margin-top: .85em; }
@media (min-width: 54.01rem) {
  .atlas-ciel { position: sticky; top: 1rem; align-self: start; }
}
.chapitres-commandes { display: flex; align-items: center; gap: .75rem; margin-top: 1.6rem; }
.chapitres-commandes button {
  min-height: 2.75rem; padding: .5rem 1.2rem; line-height: 1.25;
  border: 1px solid #8395a6; border-radius: 4rem; background: transparent; color: var(--ivoire); font-weight: 570;
}
.chapitres-commandes .chapitre-apres { background: var(--miel); color: #172234; border-color: var(--miel); }
.chapitres-commandes button[aria-disabled="true"] { opacity: .45; cursor: default; }
.chapitres-commandes button:not([aria-disabled="true"]):hover { border-color: white; background: #263a50; }
.chapitres-commandes .chapitre-apres:hover { color: white; }
.constellation button:focus-visible { outline: 2px solid #ffdf93; outline-offset: 3px; }
.annonce-etape { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes ciel-derive { from { transform: scale(1.015); } to { transform: scale(1.05); } }
@keyframes lueur-etoile { from { opacity: .5; transform: scale(.85); } to { opacity: 1; transform: scale(1.23); } }
@keyframes ouverture-etape { from { opacity: .45; transform: translateY(.3rem); } to { opacity: 1; transform: none; } }
.carte-fond { animation: ciel-derive 18s ease-in-out alternate infinite paused; }
.etoile::before { animation: lueur-etoile 3s ease-in-out alternate infinite paused; animation-delay: var(--delai); }
.ciel-anime .carte-fond, .ciel-anime .etoile::before { animation-play-state: running; }

.ciel-anime .chapitre.actif { animation: ouverture-etape .32s ease-out; }
@media (max-width: 54rem) {
  .atlas.est-interactif { grid-template-columns: minmax(0, 1fr); }
  .carte-fond { min-height: 11rem; aspect-ratio: 2.2; }
  .atlas-lecture { padding: 1.6rem 0 1.8rem; }
  .chapitre { max-width: 65ch; }
}
@media (max-width: 34rem) {
  #approche-titre { font-size: clamp(2.6rem, 11vw, 3.5rem); }
  .carte-fond { aspect-ratio: 1.65; }
  .etoile { max-width: 23%; }
  .chapitre h3 { font-size: clamp(1.4rem, 7.5vw, 1.8rem); }
  .chapitre p:not(.repere) { font-size: 1.045rem; }
  .chapitres-commandes { flex-wrap: wrap; margin-top: 1.25rem; }
}
@media screen and (max-width: 54rem) {
  .est-interactif .chapitre[inert] { display: none; }
}
@media print {
  .constellation { color: black; background: white; padding: 1rem 0; }
  .constellation .atlas { display: block; border: 0; }
  .atlas-lecture, .est-interactif .chapitres { display: block; padding: 0; }
  .constellation .atlas-ciel, .constellation .chapitres-commandes { display: none; }
  .est-interactif .chapitre[inert] { visibility: visible; }
  .chapitre { margin-block: 1.3rem; break-inside: avoid; }
  .constellation p, .constellation em, .constellation strong { color: black !important; }
}
