/* Reset et variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-red: #ff0000;
  --primary-white: #ffffff;
  --primary-gray: #888888;
  --bg-dark: #0a0a0a;
  --bg-darker: #000000;
  --text-white: #ffffff;
  --text-gray: #888888;
  --text-dark-gray: #444444;
  --neon-glow: 0 0 20px #ff0000;
  --font-cyber: "Orbitron", monospace;
  --font-mono: "Fira Code", monospace;
  --success-green: #00ff00;
  --warning-yellow: #ffff00;
  --error-red: #ff4444;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-cyber);
  background: var(--bg-darker);
  color: var(--text-white);
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 0.85rem; /* Réduction de 15% */
}

/* Particles Background */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

/* Cyber Element Stylé */
.cyber-decoration {
  position: fixed;
  top: 50%;
  right: 17px; /* Réduction de 15% */
  transform: translateY(-50%);
  z-index: 10;
  opacity: 0.3;
  pointer-events: none;
}

.cyber-lines {
  width: 2.55px; /* Réduction de 15% */
  height: 170px; /* Réduction de 15% */
  background: linear-gradient(180deg, transparent, var(--primary-red), transparent);
  position: relative;
  animation: pulse-line 2s ease-in-out infinite alternate;
}

.cyber-lines::before,
.cyber-lines::after {
  content: "";
  position: absolute;
  width: 17px; /* Réduction de 15% */
  height: 1.7px; /* Réduction de 15% */
  background: var(--primary-red);
  box-shadow: 0 0 10px var(--primary-red);
}

.cyber-lines::before {
  top: 20%;
  right: 0;
}

.cyber-lines::after {
  bottom: 20%;
  right: 0;
}

@keyframes pulse-line {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.8;
  }
}

/* Glitch Effect */
.glitch {
  position: relative;
  color: var(--text-white);
  font-weight: 900;
}

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

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: var(--primary-red);
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: var(--primary-red);
  z-index: -2;
}

@keyframes glitch-1 {
  0%,
  100% {
    transform: translate(0);
  }
  10% {
    transform: translate(-2px, -2px);
  }
  20% {
    transform: translate(2px, 2px);
  }
  30% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(2px, -2px);
  }
  50% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  70% {
    transform: translate(-2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  90% {
    transform: translate(-2px, -2px);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    transform: translate(0);
  }
  10% {
    transform: translate(2px, 2px);
  }
  20% {
    transform: translate(-2px, -2px);
  }
  30% {
    transform: translate(2px, -2px);
  }
  40% {
    transform: translate(-2px, 2px);
  }
  50% {
    transform: translate(2px, 2px);
  }
  60% {
    transform: translate(-2px, -2px);
  }
  70% {
    transform: translate(2px, -2px);
  }
  80% {
    transform: translate(-2px, 2px);
  }
  90% {
    transform: translate(2px, 2px);
  }
}

/* Navigation */
.navbar {
  padding: 2rem 0; /* Réduction de 15% */
  background: rgba(0, 0, 0, 0.98);
  border-bottom: 3px solid var(--primary-red);
  position: fixed;
  top: 0;
  width: 100%;
  backdrop-filter: blur(20px);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px; /* Réduction de 15% */
  margin: 0 auto;
  padding: 0 1.7rem; /* Réduction de 15% */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 2.7rem; /* Réduction de 15% */
  color: var(--primary-red);
  font-weight: 900;
  text-shadow: var(--neon-glow);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem; /* Réduction de 15% */
}

.nav-link {
  color: var(--text-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem; /* Réduction de 15% */
  position: relative;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-red);
  text-shadow: var(--neon-glow);
}

.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 30px;
  position: relative;
}

.hamburger span {
  display: none;
}

.hamburger::before {
  content: "{ }";
  font-family: var(--font-mono);
  font-size: 1.3rem; /* Réduction de 15% */
  color: var(--primary-red);
  text-shadow: var(--neon-glow);
  transition: all 0.3s ease;
}

.hamburger:hover::before {
  color: var(--text-white);
  transform: scale(1.1);
}

.hamburger.active::before {
  content: "</>";
  transform: rotate(180deg);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 1.7rem; /* Réduction de 15% */
  margin-top: 100px; /* Réduction de 15% */
}

.hero-bg-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(255, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 42px 42px; /* Réduction de 15% */
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(42px, 42px);
  }
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
  animation: scan 4s linear infinite;
}

@keyframes scan {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Hero Layout */
.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px; /* Réduction de 15% */
  margin: 0 auto;
  gap: 3.4rem; /* Réduction de 15% */
  z-index: 2;
}

.hero-content {
  flex: 1;
  text-align: center; /* Centrage pour mobile */
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem); /* Réduction de 15% */
  font-weight: 900;
  margin-bottom: 1.7rem; /* Réduction de 15% */
  line-height: 1;
}

.glitch-text {
  background: linear-gradient(45deg, var(--primary-red), var(--primary-red), var(--primary-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-glow 2s ease-in-out infinite alternate;
}

@keyframes text-glow {
  from {
    filter: drop-shadow(0 0 20px var(--primary-red));
  }
  to {
    filter: drop-shadow(0 0 40px var(--primary-red));
  }
}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.7rem); /* Réduction de 15% */
  margin-bottom: 1.7rem; /* Réduction de 15% */
}

.typing-container {
  display: inline-block;
}

.neon-text {
  color: var(--text-white);
  text-shadow: 0 0 5px var(--text-white);
}

.cursor-neon {
  color: var(--primary-red);
  animation: cursor-blink 1s infinite;
  text-shadow: var(--neon-glow);
}

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

/* Terminal */
.terminal-container {
  flex: 0 0 425px; /* Réduction de 15% */
  width: 425px; /* Réduction de 15% */
}

.terminal-window {
  background: rgba(0, 0, 0, 0.98);
  border: 2px solid var(--primary-red);
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.2), inset 0 0 30px rgba(255, 0, 0, 0.05);
  overflow: hidden;
  height: 340px; /* Réduction de 15% */
}

.terminal-header {
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.15));
  padding: 0.85rem; /* Réduction de 15% */
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--primary-red);
}

.terminal-controls {
  display: flex;
  gap: 7px; /* Réduction de 15% */
}

.control-dot {
  width: 10px; /* Réduction de 15% */
  height: 10px; /* Réduction de 15% */
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.control-dot.red {
  background: #ff5f57;
}
.control-dot.yellow {
  background: #ffbd2e;
}
.control-dot.green {
  background: #28ca42;
}

.terminal-title {
  color: var(--primary-red);
  font-family: var(--font-mono);
  font-weight: 500;
  text-shadow: var(--neon-glow);
}

.terminal-body {
  padding: 1.3rem; /* Réduction de 15% */
  height: 272px; /* Réduction de 15% */
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.77rem; /* Réduction de 15% */
  line-height: 1.4;
}

#terminal-output {
  height: 204px; /* Réduction de 15% */
  overflow: hidden;
  margin-bottom: 0.85rem; /* Réduction de 15% */
}

.terminal-line {
  color: var(--text-white);
  margin-bottom: 3px;
  opacity: 1;
  transition: all 0.5s ease;
}

.terminal-line.command {
  color: var(--primary-red);
  text-shadow: 0 0 5px var(--primary-red);
}

.terminal-line.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.terminal-line.error {
  color: #ff5f57;
  text-shadow: 0 0 5px #ff5f57;
}

.terminal-line.info {
  color: #ffbd2e;
  text-shadow: 0 0 5px #ffbd2e;
}

.terminal-line.success {
  color: var(--primary-red);
  text-shadow: 0 0 5px var(--primary-red);
}

.terminal-input-line {
  color: var(--primary-red);
}

.prompt-symbol {
  color: var(--primary-red);
  text-shadow: 0 0 5px var(--primary-red);
}

.current-command {
  color: var(--text-white);
}

.terminal-cursor {
  color: var(--primary-red);
  animation: cursor-pulse 1s infinite;
  text-shadow: var(--neon-glow);
}

@keyframes cursor-pulse {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.7rem; /* Réduction de 15% */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--primary-red);
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-arrow {
  width: 2px;
  height: 25px; /* Réduction de 15% */
  background: var(--primary-red);
  position: relative;
  margin-bottom: 8px; /* Réduction de 15% */
  box-shadow: 0 0 20px var(--primary-red);
}

.scroll-arrow::after {
  content: "";
  position: absolute;
  bottom: -7px; /* Réduction de 15% */
  left: -5px; /* Réduction de 15% */
  width: 0;
  height: 0;
  border-left: 7px solid transparent; /* Réduction de 15% */
  border-right: 7px solid transparent; /* Réduction de 15% */
  border-top: 10px solid var(--primary-red); /* Réduction de 15% */
  filter: drop-shadow(0 0 10px var(--primary-red));
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Sections communes */
.container {
  max-width: 1200px; /* Réduction de 15% */
  margin: 0 auto;
  padding: 0 1.7rem; /* Réduction de 15% */
}

.section-title {
  margin-bottom: 3.4rem; /* Réduction de 15% */
}

.cyber-title {
  display: flex;
  align-items: center;
  gap: 1.7rem; /* Réduction de 15% */
  font-size: clamp(1.7rem, 5vw, 3.4rem); /* Réduction de 15% */
  font-weight: 900;
  text-transform: uppercase;
  justify-content: center; /* Centrage pour mobile */
  flex-wrap: wrap;
}

.title-number {
  color: var(--primary-red);
  text-shadow: var(--neon-glow);
}

.title-text {
  color: var(--text-white);
}

.title-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-red), transparent);
  min-width: 85px; /* Réduction de 15% */
}

/* Projects Section */
.projects {
  padding: 85px 0; /* Réduction de 15% */
  background: rgba(0, 0, 0, 0.3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Réduction de 15% */
  gap: 1.7rem; /* Réduction de 15% */
  justify-items: center; /* Centrage pour mobile */
}

.project-card {
  position: relative;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-red);
  border-radius: 15px;
  padding: 1.7rem; /* Réduction de 15% */
  transition: all 0.3s ease;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 0, 0, 0.2), 0 0 30px rgba(255, 0, 0, 0.3);
}

.card-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary-red), var(--primary-red), var(--primary-red));
  border-radius: 15px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .card-glow {
  opacity: 0.3;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.3rem; /* Réduction de 15% */
}

.project-icon {
  width: 51px; /* Réduction de 15% */
  height: 51px; /* Réduction de 15% */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 0, 0, 0.1);
  border-radius: 10px;
  border: 1px solid var(--primary-red);
  font-size: 1.7rem; /* Réduction de 15% */
}

.project-status {
  display: flex;
  align-items: center;
  gap: 7px; /* Réduction de 15% */
  font-size: 0.68rem; /* Réduction de 15% */
  text-transform: uppercase;
  font-weight: 500;
}

.status-dot {
  width: 7px; /* Réduction de 15% */
  height: 7px; /* Réduction de 15% */
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.status-dot.active {
  background: var(--primary-red);
  color: var(--primary-red);
}

.status-dot.private {
  background: var(--primary-red);
  color: var(--primary-red);
}

.project-title {
  font-size: 1.3rem; /* Réduction de 15% */
  font-weight: 700;
  margin-bottom: 0.85rem; /* Réduction de 15% */
  color: var(--text-white);
  text-transform: uppercase;
}

.project-desc {
  color: var(--text-gray);
  margin-bottom: 1.3rem; /* Réduction de 15% */
  line-height: 1.6;
}

.project-tech {
  display: flex;
  gap: 0.43rem; /* Réduction de 15% */
  flex-wrap: wrap;
  margin-bottom: 1.7rem; /* Réduction de 15% */
}

.tech-tag {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--primary-red);
  color: var(--primary-red);
  padding: 4px 10px; /* Réduction de 15% */
  border-radius: 20px;
  font-size: 0.68rem; /* Réduction de 15% */
  font-weight: 500;
  text-transform: uppercase;
}

.cyber-btn {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
  padding: 8px 21px; /* Réduction de 15% */
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cyber-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-red);
  transition: left 0.3s ease;
  z-index: -1;
}

.cyber-btn:hover::before {
  left: 0;
}

.cyber-btn:hover {
  color: var(--bg-darker);
  box-shadow: 0 0 20px var(--primary-red);
}

/* Skills Section */
.skills {
  padding: 85px 0; /* Réduction de 15% */
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); /* Réduction de 15% */
  gap: 2.55rem; /* Réduction de 15% */
  justify-items: center; /* Centrage pour mobile */
}

.skill-category {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-red);
  border-radius: 15px;
  padding: 1.7rem; /* Réduction de 15% */
  width: 100%;
  max-width: 500px;
}

.category-title {
  font-size: 1.3rem; /* Réduction de 15% */
  font-weight: 700;
  color: var(--primary-red);
  text-transform: uppercase;
  margin-bottom: 1.7rem; /* Réduction de 15% */
  text-shadow: var(--neon-glow);
  text-align: center; /* Centrage pour mobile */
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(102px, 1fr)); /* Réduction de 15% */
  gap: 1.3rem; /* Réduction de 15% */
  justify-items: center; /* Centrage pour mobile */
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem; /* Réduction de 15% */
  padding: 1.3rem; /* Réduction de 15% */
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-align: center;
}

.skill-item:hover {
  border-color: var(--primary-red);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
  transform: translateY(-5px);
}

.skill-logo {
  width: 43px; /* Réduction de 15% */
  height: 43px; /* Réduction de 15% */
  object-fit: contain;
  filter: brightness(1.2);
}

/* Animation des points "..." */
.animated-dots {
  position: relative;
}

.dots-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 43px; /* Réduction de 15% */
  height: 43px; /* Réduction de 15% */
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--primary-red);
  border-radius: 8px;
}

.dot {
  color: var(--primary-red);
  font-size: 1.7rem; /* Réduction de 15% */
  font-weight: bold;
  animation: dotPulse 1.5s infinite;
  margin: 0 2px;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.3s;
}

.dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dotPulse {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.skill-name {
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-white);
  font-size: 0.77rem; /* Réduction de 15% */
}

/* Games Section */
.games {
  padding: 85px 0; /* Réduction de 15% */
  background: rgba(0, 0, 0, 0.2);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); /* Réduction de 15% */
  gap: 1.7rem; /* Réduction de 15% */
  justify-items: center; /* Centrage pour mobile */
}

.game-card {
  position: relative;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-red);
  border-radius: 15px;
  padding: 1.7rem; /* Réduction de 15% */
  text-align: center;
  transition: all 0.3s ease;
  overflow: hidden;
  width: 100%;
  max-width: 200px;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255, 0, 0, 0.2);
  border-color: var(--primary-red);
}

.game-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary-red), var(--primary-red));
  border-radius: 15px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover .game-glow {
  opacity: 0.3;
}

.game-logo {
  width: 68px; /* Réduction de 15% */
  height: 68px; /* Réduction de 15% */
  margin: 0 auto 1.3rem; /* Réduction de 15% */
  object-fit: contain;
  border-radius: 12px;
}

.game-card h3 {
  font-size: 1rem; /* Réduction de 15% */
  font-weight: 700;
  color: var(--text-white);
  text-transform: uppercase;
}

/* Contact Section */
.contact {
  padding: 85px 0; /* Réduction de 15% */
  background: rgba(0, 0, 0, 0.4);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.4rem; /* Réduction de 15% */
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.7rem; /* Réduction de 15% */
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.3rem; /* Réduction de 15% */
  padding: 1.3rem; /* Réduction de 15% */
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-red);
  border-radius: 10px;
}

.contact-icon {
  width: 51px; /* Réduction de 15% */
  height: 51px; /* Réduction de 15% */
  border-radius: 50%;
  border: 1px solid var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem; /* Réduction de 15% */
  text-shadow: 0 0 10px currentColor;
}

.email-icon {
  background: linear-gradient(135deg, var(--primary-red), var(--primary-red));
  color: var(--bg-darker);
}

.email-icon::before {
  content: "@";
  font-size: 1.7rem; /* Réduction de 15% */
}

.discord-icon {
  background: linear-gradient(135deg, var(--primary-red), var(--primary-red));
  color: var(--bg-darker);
}

.discord-icon::before {
  content: "DC";
}

.contact-details h3 {
  font-size: 1rem; /* Réduction de 15% */
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.43rem; /* Réduction de 15% */
  text-transform: uppercase;
}

.contact-value {
  color: var(--primary-red);
  font-family: var(--font-mono);
  font-size: 0.94rem; /* Réduction de 15% */
  text-shadow: var(--neon-glow);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--primary-red);
  color: var(--primary-red);
  padding: 7px 14px; /* Réduction de 15% */
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-cyber);
  font-size: 0.68rem; /* Réduction de 15% */
  text-transform: uppercase;
  margin-top: 0.43rem; /* Réduction de 15% */
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.copy-btn:hover {
  background: var(--primary-red);
  color: var(--bg-darker);
  box-shadow: 0 0 15px var(--primary-red);
}

.copy-success {
  display: none;
}

.copy-btn.copied .copy-text {
  display: none;
}

.copy-btn.copied .copy-success {
  display: inline;
}

.social-links {
  display: flex;
  gap: 0.85rem; /* Réduction de 15% */
  margin-top: 1.7rem; /* Réduction de 15% */
}

.social-link {
  width: 51px; /* Réduction de 15% */
  height: 51px; /* Réduction de 15% */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-red);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(255, 0, 0, 0.3);
}

/* Contact Form */
.cyber-form {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-red);
  border-radius: 15px;
  padding: 1.7rem; /* Réduction de 15% */
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.1);
}

.form-group {
  position: relative;
  margin-bottom: 1.7rem; /* Réduction de 15% */
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--text-dark-gray);
  color: var(--text-white);
  font-family: var(--font-cyber);
  font-size: 0.85rem; /* Réduction de 15% */
  padding: 13px 0; /* Réduction de 15% */
  outline: none;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--primary-red);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-gray);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 1px;
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: width 0.3s ease;
}

.form-group input:focus + .input-line,
.form-group textarea:focus + .input-line {
  width: 100%;
}

/* Disable textarea resizing */
.form-group textarea {
  resize: none;
}

/* Anti-robot sécurisé */
.anti-robot {
  margin: 1.7rem 0; /* Réduction de 15% */
  padding: 1.3rem; /* Réduction de 15% */
  background: rgba(255, 0, 0, 0.05);
  border: 1px solid var(--primary-red);
  border-radius: 10px;
  text-align: center;
}

.anti-robot label {
  display: block;
  color: var(--primary-red);
  font-weight: 600;
  margin-bottom: 0.85rem; /* Réduction de 15% */
  text-transform: uppercase;
}

.captcha-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem; /* Réduction de 15% */
  flex-wrap: wrap;
  position: relative;
}

.captcha-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-red);
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.captcha-question {
  font-size: 1.1rem; /* Réduction de 15% */
  font-weight: bold;
  color: var(--text-white);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.85rem 1.3rem; /* Réduction de 15% */
  border-radius: 5px;
  border: 1px solid var(--primary-red);
  min-width: 170px; /* Réduction de 15% */
  max-width: 250px; /* Fixed max width */
  height: auto;
  white-space: normal; /* Allow text wrapping */
  overflow: visible; /* Allow content to be visible */
  text-overflow: clip; /* Remove ellipsis */
}

.captcha-container input {
  width: 85px; /* Réduction de 15% */
  padding: 0.85rem; /* Réduction de 15% */
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-red);
  border-radius: 5px;
  color: var(--text-white);
  text-align: center;
  font-size: 1.1rem; /* Réduction de 15% */
}

.refresh-captcha {
  background: transparent;
  border: 1px solid var(--primary-red);
  color: var(--primary-red);
  padding: 0.85rem; /* Réduction de 15% */
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1rem; /* Réduction de 15% */
  transition: all 0.3s ease;
}

.refresh-captcha:hover {
  background: var(--primary-red);
  color: var(--bg-darker);
}

.cyber-btn-large {
  width: 100%;
  background: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
  padding: 13px 26px; /* Réduction de 15% */
  font-family: var(--font-cyber);
  font-size: 0.94rem; /* Réduction de 15% */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cyber-btn-large::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-red);
  transition: left 0.3s ease;
  z-index: -1;
}

.cyber-btn-large:hover {
  color: var(--bg-darker);
  box-shadow: 0 0 30px var(--primary-red);
  transform: translateY(-2px);
  animation: buttonGlitch 0.3s ease-in-out;
}

.cyber-btn-large:hover::before {
  left: 0;
}

.cyber-btn-large:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  animation: none;
  border-color: var(--text-gray);
  color: var(--text-gray);
}

.cyber-btn-large.processing {
  animation: processingPulse 1.5s infinite;
}

@keyframes processingPulse {
  0%, 100% {
    box-shadow: 0 0 30px var(--primary-red);
  }
  50% {
    box-shadow: 0 0 50px var(--primary-red), 0 0 70px var(--primary-red);
  }
}

/* Success Message Modal */
.success-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.7rem; /* Réduction de 15% */
}

.success-content {
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--primary-red);
  border-radius: 15px;
  padding: 2.55rem; /* Réduction de 15% */
  text-align: center;
  max-width: 425px; /* Réduction de 15% */
  width: 100%;
  box-shadow: 0 0 50px rgba(255, 0, 0, 0.3);
  animation: successSlideIn 0.5s ease;
}

@keyframes successSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success-icon {
  font-size: 3.4rem; /* Réduction de 15% */
  margin-bottom: 0.85rem; /* Réduction de 15% */
  animation: successPulse 2s infinite;
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.success-content h3 {
  color: var(--primary-red);
  font-size: 1.7rem; /* Réduction de 15% */
  font-weight: 900;
  margin-bottom: 0.85rem; /* Réduction de 15% */
  text-transform: uppercase;
  text-shadow: var(--neon-glow);
}

.success-content p {
  color: var(--text-white);
  margin-bottom: 1.7rem; /* Réduction de 15% */
  line-height: 1.6;
}

.close-success-btn {
  background: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
  padding: 10px 20px; /* Réduction de 15% */
  font-family: var(--font-cyber);
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.close-success-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-red);
  transition: left 0.3s ease;
  z-index: -1;
}

.close-success-btn:hover::before {
  left: 0;
}

.close-success-btn:hover {
  color: var(--bg-darker);
  box-shadow: 0 0 20px var(--primary-red);
}

/* Footer */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--primary-red);
  padding: 2.55rem 0 0.85rem; /* Réduction de 15% */
}

.footer-content {
  display: flex;
  justify-content: center; /* Changed from space-between to center */
  align-items: center; /* Changed from flex-start to center */
  margin-bottom: 1.7rem; /* Réduction de 15% */
  flex-direction: column;
  gap: 1.7rem; /* Réduction de 15% */
  text-align: center; /* Ensure text is centered within flex items */
}

.footer-left {
  flex: 1;
  text-align: center;
}

.footer-logo {
  font-size: 1.7rem; /* Réduction de 15% */
  font-weight: 900;
  color: var(--primary-red);
  text-shadow: var(--neon-glow);
  margin-bottom: 0.85rem; /* Réduction de 15% */
}

.footer-left p {
  color: var(--text-gray);
  font-size: 0.85rem; /* Réduction de 15% */
}

.footer-right {
  flex: 1;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 1.7rem; /* Réduction de 15% */
  justify-content: center;
  margin-bottom: 0.85rem; /* Réduction de 15% */
}

.footer-link {
  color: var(--text-gray);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.77rem; /* Réduction de 15% */
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-red);
  text-shadow: var(--neon-glow);
}

.footer-copyright {
  color: var(--text-dark-gray);
  font-size: 0.68rem; /* Réduction de 15% */
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  background: var(--bg-darker);
  border: 2px solid var(--primary-red);
  border-radius: 15px;
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 510px; /* Réduction de 15% */
  box-shadow: 0 0 50px rgba(255, 0, 0, 0.3);
}

.modal-header {
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2));
  padding: 1.3rem; /* Réduction de 15% */
  border-bottom: 1px solid var(--primary-red);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  color: var(--primary-red);
  font-size: 1.3rem; /* Réduction de 15% */
  font-weight: 700;
  text-transform: uppercase;
  flex-grow: 1; /* Allows the title to take up available space */
  text-align: center; /* Centers the text within that space */
}

.close {
  color: var(--primary-red);
  font-size: 1.7rem; /* Réduction de 15% */
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close:hover {
  color: var(--text-white);
  text-shadow: var(--neon-glow);
}

.modal-body {
  padding: 1.7rem; /* Réduction de 15% */
  color: var(--text-white);
  line-height: 1.6;
  text-align: center; /* Centers all text content within the modal body */
}

.modal-body h3 {
  color: var(--primary-red);
  font-size: 1rem; /* Réduction de 15% */
  margin: 1.3rem 0 0.43rem; /* Réduction de 15% */
  text-transform: uppercase;
}

.modal-body p {
  margin-bottom: 0.85rem; /* Réduction de 15% */
  color: var(--text-gray);
}

/* Notification */
.notification {
  position: fixed;
  top: 85px;
  right: 17px;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
  padding: 13px 21px;
  border-radius: 8px;
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  font-family: var(--font-cyber);
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
  max-width: 300px;
  word-wrap: break-word;
  backdrop-filter: blur(10px);
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-color: var(--success-green);
  color: var(--success-green);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.notification.warning {
  border-color: var(--warning-yellow);
  color: var(--warning-yellow);
  box-shadow: 0 0 20px rgba(255, 255, 0, 0.3);
}

.notification.error {
  border-color: var(--error-red);
  color: var(--error-red);
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
}

/* Indicateur de cooldown */
.cooldown-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--warning-yellow);
  color: var(--warning-yellow);
  padding: 20px;
  border-radius: 10px;
  z-index: 2000;
  text-align: center;
  font-family: var(--font-cyber);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 30px rgba(255, 255, 0, 0.3);
}

.cooldown-timer {
  font-size: 2rem;
  font-weight: bold;
  margin: 10px 0;
  text-shadow: 0 0 10px var(--warning-yellow);
}

/* Indicateur de sécurité */
.security-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 10px;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid var(--success-green);
  border-radius: 5px;
  font-size: 0.8rem;
  color: var(--success-green);
}

.security-indicator.warning {
  background: rgba(255, 255, 0, 0.1);
  border-color: var(--warning-yellow);
  color: var(--warning-yellow);
}

.security-indicator.error {
  background: rgba(255, 68, 68, 0.1);
  border-color: var(--error-red);
  color: var(--error-red);
}

.security-icon {
  font-size: 1.2rem;
}

/* Amélioration du captcha */
.captcha-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  position: relative;
}

.captcha-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-red);
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-layout {
    flex-direction: column;
    gap: 1.7rem; /* Réduction de 15% */
  }

  .hero-content {
    text-align: center;
  }

  .terminal-container {
    flex: none;
    width: 100%;
    max-width: 510px; /* Réduction de 15% */
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 1.7rem; /* Réduction de 15% */
    justify-items: center; /* Center the grid items (contact-info and form) */
  }

  .skills-container {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); /* Réduction de 15% */
  }

  .cyber-decoration {
    display: none;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 102px; /* Réduction de 15% */
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.95);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(255, 0, 0, 0.2);
    border-top: 1px solid var(--primary-red);
    padding: 1.7rem 0; /* Réduction de 15% */
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 0.85rem 0; /* Réduction de 15% */
  }

  .hero-title {
    font-size: clamp(2.1rem, 8vw, 4.25rem); /* Réduction de 15% */
  }

  .terminal-container {
    width: 100%;
  }

  .terminal-window {
    height: 298px; /* Réduction de 15% */
  }

  .terminal-body {
    height: 230px; /* Réduction de 15% */
    padding: 0.85rem; /* Réduction de 15% */
  }

  #terminal-output {
    height: 162px; /* Réduction de 15% */
  }

  .cyber-title {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem; /* Réduction de 15% */
  }

  .title-line {
    width: 85px; /* Réduction de 15% */
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); /* Réduction de 15% */
  }

  .footer-content {
    flex-direction: column;
    gap: 1.7rem; /* Réduction de 15% */
    text-align: center;
  }

  .footer-right {
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 0.85rem; /* Réduction de 15% */
  }

  .captcha-container {
    flex-direction: column;
    gap: 0.85rem; /* Réduction de 15% */
  }

  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100%);
  }
  
  .notification.show {
    transform: translateY(0);
  }
  
  .cooldown-indicator {
    width: 90%;
    max-width: 300px;
  }
  
  .security-indicator {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem; /* Réduction de 15% */
  }

  .terminal-header {
    padding: 0.43rem; /* Réduction de 15% */
    flex-direction: column;
    gap: 0.43rem; /* Réduction de 15% */
  }

  .terminal-window {
    height: 255px; /* Réduction de 15% */
  }

  .terminal-body {
    height: 187px; /* Réduction de 15% */
    padding: 0.43rem; /* Réduction de 15% */
    font-size: 0.68rem; /* Réduction de 15% */
  }

  #terminal-output {
    height: 128px; /* Réduction de 15% */
  }

  .project-card,
  .skill-category,
  .cyber-form {
    padding: 1.3rem; /* Réduction de 15% */
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)); /* Réduction de 15% */
  }

  .success-content {
    padding: 1.7rem; /* Réduction de 15% */
    margin: 0.85rem; /* Réduction de 15% */
  }

  .cyber-title {
    font-size: clamp(1.5rem, 5vw, 2.5rem); /* Réduction de 15% */
  }

  .footer-links {
    flex-direction: column;
    gap: 0.85rem; /* Réduction de 15% */
  }
}

/* Animations d'entrée */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px; /* Réduction de 15% */
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-red), #cc0000);
  border-radius: 10px;
  border: 2px solid var(--bg-darker);
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff3333, var(--primary-red));
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}
