/* style.css - Thème cyber / Red Team */
:root {
  --bg-dark: #0a0c0f;
  --bg-light: #14181c;
  --text-primary: #e0e0e0;
  --accent-red: #ff3366;
  --accent-green: #00ff9d;
  --matrix-green: #0f0;
  --glitch-blue: #00ffff;
  --font-mono: 'Share Tech Mono', monospace;
  --font-main: 'Space Grotesk', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none; /* cache le curseur par défaut */
}

/* Curseur personnalisé (desktop only) */
.cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-red);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.2s, height 0.2s, background 0.2s;
  box-shadow: 0 0 15px var(--accent-red);
  mix-blend-mode: difference;
}

.cursor.hover {
  width: 40px;
  height: 40px;
  background: rgba(255, 51, 102, 0.2);
  border-color: var(--accent-green);
}

/* Canvas Matrix */
#matrix {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 12, 15, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--accent-red);
  z-index: 100;
  padding: 0.8rem 0;
}

.navbar ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
}

.navbar a {
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 2px;
  padding: 0.5rem 0;
  transition: color 0.3s;
  position: relative;
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-red);
  transition: width 0.3s;
}

.navbar a:hover {
  color: var(--accent-red);
}

.navbar a:hover::after {
  width: 100%;
}

/* Sections */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.header-section {
  text-align: center;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 5px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: var(--accent-red);
  text-shadow: 0 0 10px var(--accent-red);
}

/* Effet Glitch */
.glitch {
  position: relative;
  animation: glitch-skew 4s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  color: var(--glitch-blue);
  animation: glitch-1 0.8s infinite linear alternate-reverse;
  z-index: -1;
}

.glitch::after {
  color: var(--accent-green);
  animation: glitch-2 0.8s infinite linear alternate-reverse;
  z-index: -2;
}

@keyframes glitch-1 {
  0% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
  100% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
  0% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
  100% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 2px); }
}

@keyframes glitch-skew {
  0% { transform: skew(0deg); }
  20% { transform: skew(2deg); }
  40% { transform: skew(-2deg); }
  60% { transform: skew(1deg); }
  80% { transform: skew(-1deg); }
  100% { transform: skew(0deg); }
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent-green);
  margin-bottom: 2rem;
  text-shadow: 0 0 8px var(--accent-green);
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: transparent;
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
  font-family: var(--font-mono);
  font-size: 1rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  cursor: none;
}

.btn:hover {
  background: var(--accent-red);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--accent-red);
  transform: scale(1.05);
}

.btn-cv i {
  margin-right: 8px;
}

/* Animation téléchargement */
.btn.downloading {
  animation: pulse 0.5s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 40px var(--accent-red); }
  100% { transform: scale(1); }
}

/* Section titles */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 3px;
  border-left: 4px solid var(--accent-red);
  padding-left: 20px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-red), transparent);
}

/* Profil */
.profil-content {
  background: rgba(20, 24, 28, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid var(--accent-red);
  padding: 2rem;
  border-radius: 8px;
  font-size: 1.2rem;
  box-shadow: 0 0 30px rgba(255, 51, 102, 0.2);
}

/* Compétences */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: rgba(20, 24, 28, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid var(--accent-green);
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: 6px;
  font-family: var(--font-mono);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.skill-card i {
  font-size: 2.5rem;
  color: var(--accent-red);
  margin-bottom: 1rem;
  display: block;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent-red);
  box-shadow: 0 0 30px var(--accent-red);
  background: rgba(255, 51, 102, 0.1);
}

/* Terminal interactif */
.terminal {
  background: #0c0f12;
  border: 2px solid var(--accent-green);
  border-radius: 8px;
  font-family: var(--font-mono);
  margin-top: 2rem;
  box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.terminal-header {
  background: #1a1e22;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--accent-green);
}

.terminal-title {
  color: var(--accent-green);
}

.terminal-controls {
  color: var(--accent-red);
}

.terminal-body {
  padding: 1rem;
  min-height: 200px;
  color: var(--accent-green);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-body .line {
  margin-bottom: 0.3rem;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

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

.terminal-input-line {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid #2a2e32;
}

.terminal-input-line .prompt {
  color: var(--accent-red);
  margin-right: 10px;
  font-weight: bold;
}

#terminal-input {
  background: transparent;
  border: none;
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 1rem;
  flex: 1;
  outline: none;
}

#terminal-input::placeholder {
  color: #3a4a4a;
}

.terminal-hint {
  text-align: center;
  margin-top: 1rem;
  color: #6b7a7a;
  font-size: 0.9rem;
}

/* Statistiques */
.stats-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  border: 1px solid var(--accent-red);
  padding: 3rem 1rem;
  border-radius: 12px;
}

.stat-item {
  text-align: center;
  min-width: 150px;
}

.stat-item i {
  font-size: 3rem;
  color: var(--accent-red);
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  display: block;
  color: var(--accent-green);
  text-shadow: 0 0 15px var(--accent-green);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
}

/* Contact */
.contact-info {
  background: rgba(20, 24, 28, 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid var(--accent-red);
  padding: 2rem;
  border-radius: 8px;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.contact-info i {
  color: var(--accent-red);
  margin-right: 10px;
  width: 25px;
}

.contact-info a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info a:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--accent-red);
  background: rgba(10, 12, 15, 0.9);
  font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar ul {
    gap: 1rem;
    font-size: 0.8rem;
  }
  
  .cursor {
    display: none; /* cacher curseur perso sur mobile */
  }
  
  body {
    cursor: auto;
  }
  
  .btn {
    cursor: pointer;
  }
  
  .stats-container {
    flex-direction: column;
    align-items: center;
  }
  
  .terminal {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .skill-card {
    padding: 1rem;
  }
}
