:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --text-color: #e0e0e0;
  --accent-color: #00d4aa;
  --shadow-color: rgba(0, 212, 170, 0.3);
  --border-radius: clamp(0.5rem, 2vw, 1rem);
  --spacing-xs: clamp(0.5rem, 2vw, 1rem);
  --spacing-sm: clamp(1rem, 3vw, 1.5rem);
  --spacing-md: clamp(1.5rem, 4vw, 2rem);
  --spacing-lg: clamp(2rem, 5vw, 3rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
}

.landing-page {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background-image: url('../assets/images/bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  padding: var(--spacing-md);
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

.landing-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
              transparent 0%, 
              rgba(0, 0, 0, 0.4) 30%, 
              rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  transition: all 0.3s ease;
}

.mysterious-content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: min(90vw, 60rem);
  width: 100%;
}

h1 {
  font-size: clamp(2.5rem, 6vw + 1rem, 5rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 0 20px var(--shadow-color);
  opacity: 0;
  animation: fadeInGlow 2s ease-out 0.5s forwards;
}

.reveal-text {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

.tagline {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-md);
  opacity: 0;
  animation: fadeInGlow 2s ease-out 1.5s forwards;
}

.tagline-2 {
  opacity: 0;
  animation: fadeInGlow 2s ease-out 2.5s forwards;
}

.terminal {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  margin: var(--spacing-md) auto;
  max-width: 70ch;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeInGlow 1s ease-out 3.5s forwards;
}

.terminal-header {
  background: #2d2d2d;
  padding: 8px 12px;
  border-bottom: 1px solid #333;
  border-radius: 7px 7px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca3f; }

.terminal-title {
  margin-left: 12px;
  font-size: 0.8rem;
  color: #888;
}

.terminal-body {
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  line-height: 1.6;
  color: var(--text-color);
}

.terminal-line {
  display: flex;
  margin-bottom: 8px;
  opacity: 0;
}

.terminal-prompt {
  color: var(--accent-color);
  margin-right: 8px;
}

.terminal-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid transparent;
  width: 0;
}

.terminal-line:nth-child(1) {
  animation: terminalReveal 0.5s ease-out 4s forwards;
}

.terminal-line:nth-child(1) .terminal-text {
  animation: typewriter 3s steps(80) 4.5s forwards;
  border-right: 2px solid var(--accent-color);
}

.terminal-line:nth-child(2) {
  animation: terminalReveal 0.5s ease-out 7.5s forwards;
}

.terminal-line:nth-child(2) .terminal-text {
  animation: typewriter 2.5s steps(65) 8s forwards;
  border-right: 2px solid var(--accent-color);
}

.terminal-cursor {
  color: var(--accent-color);
  animation: blink 1s infinite;
}

@keyframes fadeInGlow {
  from {
    opacity: 0;
    text-shadow: none;
  }
  to {
    opacity: 1;
    text-shadow: 0 0 20px var(--shadow-color);
  }
}

@keyframes fadeInPulse {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
  }
  50% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.05);
  }
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }
}

/* Custom cursor effect */
.landing-page::after {
  content: '';
  position: fixed;
  width: 20px;
  height: 20px;
  border: 1px solid var(--accent-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: all 0.1s ease;
  box-shadow: 0 0 10px var(--shadow-color);
}

@supports not (background-attachment: fixed) {
  .landing-page {
    background-attachment: scroll;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }
  
  .landing-page::after {
    display: none;
  }
  
  .interaction-hint {
    bottom: -2rem;
  }
  
  .cursor-hint::before {
    content: 'Touchez pour révéler... ';
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --text-color: #f0f0f0;
  }
}

@keyframes terminalReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes typewriter {
  from { 
    width: 0;
    border-right-color: var(--accent-color);
  }
  99% {
    border-right-color: var(--accent-color);
  }
  to { 
    width: 100%;
    border-right-color: transparent;
  }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.interaction-hint {
  position: absolute;
  bottom: -4rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeInPulse 3s ease-out 10s forwards;
}

.cursor-hint {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  text-shadow: 0 0 5px var(--shadow-color);
}