* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font: 13px/1.4 ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  color: #cfd4e0;
}

#scene {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;      /* la rotation au doigt ne fait pas defiler la page */
}

#loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: 11px;
  color: #5a6070;
  pointer-events: none;
}

/* --------------------------------- navbar -------------------------------- */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(8px, 2vw, 20px) clamp(6px, 3vw, 44px);
  pointer-events: none;    /* l'orbite reste attrapable partout ailleurs */
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.led, .led canvas { display: block; }

.link {
  pointer-events: auto;
  display: block;
  margin-top: .4em;
  color: #9aa0ac;                 /* gris clair : juste les traits, pas de neon */
  opacity: .85;
  transition: opacity .25s ease;
}

.link:hover, .link:focus-visible { opacity: 1; outline: none; }

.ig-icon {
  display: block;
  width: clamp(20px, 4.5vw, 28px);
  height: auto;
}

#copyright {
  position: fixed;
  left: 18px;
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
  z-index: 2;
  margin: 0;
  font-size: 10px;
  letter-spacing: .04em;
  color: #4d5261;
  pointer-events: none;
}

#copyright a {
  color: #4d5261;
  pointer-events: auto;
  transition: color .25s ease;
}

#copyright a:hover, #copyright a:focus-visible { color: #9aa0ac; }

@media (max-width: 640px) {
  #nav { flex-direction: column; gap: 4px; }

  /* sur mobile, le lien Instagram descend en bas a droite de la page */
  .link {
    position: fixed;
    right: max(18px, env(safe-area-inset-right, 18px));
    bottom: max(18px, env(safe-area-inset-bottom, 18px));
    margin-top: 0;
  }
}
