/* ====== Base ====== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0a0a0a;
  color: #f5f5f5;
  overflow-x: hidden;
}

/* ====== Canvas (background + hero particles) ====== */
#neuron-canvas, #particles-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
#neuron-canvas { position: fixed; z-index: 0; }

/* ====== Loading ====== */
.loading-screen {
  position: fixed; inset: 0; z-index: 2000;
  background: #0a0a0a; display: grid; place-items: center;
  opacity: 1; transition: opacity .8s ease;
}
.loading-screen.fade-out { opacity: 0; pointer-events: none; }
.loading-text { color: #00ffff; font-weight: 700; letter-spacing: .5px; }

/* ====== Nav ====== */
.site-header { position: relative; z-index: 5; }
.navigation {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: rgba(10,10,10,.7); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08); z-index: 1000;
  transition: background .3s ease;
}
.navigation.scrolled { background: rgba(0,0,0,.9); }
.nav-logo {
  display: flex; align-items: center; gap: .5rem;
  color: #00ffff; font-weight: 800; font-size: 1.05rem; cursor: pointer;
  text-decoration: none; background: none; border: none;
}
.nav-logo span { color: #00ffff !important; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: #00ffff; box-shadow: 0 0 10px #00ffff; }

.nav-menu { display: flex; gap: 1.2rem; align-items: center; }
.nav-link {
  color: #fff; background: none; border: none; cursor: pointer;
  font-size: .98rem; padding: .3rem .2rem; transition: color .2s, transform .2s;
}
.nav-link:hover { color: #00ffff; transform: translateY(-1px); }

.nav-hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.nav-hamburger span { width: 24px; height: 3px; background: #fff; border-radius: 2px; }

/* ====== Hero ====== */
.hero-section {
  min-height: 100vh; position: relative; z-index: 1;
  display: grid; place-items: center; text-align: center; padding: 120px 20px 64px;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero-greeting { color: #cfcfcf; margin-bottom: .4rem; }
.hero-name { color: #00ffff; font-weight: 700; text-shadow: 0 0 10px rgba(0,255,255,.55); }
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #e8ffff; text-shadow: 0 0 18px rgba(0,255,255,.35);
  margin: .2rem 0 .6rem;
}
.hero-subtitle { color: #c7c7c7; margin-bottom: 1.1rem; }
.hero-description { color: #b6b6b6; margin: 0 auto 1.8rem; line-height: 1.65; max-width: 780px; }
.hero-buttons { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }

.btn {
  padding: .8rem 1.3rem; border-radius: 10px; font-weight: 600; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .25s ease, color .25s ease;
  border: 1px solid transparent;
}
.btn-primary { background: #00ffff; color: #071b1b; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,255,255,.25); }
.btn-secondary { background: #1e1e1e; color: #fff; border-color: #00ffff; }
.btn-secondary:hover { background: #00ffff; color: #000; }
.btn-outline { background: transparent; color: #00ffff; border-color: #00ffff; }
.btn-outline:hover { background: #00ffff; color: #000; }

/* ====== Sections ====== */
.section { padding: 84px 20px; max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 36px; }
.section-title { color: #00ffff; font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 .4rem; }
.section-subtitle { color: #a9a9a9; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.about-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  padding: 18px; border-radius: 12px; transition: transform .25s, box-shadow .25s;
}
.about-card h3 { color: #00ffff; margin-top: 0; }
.about-card p { color: #cdcdcd; }
.about-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,255,255,.12); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  padding: 18px; border-radius: 12px;
}
.skill-card h3 { color: #00ffff; margin-top: 0; }
.skill-card p { color: #cfcfcf; margin-bottom: 10px; }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; }
.bar span { color: #ddd; font-size: .95rem; }
.bar i {
  --w: 0%;
  display: block; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, #00ffff, #9b30ff);
  width: var(--w); transition: width 1.1s ease;
  box-shadow: 0 0 12px rgba(0,255,255,.25);
}

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 14px 16px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.project-media {
  height: 140px; border-radius: 10px; margin-bottom: 10px;
  background: radial-gradient(120px 80px at 30% 30%, rgba(0,255,255,.45), transparent 60%),
              radial-gradient(120px 80px at 70% 70%, rgba(155,48,255,.35), transparent 60%),
              #0f0f12;
  border: 1px solid rgba(255,255,255,.08);
}
.project-card h3 { color: #e8ffff; margin: 6px 0; }
.project-card p { color: #cfcfcf; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tags span {
  font-size: .8rem; color: #bfefff; border: 1px solid rgba(0,255,255,.35);
  padding: 2px 8px; border-radius: 999px; background: rgba(0,255,255,.08);
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 16px 28px rgba(0,255,255,.12); border-color: rgba(0,255,255,.35); }

/* Contact */
.contact-panel {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  padding: 22px; border-radius: 14px; text-align: center;
}
.contact-panel p { line-height: 1.9; color: #d6d6d6; }
.contact-panel a { color: #00ffff; text-decoration: none; }
.contact-panel a:hover { text-decoration: underline; }

/* Footer */
.footer {
  text-align: center; padding: 28px 16px; color: #9a9a9a;
  border-top: 1px solid rgba(255,255,255,.08); background: #000; position: relative; z-index: 1;
}
.back-to-top {
  margin-top: 10px; background: transparent; color: #00ffff; border: 1px solid #00ffff;
  padding: .5rem .9rem; border-radius: 8px; cursor: pointer; transition: background .25s, color .25s;
}
.back-to-top:hover { background: #00ffff; color: #000; }

/* ====== Reveal on scroll ====== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.animate { opacity: 1; transform: translateY(0); }

/* ====== Responsive ====== */
@media (max-width: 980px) {
  .about-grid, .skills-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .nav-menu { display: none; }
  .nav-hamburger { display: flex; }
  .about-grid, .skills-grid, .projects-grid { grid-template-columns: 1fr; }
  .hero-section { padding-top: 100px; }
}
/* === Amélioration des cartes projets avec image === */
.project-media {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #0f0f12;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.05);
}

