/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  --header-height: 60px;
}

#particles-js {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
}

html, body {
  scroll-behavior: smooth;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #111;
  color: #eee;
  scroll-behavior: smooth;
}

body {
  scroll-snap-type: y mandatory;
  min-height: 100vh;
  background: transparent;
  color: #eee;
  position: relative;
  overflow-x: hidden;
  overflow-y: scroll;
}



main {
  position: relative;
  z-index: 10;
  max-width: 800px; 
  margin: 0 auto;
  padding: 76px 2rem 2rem;
  text-align: center;
}

/* Canvas fond interactif */
canvas#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: -100px; /* cache en haut */
  transition: top 0.3s ease-in-out;
  width: 100%;
  height: var(--header-height);
  background: rgba(30, 20, 50, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.7);
  z-index: 100;
  user-select: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  gap: 2rem;
}

header.show {
  top: 0; /* visible */
}

header nav {
  display: flex;
  gap: 20px;
}

header nav a {
  color: #ccc;
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(14px, 2vw, 24px);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  position: relative;
  transition: color 0.3s ease, transform 0.2s ease, background-color 0.3s ease;
}

header nav a.main-btn {
  padding: 0 1rem; 
  box-sizing: border-box;
  margin-right: auto; /* pousse Main à gauche */
  font-weight: bold;
  background-color: #a955f70e;
  color: white;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

header nav a:hover,
header nav a:focus {
  color: #a855f7;
  background-color: rgba(168, 85, 247, 0.15);
  transform: translateY(-3px);
}

header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 3px;
  background: #a855f7;
  border-radius: 3px;
  transition: width 0.3s ease, left 0.3s ease;
}

header nav a:hover::after,
header nav a:focus::after {
  width: 100%;
  left: 0;
}

#theme-toggle {
  background: transparent;
  border: 2px solid #a855f7;
  color: #a855f7;
  font-size: 1.3rem;
  padding: 2px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

#theme-toggle:hover,
#theme-toggle:focus {
  background-color: #a855f7;
  color: #111;
  transform: scale(1.1);
  outline: none;
}

main {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  padding: 7rem 2rem 2rem;
  text-align: center;
}

section {
  margin-bottom: 4rem;
}

h2 {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  color: #a855f7;
  user-select: none;
}

.avatar-circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 3px solid #cda1f7;
  box-shadow: 0 0 20px rgba(187, 187, 187, 0.5);
  display: block;
  margin: 40px auto 25px;
  overflow: hidden;
  user-select: none;
  position: relative;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-text {
  font-size: 2.6rem;
  color: #e01010;
  font-weight: 700;
  margin-bottom: 25px;
  user-select: none;
}

.about-section p {
  font-size: 1.6rem;
  font-weight: 500;
  color: #ddd;
  max-width: 400px;
  margin: 0 auto 25px;
  user-select: none;
}

#about {
  min-height: 100vh;
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
  justify-content: top;
  align-items: center;
  scroll-margin-top: 60px;
  box-sizing: border-box;
  padding: 3rem 2rem;
  width: 100%;
  max-width: 1100px; /* un max-width un peu plus contenu */
  margin-top: 2.5vh;
}

.about-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem; /* espace entre catégories */
  width: 100%;
  max-width: 100%; /* prends toute la largeur dispo */
}

.intro-section {
  background-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); /* profondeur */
  transition: opacity 0.8s;
}

.avatar-circle:hover {
  transform: scale(1.15);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.404);
}

.avatar-circle {
  border: 3px solid #cda1f7;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

#skills {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  scroll-margin-top: 70px;
}

#skills.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

.skill {
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  width: 100px;
  text-align: center;
  cursor: default;
  user-select: none;
  transition: background-color 0.3s ease;
}

.skill img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.skill p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #ddd;
}

.skill:hover {
  background: rgba(168, 85, 247, 0.15);
}





















.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 0.5fr); /* 3 cartes côte à côte */
  gap: 2rem;
  padding: 1rem;
  overflow: visible;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 cartes côte à côte */
  gap: 2rem;
  padding: 2rem 1rem;
  overflow: visible; /* important pour ne pas masquer */
}

.project-card {
  width: 100%;
  min-height: 320px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 85, 247, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #eee;
  text-decoration: none;
  padding: 1.5rem;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(168, 85, 247, 0.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}








.project-card {
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(168, 85, 247, 0.2);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(168, 85, 247, 0.1);
}












.project-card h3 {
  color: #a855f7;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.project-card p {
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
}

/* ----- Mobile : carrousel horizontal ----- */
@media (max-width: 900px) {
  .projects-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-snap-stop: always;
    scroll-padding-inline: 1rem;
    gap: 1.5rem;
  }

  .project-card {
    flex: 0 0 95%;
    max-width: 600px;
    margin-inline: auto;
    scroll-snap-align: start;
  }
}














  .contact-panel {
  backdrop-filter: blur(6px);
  border: 2px #6b46c1;
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background-color: rgba(255, 255, 255, 0.06);
  color: #a855f7;
  font-family: monospace;
  border-radius: 8px;
  overflow: hidden;
}

.console-output {
  height: 250px;
  overflow-y: auto;
  padding: 1rem;
  border-bottom: 1px solid #333;
}

.console-input {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

.console-input span {
  margin-right: 8px;
  color: #a855f7;
}

.console-input input {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #a855f7;
  font-family: monospace;
  font-size: 1rem;
  outline: none;
}













/* Scrollbar custom pour les conteneurs */
.projects-container::-webkit-scrollbar {
  height: 6px;
}
.projects-container::-webkit-scrollbar-thumb {
  background: #a855f7;
  border-radius: 4px;
}

/* Scrollbar globale */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #222;
}
::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
}





/* Scrollbar custom */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #222;
}
::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 4px;
}





.console-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.5rem;
  color: #a855f7; /* Violet néon */
  padding: 0.5rem;
  display: inline-block;
  border-radius: 4px;
  backdrop-filter: blur(1px);

.blinking-cursor {
  color: #a855f7;
  animation: blink 1s steps(1) infinite;
  border-radius: 4px;
  backdrop-filter: blur(1px);
}
  
  /* Effet néon léger */
  text-shadow:
    0 0 5px #a855f7,
    0 0 10px #a855f7,
    0 0 20px #c084fc,
    0 0 30px #c084fc,
    0 0 40px #d8b4fe;
}

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














/* Thème clair */
body.light-theme {
  background: transparent;
  background-color: #ffffffd0;
  color: #222;
  min-height: 100vh;
  height: max-content;
}





body.light-theme header {
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.light-theme header nav a {
  color: #272727;
}

body.light-theme header nav a.main-btn {
  color: #222;
  background-color: #f7f5fc6c;
}

body.light-theme header nav a:hover,
body.light-theme header nav a:focus {
  color: #6b46c1;
  background-color: rgba(107, 70, 193, 0.15);
}

body.light-theme #theme-toggle {
  border-color: #6b46c1;
  color: #6b46c1;
  background: transparent;
}

body.light-theme #theme-toggle:hover,
body.light-theme #theme-toggle:focus {
  background-color: #6b46c1;
  color: #f9f9f9;
  transform: scale(1.1);
  outline: none;
}



body.light-theme .skill p {
  color: rgba(0, 0, 0, 0.75);
}
body.light-theme .skill {
  color: #333;
  background: rgba(0,0,0,0.05);
}


body.light-theme .project-desc {
  color: rgba(0, 0, 0, 0.75);
}




body.light-theme ::-webkit-scrollbar-track {
  background: #ddd;
}

body.light-theme ::-webkit-scrollbar-thumb {
  background-color: #999;
}