/* ============================================================
   stars.css — la page « Stars »
   ------------------------------------------------------------
   Pas de barre de navigation, pas de pied de page : on est
   allongé, il n'y a que le ciel. Le peu d'interface qui reste
   s'efface au bout de quelques secondes d'immobilité.
   ============================================================ */

html, body {
  height: 100%;
  overflow: hidden;
  background: #020306;
}

/* Sans cela, un glissement un peu ample sélectionne le texte du
   HUD au passage et laisse une surbrillance bleue en travers du
   ciel. */
body.stars {
  user-select: none;
  -webkit-user-select: none;
}

/* On attrape le ciel pour le tourner : le curseur doit le dire. */
.ciel {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;          /* le glissement pilote la vue, pas le défilement */
}
body.tire .ciel { cursor: grabbing; }

/* ------------------------------------------------------------
   Interface, réduite au minimum
   ------------------------------------------------------------ */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1.1s ease;
}
#hud.efface { opacity: 0; }
#hud a, #hud button, #hud select { pointer-events: auto; cursor: pointer; }

.hud__haut,
.hud__bas {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 26px;
  flex-wrap: wrap;
}
.hud__haut { top: 0; }
.hud__bas { bottom: 0; justify-content: flex-end; }

.hud__retour {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: rgba(200, 214, 240, .62);
  font-size: .86rem;
  letter-spacing: .01em;
  transition: color .2s;
}
.hud__retour:hover { color: rgba(226, 238, 255, .95); }
.hud__retour kbd {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: .66rem;
  letter-spacing: .04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
  color: rgba(180, 198, 230, .7);
}

/* ------------------------------------------------------------
   Le titre de la section
   ------------------------------------------------------------
   Centré dans la fenêtre, pas dans l'espace restant, pour qu'il
   ne bouge pas selon la longueur du lien de sortie. Il vit dans
   le HUD : il s'efface donc comme le reste au bout de quelques
   secondes d'immobilité.
   ------------------------------------------------------------ */
.hud__titre {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--titre, "Space Grotesk", system-ui, sans-serif);
  font-size: 1.42rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: rgba(206, 220, 245, .74);
  white-space: nowrap;
  pointer-events: none;
}
.hud__astre {
  width: 15px; height: 15px;
  flex: none;
  fill: currentColor;
  color: rgba(150, 196, 255, .8);
  animation: titre-astre 5.5s ease-out infinite;
}

/* Le balayage du titre : un peu plus lent et plus large que
   celui de la navigation, à la mesure des lettres. */
.etincelle--titre::after {
  background-image: linear-gradient(
    102deg,
    transparent 38%,
    rgba(255, 255, 255, .98) 47%,
    rgba(186, 220, 255, .92) 53%,
    transparent 63%
  );
  background-size: 320% 100%;
  animation: filante-titre 5.5s linear infinite;
}

@keyframes filante-titre {
  0%   { background-position: 160% 0; }
  20%  { background-position: -85% 0; }
  100% { background-position: -85% 0; }
}
@keyframes titre-astre {
  0%   { opacity: .55; filter: none; }
  7%   { opacity: 1; filter: drop-shadow(0 0 7px rgba(160, 205, 255, .9)); }
  22%  { opacity: .55; filter: none; }
  100% { opacity: .55; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hud__astre { animation: none; }
  .etincelle--titre::after { animation: none; content: none; }
}

@media (max-width: 720px) {
  .hud__titre { font-size: 1.1rem; top: 14px; }
}

.hud__lieu {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: .76rem;
  color: rgba(160, 178, 210, .5);
  letter-spacing: .06em;
}

/* Commandes sans contour : un fond à peine perceptible suffit à
   les rendre cliquables sans poser de cadre sur le ciel. */
#hud select,
#hud button {
  background: rgba(10, 14, 24, .42);
  border: 0;
  border-radius: 5px;
  color: rgba(196, 212, 240, .62);
  font: inherit;
  font-size: .78rem;
  padding: 7px 11px;
  backdrop-filter: blur(7px);
  transition: color .25s, background .25s;
}
#hud select:hover,
#hud button:hover { background: rgba(18, 24, 40, .6); color: #eaf1ff; }

/* ------------------------------------------------------------
   Le mot d'accueil, qui s'en va tout seul
   ------------------------------------------------------------ */
#indice {
  position: fixed;
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  z-index: 11;
  text-align: center;
  color: rgba(198, 212, 240, .5);
  font-size: .92rem;
  line-height: 1.9;
  letter-spacing: .02em;
  pointer-events: none;
  opacity: 1;
  /* pas de pulsation : rien ne doit clignoter sur cette page */
  transition: opacity 2.4s ease;
}
#indice.efface { opacity: 0; }
#indice small {
  display: block;
  font-size: .76rem;
  color: rgba(150, 168, 200, .38);
  margin-top: 6px;
}

@media (max-width: 620px) {
  .hud__haut, .hud__bas { padding: 14px 16px; gap: 10px; }
  .hud__lieu { width: 100%; margin-left: 0; }
  #indice { bottom: 16vh; font-size: .84rem; }
}
