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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Share Tech Mono", monospace;
  background: black;
  color: white;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
}

/* === FOND ÉTOILÉ === */
.etoiles {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at bottom, #00111d 0%, #000010 100%);
  overflow: hidden;
  animation: spaceDrift 300s linear infinite;
}

.etoiles::before,
.etoiles::after {
  content: "";
  position: absolute;
  width: 300%;
  height: 300%;
  top: -100%;
  left: -100%;
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.7;
  animation: starScroll 240s linear infinite;
}

.etoiles::before {
  background-image: radial-gradient(
      2px 2px at 20px 30px,
      white 80%,
      transparent
    ),
    radial-gradient(1.5px 1.5px at 80px 70px, #88f 80%, transparent),
    radial-gradient(1px 1px at 150px 120px, #ccf 80%, transparent),
    radial-gradient(1.2px 1.2px at 40px 160px, white 80%, transparent);
}

.etoiles::after {
  background-image: radial-gradient(
      1.5px 1.5px at 60px 90px,
      #fff 80%,
      transparent
    ),
    radial-gradient(1px 1px at 200px 40px, #aaf 80%, transparent),
    radial-gradient(2px 2px at 120px 150px, #ddf 80%, transparent);
  opacity: 0.5;
  animation-duration: 360s;
}

@keyframes starScroll {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-400px, -300px);
  }
}

@keyframes spaceDrift {
  0% {
    filter: brightness(1) hue-rotate(0deg);
  }
  100% {
    filter: brightness(1.1) hue-rotate(360deg);
  }
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(0, 0, 20, 0.85);
  border-bottom: 1px solid #00eaff;
  z-index: 1000;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  backdrop-filter: blur(6px);
}

.navbar ul {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
}

.navbar li {
  margin: 0 1.5rem;
}

.navbar a {
  color: #00eaff;
  text-decoration: none;
  font-family: "Share Tech Mono", monospace;
  font-weight: bold;
  font-size: 1rem;
  position: relative;
  transition: all 0.3s ease;
}

.navbar a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #00ffff;
  transition: width 0.3s ease;
}

.navbar a:hover {
  color: #00ffff;
  text-shadow: 0 0 5px #00ffff, 0 0 10px #00eaff, 0 0 20px #00eaff;
}

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

@media (max-width: 768px) {
  .navbar ul {
    flex-direction: column;
    padding: 0.5rem 0;
  }

  .navbar li {
    margin: 0.5rem 0;
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 120px;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  z-index: 2;
  position: relative;
}

.panneau {
  background: rgba(0, 25, 50, 0.3);
  border: 1.5px solid rgba(0, 200, 255, 0.5);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: inset 0 0 20px rgba(0, 200, 255, 0.1),
    0 0 25px rgba(0, 200, 255, 0.15);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.panneau:hover {
  transform: translateY(-4px);
  border-color: #00ffff;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.4),
    inset 0 0 20px rgba(0, 255, 255, 0.2);
}

.panneau::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 255, 0.03) 0px,
    rgba(0, 255, 255, 0.03) 2px,
    transparent 3px,
    transparent 6px
  );
  pointer-events: none;
}

h1,
h2,
h3 {
  color: #00eaff;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 1px;
}

h1 {
  font-size: 1.8rem;
}
h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid rgba(0, 200, 255, 0.4);
  padding-bottom: 0.5rem;
}

.hero {
  text-align: center;
  background: rgba(0, 30, 60, 0.35);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.2);
}

.hero img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid #00eaff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  margin-bottom: 1rem;
  transition: transform 0.4s ease;
}
.hero img:hover {
  transform: scale(1.05) rotate(1deg);
}

.hero p {
  color: #cde;
  margin: 0.5rem 0;
}

.hero a.btn {
  display: inline-block;
  margin: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border: 1.5px solid #00eaff;
  color: #00eaff;
  text-decoration: none;
  background: rgba(0, 30, 60, 0.4);
  transition: all 0.35s ease;
}
.hero a.btn:hover {
  background: #00eaff;
  color: #000;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.7);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: rgba(0, 40, 80, 0.25);
  border: 1.5px solid rgba(0, 200, 255, 0.4);
  border-radius: 14px;
  padding: 1rem;
  transition: all 0.35s ease;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.1);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: #00ffff;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.7rem;
}

.project-card h3 {
  color: #00eaff;
  margin-bottom: 0.4rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.skill {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 40, 80, 0.2);
  border-radius: 12px;
  border: 1.2px solid rgba(0, 200, 255, 0.3);
  transition: all 0.3s ease;
}
.skill:hover {
  border-color: #00ffff;
  box-shadow: 0 0 18px rgba(0, 255, 255, 0.4);
  transform: translateY(-3px);
}
.meter {
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00eaff, #00aaff);
  width: 0;
  transition: width 1.2s ease;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 500px;
  margin: auto;
}
input,
textarea {
  width: 100%;
  background: rgba(0, 20, 40, 0.8);
  color: #00eaff;
  border: 1px solid rgba(0, 200, 255, 0.6);
  border-radius: 8px;
  padding: 0.6rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input:focus,
textarea:focus {
  border-color: #00ffff;
  box-shadow: 0 0 8px #00eaff;
  outline: none;
}
button {
  padding: 0.7rem 2rem;
  border: 2px solid #00eaff;
  border-radius: 12px;
  background: rgba(0, 40, 80, 0.3);
  color: #00eaff;
  cursor: pointer;
  transition: all 0.35s ease;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
  border-color: #00ffff;
}

footer {
  text-align: center;
  color: #88a;
  margin-top: 2rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .hero img {
    width: 100px;
    height: 100px;
  }
  h1,
  h2 {
    text-align: center;
  }
}
