/* ============================================================
   ERROR.CSS - Styles pour les pages d'erreur
   Portfolio Cyrille COUR
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  background: linear-gradient(to right, #f37335, #fdc830);
  color: #000;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Fond animé */
.code-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  pointer-events: none;
}

.code-background pre {
  font-family: "Courier New", monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-wrap: break-word;
  opacity: 0.2;
  line-height: 1.3;
  width: 90%;
  color: #5a2c00;
}

.container {
  text-align: center;
  max-width: 800px;
  padding: 40px 20px;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-code {
  font-size: 150px;
  font-weight: bold;
  background: linear-gradient(90deg, #fff, #141e30, #fff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-position: 200% center;
  animation: shine 3s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  margin-bottom: 20px;
}

@keyframes shine {
  to {
    background-position: 0% center;
  }
}

.error-title {
  font-size: 48px;
  color: #ffffff;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.error-message {
  font-size: 24px;
  color: #000;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Code card style */
.code-card {
  background-color: #1b1b2f;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  margin: 30px auto;
  max-width: 600px;
  border: 2px solid;
  animation: rgb-border 4s linear infinite;
}

@keyframes rgb-border {
  0% {
    border-color: #ff0000;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(255, 0, 0, 0.5);
  }
  16% {
    border-color: #ff00ff;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(255, 0, 255, 0.5);
  }
  33% {
    border-color: #0000ff;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(0, 0, 255, 0.5);
  }
  50% {
    border-color: #00ffff;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(0, 255, 255, 0.5);
  }
  66% {
    border-color: #00ff00;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(0, 255, 0, 0.5);
  }
  83% {
    border-color: #ffff00;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(255, 255, 0, 0.5);
  }
  100% {
    border-color: #ff0000;
    box-shadow:
      0 10px 20px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(255, 0, 0, 0.5);
  }
}

.code-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #2c2c44;
}

.header-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f56;
}
.dot.orange {
  background: #ffbd2e;
}
.dot.green {
  background: #27c93f;
}

.file-name {
  margin-left: 10px;
  color: #f5f5f5;
  font-weight: bold;
  font-family: "Fira Code", monospace;
}

.code-content {
  padding: 20px;
  color: #f5f5f5;
  font-family: "Courier New", monospace;
  text-align: left;
}

.keyword {
  color: #200be6;
}
.variable {
  color: #cdcf34;
}
.property {
  color: #82cfff;
}
.string {
  color: #eb7763;
}

.home-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  background-color: #1b1b2f;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid #ff0000;
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  animation: rgb-button 4s linear infinite;
  margin-top: 20px;
}

@keyframes rgb-button {
  0% {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
  }
  16% {
    border-color: #ff00ff;
    color: #ff00ff;
    box-shadow: 0 4px 15px rgba(255, 0, 255, 0.3);
  }
  33% {
    border-color: #0000ff;
    color: #0000ff;
    box-shadow: 0 4px 15px rgba(0, 0, 255, 0.3);
  }
  50% {
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
  }
  66% {
    border-color: #00ff00;
    color: #00ff00;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
  }
  83% {
    border-color: #ffff00;
    color: #ffff00;
    box-shadow: 0 4px 15px rgba(255, 255, 0, 0.3);
  }
  100% {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
  }
}

.home-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.home-button:hover::before {
  left: 100%;
}

.home-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
  .error-code {
    font-size: 100px;
  }

  .error-title {
    font-size: 32px;
  }

  .error-message {
    font-size: 18px;
  }

  .code-card {
    margin: 20px 10px;
  }

  .home-button {
    padding: 12px 20px;
    font-size: 16px;
  }
}
