/* FONTS */
@font-face {
  font-family: 'PlanetGemrule';
  src: url('https://kuur0.neocities.org/PlanetGemrule.ttf') format('truetype');
}

@font-face {
  font-family: 'Press Start 2P';
  src: url('https://kuur0.neocities.org/PressStart2P-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Slanted';
  src: url('https://kuur0.neocities.org/Slanted.ttf') format('truetype');
}

body.page-404 {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #000;
  overflow: hidden;

  display: flex;
  justify-content: center;
  align-items: center;

  color: #fff;
}

body.page-404 .headers,
body.page-404 .page-content,
body.page-404 .layout-grid,
body.page-404 .sidebar,
body.page-404 .footer {
  display: none !important;
}

body.page-404::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(#fff 1px, transparent 1px),
    radial-gradient(#fff 1.5px, transparent 1.5px);
  background-size: 180px 180px, 260px 260px;
  background-position: 0 0, 80px 100px;

  animation: starMove 60s linear infinite;
  opacity: 0.75;
  z-index: 0;
}

@keyframes starMove {
  from { transform: translateY(0); }
  to { transform: translateY(180px); }
}

.error404 {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  max-width: 900px;
  padding: 20px;
}

@keyframes float404 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.error404-mascot {
  width: 140px;
  image-rendering: pixelated;
  margin-bottom: 10px;

  animation: float404 3s ease-in-out infinite;
}

.error404-title {
  font-family: "Slanted", sans-serif;
  font-size: 64px;
  margin: 10px 0 25px;

  color: #fff;

  text-shadow:
    0 0 8px #00ffff,
    0 0 14px #ff00ff;
}

.error404-text {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 2.2;

  max-width: 800px;
  margin-bottom: 40px;

  color: rgba(255,255,255,0.95);
}

.navbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 0 0 5px #00ffff, 0 0 8px #ff00ff;
  }
  50% {
    box-shadow: 0 0 10px #00ffff, 0 0 15px #ff00ff;
  }
}

@keyframes glitchShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(1px, -1px); }
  40% { transform: translate(-1px, 1px); }
  60% { transform: translate(1px, 0); }
  80% { transform: translate(-1px, 0); }
}

.navbar a {
  font-family: 'PlanetGemrule', sans-serif;
  font-size: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 9px 16px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  position: relative;
  border-radius: 6px;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.75);
  text-shadow:
    1px 0 #00ffff,
    -1px 0 #ff00ff,
    0 0 6px rgba(255,255,255,0.8);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 rgba(0,0,0,0);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.18s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.navbar a::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: 6px;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -2;
}

.navbar a:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.95);
  transform: translateY(-1px);
  animation: glitchShift 0.18s steps(2, end) 2;
  box-shadow:
    0 0 8px #00ffff,
    0 0 14px #ff00ff,
    inset 0 0 12px rgba(255,255,255,0.08);
}

.navbar a.active {
  background: linear-gradient(90deg, rgba(0,255,255,0.22), rgba(255,0,255,0.22)), rgba(0,0,0,0.9);
  color: #fff;
  animation: neonPulse 2s infinite ease-in-out;
  box-shadow:
    0 0 8px #00ffff,
    0 0 14px #ff00ff,
    inset 0 0 10px rgba(255,255,255,0.1);
}

@media (max-width: 600px) {
  .error404-title {
    font-size: 40px;
  }

  .error404-text {
    font-size: 10px;
    line-height: 2;
  }
}

.error404-mascot-wrapper {
  position: relative;
  width: 135px;
  height: 270px;
  margin-bottom: 20px; /* espace pour ne pas toucher le texte */
}

/* les deux images se superposent */
.mascot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* animation alternée */
.mascot.m1 {
  animation: swap1 2s infinite;
}

.mascot.m2 {
  animation: swap2 2s infinite;
}

/* alternance 1s / 1s */
@keyframes swap1 {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes swap2 {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}