/* ================================================================
   Singularité — feuille de style partagée
================================================================ */

body {
  background-color: #000;
  font-weight: 300;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}
a { color: inherit; }

.navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  z-index: 1050;
}
.navbar-brand {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1rem; font-weight: 400;
}
.nav-link { letter-spacing: 0.05em; font-size: 0.9rem; }

/* ================================================================
   Page d'accueil : cosmos infini, centré sur le Soleil
================================================================ */
body.cosmos-page {
  height: 100vh;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.cosmos-distance {
  position: fixed;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1.25rem;
  text-transform: uppercase;
  z-index: 100;
  text-align: center;
  min-width: 14rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
  transition: border-color 0.2s ease;
}
.cosmos-distance.clickable { cursor: pointer; }
.cosmos-distance.clickable:hover { border-color: rgba(255, 255, 255, 0.55); }
.cosmos-distance .label {
  font-size: 0.6rem; opacity: 0.5;
  letter-spacing: 0.2em;
  display: block; margin-bottom: 0.2rem;
}
.cosmos-distance .value {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.orbit-dot {
  position: absolute;
  width: 7px; height: 7px;
  background: #ffffff;
  border-radius: 50%;
  margin-left: -3.5px;
  margin-top: -3.5px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95),
              0 0 18px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.25s ease;
}

.back-to-earth {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  font-weight: 300;
}
.back-to-earth:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.cosmos-center-line {
  position: fixed;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 1;
}

#cosmic-objects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.cosmic-marker {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  max-width: 48%;
}
.cosmic-marker.right {
  transform: translate(0, -50%);
  padding-left: 0.35rem;
}
.cosmic-marker.left {
  transform: translate(-100%, -50%);
  flex-direction: row-reverse;
  padding-right: 0.35rem;
}
.cosmic-marker .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin: 0 0.55rem;
  flex-shrink: 0;
  background: #fff;
}
.cosmic-marker .info { line-height: 1.25; min-width: 0; }
.cosmic-marker.left  .info { text-align: right; }
.cosmic-marker.right .info { text-align: left; }
.cosmic-marker .name {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: normal;
  word-break: break-word;
  max-width: 11em;
}
.cosmic-marker .dist {
  font-size: 0.65rem;
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
  white-space: nowrap;
}

/* Soleil : layout dédié, point pile au centre, label dessous */
.cosmic-marker.sun {
  flex-direction: column;
  transform: translate(-50%, -50%);
  align-items: center;
  text-align: center;
  padding: 0;
  max-width: 80%;
}
.cosmic-marker.sun .dot {
  width: 18px; height: 18px;
  margin: 0 0 0.6rem 0;
  background: radial-gradient(circle, #ffe082 0%, #fff8b0 60%, rgba(255, 248, 176, 0) 100%) !important;
  box-shadow: 0 0 18px rgba(255, 224, 130, 0.7);
}
.cosmic-marker.sun .info { text-align: center; }
.cosmic-marker.sun .name {
  letter-spacing: 0.25em;
  font-weight: 500;
}

.cosmic-marker.anecdotal { opacity: 0.55; }
.cosmic-marker.anecdotal .name {
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  .cosmic-marker .name { font-size: 0.65rem; max-width: 8em; }
  .cosmic-marker .dist { font-size: 0.6rem; }
  .cosmic-marker .dot  { width: 7px; height: 7px; margin: 0 0.45rem; }
  .cosmos-distance     { min-width: 12rem; }
}

.cosmos-hint {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;
  pointer-events: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  opacity: 0.55;
  transition: opacity 0.6s ease;
  width: 90%;
  max-width: 24rem;
}
.cosmos-hint p { margin: 0.4rem 0; }
.cosmos-hint.hidden { opacity: 0; }

/* ================================================================
   Page : système solaire
================================================================ */
.intro-soleil {
  padding: 6rem 1rem 4rem;
  text-align: center;
  /* border-bottom retirée : remplacée par .surface-line en flux juste après */
}
.intro-soleil h1 {
  font-size: 1.4rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 300;
  margin-bottom: 1rem;
}
.intro-soleil p {
  max-width: 28rem; margin: 0 auto;
  font-size: 0.85rem; line-height: 1.7;
  opacity: 0.6; letter-spacing: 0.03em;
}

/* Surface du Soleil : ligne blanche en flux, juste sous l'intro */
.surface-line {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  transition: opacity 0.5s ease;
}
.surface-line.faded {
  opacity: 0;
}

/* Extrémités de la surface : deux points fixes au bord de l'écran,
   visibles dès qu'on commence à scroller. Repère permanent. */
.surface-edge {
  position: fixed;
  top: 50%;
  width: 5px;
  height: 5px;
  background: white;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9),
              0 0 16px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.surface-edge.left  { left: 0; }
.surface-edge.right { right: 0; }
.surface-edge.visible { opacity: 1; }

.fixed-info {
  position: fixed;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  z-index: 1020;
  white-space: nowrap;
  text-align: center;
  min-width: 13rem;
}
.fixed-info .label { opacity: 0.5; font-size: 0.6rem; }
.fixed-info .value {
  font-size: 0.85rem; letter-spacing: 0.15em;
  margin-top: 0.2rem; display: block;
}

.space { position: relative; }
.planet {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.planet canvas { display: block; margin: 0 auto; vertical-align: top; }
.planet-label { margin-top: 1.5rem; }
.planet-label .name {
  font-size: 0.95rem; letter-spacing: 0.25em;
  text-transform: uppercase; font-weight: 400;
}
.planet-label .info {
  font-size: 0.7rem; letter-spacing: 0.1em;
  opacity: 0.5; font-variant-numeric: tabular-nums;
  margin-top: 0.3rem;
}
.fin-systeme {
  padding: 6rem 1rem; text-align: center;
  font-size: 0.85rem; opacity: 0.4;
  letter-spacing: 0.1em;
}

/* ================================================================
   Page : relativité
================================================================ */
.page-titre { padding-top: 5rem; text-align: center; }
.page-titre h1 {
  font-size: 1.4rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 300;
  margin-bottom: 1rem;
}
.page-intro {
  text-align: center; max-width: 32rem;
  margin: 0 auto 3rem;
  font-size: 0.9rem; line-height: 1.7;
  opacity: 0.7;
}
.clocks-wrapper {
  display: flex; flex-direction: column;
  gap: 1.5rem; margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .clocks-wrapper { flex-direction: row; gap: 2rem; }
}
.clock {
  flex: 1; text-align: center;
  padding: 2rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}
.clock-label {
  font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; opacity: 0.5;
  margin-bottom: 1.25rem;
  min-height: 2rem;
}
.clock-display {
  font-size: 1.8rem; font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
@media (min-width: 768px) { .clock-display { font-size: 2.2rem; } }
.clock-detail {
  margin-top: 1rem; font-size: 0.7rem;
  letter-spacing: 0.1em; opacity: 0.4;
  font-variant-numeric: tabular-nums;
}
.scenarios-title {
  font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; opacity: 0.5;
  margin-bottom: 1rem;
}
.scenario-btn {
  display: block; width: 100%; text-align: left;
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 1.25rem; margin-bottom: 0.5rem;
  letter-spacing: 0.05em; font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
}
.scenario-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}
.scenario-btn.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.7);
}
.scenario-name { font-size: 0.95rem; }
.scenario-detail {
  font-size: 0.75rem; opacity: 0.55;
  margin-top: 0.4rem; letter-spacing: 0.03em;
}
/* ================================================================
   SingularitÃ© â€” feuille de style partagÃ©e
================================================================ */

body {
  background-color: #000;
  font-weight: 300;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}
a { color: inherit; }

.navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  z-index: 1050;
}
.navbar-brand {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1rem; font-weight: 400;
}
.nav-link { letter-spacing: 0.05em; font-size: 0.9rem; }

/* ================================================================
   Page d'accueil : cosmos infini, centrÃ© sur le Soleil
================================================================ */
body.cosmos-page {
  height: 100vh;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.cosmos-distance {
  position: fixed;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1.25rem;
  text-transform: uppercase;
  z-index: 100;
  text-align: center;
  min-width: 14rem;
  font-variant-numeric: tabular-nums;
  user-select: none;
  transition: border-color 0.2s ease;
}
.cosmos-distance.clickable { cursor: pointer; }
.cosmos-distance.clickable:hover { border-color: rgba(255, 255, 255, 0.55); }
.cosmos-distance .label {
  font-size: 0.6rem; opacity: 0.5;
  letter-spacing: 0.2em;
  display: block; margin-bottom: 0.2rem;
}
.cosmos-distance .value {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.orbit-dot {
  position: absolute;
  width: 7px; height: 7px;
  background: #ffffff;
  border-radius: 50%;
  margin-left: -3.5px;
  margin-top: -3.5px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.95),
              0 0 18px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.25s ease;
}

.back-to-earth {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  font-weight: 300;
}
.back-to-earth:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.cosmos-center-line {
  position: fixed;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 1;
}

#cosmic-objects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.cosmic-marker {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  max-width: 48%;
}
.cosmic-marker.right {
  transform: translate(0, -50%);
  padding-left: 0.35rem;
}
.cosmic-marker.left {
  transform: translate(-100%, -50%);
  flex-direction: row-reverse;
  padding-right: 0.35rem;
}
.cosmic-marker .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin: 0 0.55rem;
  flex-shrink: 0;
  background: #fff;
}
.cosmic-marker .info { line-height: 1.25; min-width: 0; }
.cosmic-marker.left  .info { text-align: right; }
.cosmic-marker.right .info { text-align: left; }
.cosmic-marker .name {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: normal;
  word-break: break-word;
  max-width: 11em;
}
.cosmic-marker .dist {
  font-size: 0.65rem;
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
  white-space: nowrap;
}

/* Soleil : layout dÃ©diÃ©, point pile au centre, label dessous */
.cosmic-marker.sun {
  flex-direction: column;
  transform: translate(-50%, -50%);
  align-items: center;
  text-align: center;
  padding: 0;
  max-width: 80%;
}
.cosmic-marker.sun .dot {
  width: 18px; height: 18px;
  margin: 0 0 0.6rem 0;
  background: radial-gradient(circle, #ffe082 0%, #fff8b0 60%, rgba(255, 248, 176, 0) 100%) !important;
  box-shadow: 0 0 18px rgba(255, 224, 130, 0.7);
}
.cosmic-marker.sun .info { text-align: center; }
.cosmic-marker.sun .name {
  letter-spacing: 0.25em;
  font-weight: 500;
}

.cosmic-marker.anecdotal { opacity: 0.55; }
.cosmic-marker.anecdotal .name {
  font-style: italic;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  .cosmic-marker .name { font-size: 0.65rem; max-width: 8em; }
  .cosmic-marker .dist { font-size: 0.6rem; }
  .cosmic-marker .dot  { width: 7px; height: 7px; margin: 0 0.45rem; }
  .cosmos-distance     { min-width: 12rem; }
}

.cosmos-hint {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 3;
  pointer-events: none;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  opacity: 0.55;
  transition: opacity 0.6s ease;
  width: 90%;
  max-width: 24rem;
}
.cosmos-hint p { margin: 0.4rem 0; }
.cosmos-hint.hidden { opacity: 0; }

/* ================================================================
   Page : systÃ¨me solaire
================================================================ */
.intro-soleil {
  padding: 6rem 1rem 4rem;
  text-align: center;
  /* border-bottom retirÃ©e : remplacÃ©e par .surface-line en flux juste aprÃ¨s */
}
.intro-soleil h1 {
  font-size: 1.4rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 300;
  margin-bottom: 1rem;
}
.intro-soleil p {
  max-width: 28rem; margin: 0 auto;
  font-size: 0.85rem; line-height: 1.7;
  opacity: 0.6; letter-spacing: 0.03em;
}

/* Surface du Soleil : ligne blanche en flux, juste sous l'intro */
.surface-line {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
  transition: opacity 0.5s ease;
}
.surface-line.faded {
  opacity: 0;
}

/* ExtrÃ©mitÃ©s de la surface : deux points fixes au bord de l'Ã©cran,
   visibles dÃ¨s qu'on commence Ã  scroller. RepÃ¨re permanent. */
.surface-edge {
  position: fixed;
  top: 50%;
  width: 5px;
  height: 5px;
  background: white;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9),
              0 0 16px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.surface-edge.left  { left: 0; }
.surface-edge.right { right: 0; }
.surface-edge.visible { opacity: 1; }

.fixed-info {
  position: fixed;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  z-index: 1020;
  white-space: nowrap;
  text-align: center;
  min-width: 13rem;
}
.fixed-info .label { opacity: 0.5; font-size: 0.6rem; }
.fixed-info .value {
  font-size: 0.85rem; letter-spacing: 0.15em;
  margin-top: 0.2rem; display: block;
}

.space { position: relative; }
.planet {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.planet canvas { display: block; margin: 0 auto; vertical-align: top; }
.planet-label { margin-top: 1.5rem; }
.planet-label .name {
  font-size: 0.95rem; letter-spacing: 0.25em;
  text-transform: uppercase; font-weight: 400;
}
.planet-label .info {
  font-size: 0.7rem; letter-spacing: 0.1em;
  opacity: 0.5; font-variant-numeric: tabular-nums;
  margin-top: 0.3rem;
}
.fin-systeme {
  padding: 6rem 1rem; text-align: center;
  font-size: 0.85rem; opacity: 0.4;
  letter-spacing: 0.1em;
}

/* ================================================================
   Page : relativitÃ©
================================================================ */
.page-titre { padding-top: 5rem; text-align: center; }
.page-titre h1 {
  font-size: 1.4rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 300;
  margin-bottom: 1rem;
}
.page-intro {
  text-align: center; max-width: 32rem;
  margin: 0 auto 3rem;
  font-size: 0.9rem; line-height: 1.7;
  opacity: 0.7;
}
.clocks-wrapper {
  display: flex; flex-direction: column;
  gap: 1.5rem; margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .clocks-wrapper { flex-direction: row; gap: 2rem; }
}
.clock {
  flex: 1; text-align: center;
  padding: 2rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}
.clock-label {
  font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; opacity: 0.5;
  margin-bottom: 1.25rem;
  min-height: 2rem;
}
.clock-display {
  font-size: 1.8rem; font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
@media (min-width: 768px) { .clock-display { font-size: 2.2rem; } }
.clock-detail {
  margin-top: 1rem; font-size: 0.7rem;
  letter-spacing: 0.1em; opacity: 0.4;
  font-variant-numeric: tabular-nums;
}
.scenarios-title {
  font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; opacity: 0.5;
  margin-bottom: 1rem;
}
.scenario-btn {
  display: block; width: 100%; text-align: left;
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 1.25rem; margin-bottom: 0.5rem;
  letter-spacing: 0.05em; font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
}
.scenario-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}
.scenario-btn.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.7);
}
.scenario-name { font-size: 0.95rem; }
.scenario-detail {
  font-size: 0.75rem; opacity: 0.55;
  margin-top: 0.4rem; letter-spacing: 0.03em;
}