/* --- MEDIA QUERIES MOBILE --- */
@media screen and (max-width: 768px) {
  /* HEADER */
  header {
    flex-direction: column;
    padding: 10px 20px;
  }
  header h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  nav a {
    margin: 8px 10px 0 0;
    font-size: 0.9rem;
  }

  /* HERO */
  .hero h2 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
    max-width: 90%;
  }

  /* ABOUT */
  .about {
    flex-direction: column;
    text-align: center;
  }
  .about img {
    width: 180px;
    height: 180px;
  }
  .about p {
    margin-top: 15px;
  }

  /* TIMELINE */
  .timeline {
    padding-left: 20px;
  }
  .timeline-item::before {
    left: -15px;
    width: 15px;
    height: 15px;
  }

  /* GRID CARDS */
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* STUDY PLAN */
  .study-wrapper {
    margin: 30px 20px;
  }
  .study-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* CONTACT FORM */
  .contact {
    margin: 0 15px;
  }
  .contact input, .contact textarea, .contact button {
    font-size: 0.95rem;
  }

  /* BACK TO TOP */
  #back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
  #back-to-top img {
    max-width: 70%;
    max-height: 70%;
  }

  /* FOOTER */
  footer {
    font-size: 0.85rem;
    padding: 15px 10px;
  }
}

* { margin:0; padding:0; box-sizing:border-box; font-family:'Roboto', sans-serif; }
body { background:#0f172a; color:#e0e0e0; scroll-behavior:smooth; }
a { text-decoration:none; color:inherit; }

/* --- HEADER --- */
header { position:fixed; top:0; left:0; width:100%; display:flex; justify-content:space-between; align-items:center; padding:15px 50px; background:rgba(15,23,42,0.95); backdrop-filter:blur(5px); box-shadow:0 2px 10px rgba(0,0,0,0.4); z-index:1000; }
header h1 { font-family:'Orbitron', sans-serif; color:#00aaff; font-size:1.8rem; }
nav a { margin-left:30px; font-weight:500; text-transform:uppercase; position:relative; transition:0.3s; }
nav a::after { content:""; position:absolute; width:0; height:2px; bottom:-3px; left:0; background:#00aaff; transition:0.3s; }
nav a:hover::after { width:100%; }
nav a.active { color:#00ffff; }

/* --- HERO --- */
.hero { height:90vh; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:0 20px; background:linear-gradient(120deg,#0f172a,#1e2a50); }
.hero h2 { font-family:'Orbitron', sans-serif; color:#00aaff; font-size:3rem; margin-bottom:15px; letter-spacing:1px; overflow:hidden; white-space:nowrap; border-right:0.15em solid #00aaff; }
#typed-name { color:#00ffff; }
.hero p { font-size:1.2rem; max-width:650px; line-height:1.6; color:#cfd8dc; opacity:0; transform:translateY(20px); transition: all 1s ease-out; }
.hero p.visible { opacity:1; transform:translateY(0); }

/* --- SECTION TITRES --- */
section { padding:100px 50px; position:relative; }
section h2 { font-size:2.4rem; color:#00aaff; margin-bottom:40px; display:inline-block; border-bottom:2px solid #00aaff; padding-bottom:5px; }

/* --- ABOUT --- */
.about { display:flex; flex-wrap:wrap; align-items:center; gap:40px; }
.about img { width:250px; height:250px; border-radius:50%; border:2px solid #00aaff; box-shadow:0 5px 25px rgba(0,170,255,0.3); object-fit:cover; }
.about p { flex:1; font-size:1.1rem; line-height:1.6; color:#cfd8dc; }

/* --- GRID CARDS --- */
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:30px; }
.card { background:#192038; border-radius:12px; padding:25px; transition:0.4s; cursor:pointer; border-left:4px solid #00aaff; }
.card h3 { font-family:'Orbitron', sans-serif; font-size:1.3rem; color:#00aaff; margin-bottom:10px; }
.card p { font-size:0.95rem; color:#cfd8dc; line-height:1.4; }
.card:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 12px 35px rgba(0,170,255,0.5); transition: transform 0.3s ease, box-shadow 0.3s ease; }

/* --- TIMELINE --- */
.timeline { position: relative; margin: 40px 0; padding-left: 40px; border-left: 4px solid #00aaff; }
.timeline-item { position: relative; margin-bottom: 40px; opacity:0; transform: translateX(-50px); transition: all 0.6s ease-out; }
.timeline-item.visible { opacity:1; transform: translateX(0); }
.timeline-item::before { content:''; position:absolute; left:-20px; top:5px; width:20px; height:20px; background:#00aaff; border-radius:50%; border:3px solid #0f172a; transition: transform 0.3s; }
.timeline-item:hover::before { transform: scale(1.2); }
.timeline-content { background:#192038; padding:20px 25px; border-radius:10px; box-shadow:0 5px 25px rgba(0,170,255,0.2); transition: transform 0.3s, box-shadow 0.3s; }
.timeline-item:hover .timeline-content { transform: translateY(-5px); box-shadow:0 10px 30px rgba(0,170,255,0.4); }
.timeline-item h3 { color:#00aaff; font-size:1.3rem; margin-bottom:8px; }
.timeline-item p { color:#cfd8dc; margin:5px 0; line-height:1.5; }

/* --- CONTACT --- */
.contact { max-width:600px; margin:0 auto; }
.contact form { display:flex; flex-direction:column; gap:15px; }
.contact input, .contact textarea { padding:12px; border-radius:8px; border:1px solid #00aaff; background:#192038; color:#e0e0e0; font-size:1rem; transition:0.3s; }
.contact input:focus, .contact textarea:focus { border-color:#00ffff; outline:none; box-shadow:0 0 10px rgba(0,255,255,0.3); }
.contact button { padding:12px; border-radius:8px; border:none; background:#00aaff; color:#0f172a; font-weight:bold; font-size:1rem; cursor:pointer; transition:0.3s; }
.contact button:hover { background:#00ffff; color:#0f172a; box-shadow:0 5px 20px rgba(0,255,255,0.3); }

/* --- BACK TO TOP --- */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #00aaff, #00ffff);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(0,170,255,0.4);
  z-index: 1001;
  transition: all 0.3s ease;
  padding: 0;
}

#back-to-top:hover {
  background: linear-gradient(135deg, #00ffff, #00aaff);
  transform: scale(1.2);
  box-shadow: 0 10px 30px rgba(0,255,255,0.5);
}

/* Conteneur de l'image pour forcer le centrage */
#back-to-top .arrow-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

#back-to-top img {
  max-width: 60%;
  max-height: 60%;
  display: block;
}

/* --- FADE-IN --- */
.fade-in { opacity:0; transform:translateY(20px); transition:1s ease-out; }
.fade-in.visible { opacity:1; transform:translateY(0); }

/* --- CANVAS PARTICULES --- */
canvas#network-bg { position:fixed; top:0; left:0; width:100%; height:100%; z-index:-1; pointer-events:none; }

/* --- STUDY INTERACTIF --- */
.study-wrapper {
  max-width: 1100px;
  margin: 50px auto 0;
}

.study-progress {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.progress-bar {
  flex: 1;
  height: 10px;
  background: #192038;
  border-radius: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg,#00aaff,#00ffff);
  transition: width 0.6s ease;
}

#progressText {
  font-weight: 500;
  color: #00ffff;
}

.study-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 25px;
}

.study-card {
  position: relative;
  background: #192038;
  padding: 25px;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: 0.4s;
  overflow: hidden;
}

.study-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: #00aaff;
}

.study-card .short {
  margin: 10px 0;
  color: #cfd8dc;
}

.study-card .details {
  max-height: 0;
  opacity: 0;
  transition: 0.4s;
}

.study-card.active .details {
  max-height: 300px;
  opacity: 1;
}

.study-card ul {
  margin-top: 15px;
  padding-left: 20px;
}

.study-card ul li {
  margin-bottom: 6px;
  color: #cfd8dc;
}

.study-card.active {
  border-color: #00ffff;
  box-shadow: 0 0 35px rgba(0,255,255,0.5);
  transform: translateY(-6px);
}

.study-card.locked {
  filter: grayscale(1);
  opacity: 0.6;
}

.study-card.locked:hover {
  filter: grayscale(0.5);
}

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.75rem;
  background: #00aaff;
  color: #0f172a;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: bold;
}

/* --- CERTIFICATIONS LIST --- */
.cert-list {
  list-style: none;
  margin-top: 15px;
}

.cert-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  color: #cfd8dc;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateX(-10px);
  animation: certFade 0.4s ease forwards;
}

.study-card.active .cert-list li {
  animation-delay: calc(var(--i) * 0.07s);
}

.cert-list li::before {
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* CERTIF OBTENUE */
.cert-list li.done::before {
  content: "✔";
  color: #00ffff;
}

/* CERTIF À PASSER */
.cert-list li.todo::before {
  content: "✖";
  color: #ff8800;
  opacity: 0.8;
}

@keyframes certFade {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- FOOTER (garde exactement le rendu actuel : le 2e bloc footer gagne) --- */
footer {
  text-align: center;
  padding: 25px 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #00aaff;
  font-weight: 500;
  font-size: 0.95rem;
  border-top: 2px solid #00aaff;
}

footer:hover {
  background: rgba(15, 23, 42, 1);
  color: #00ffff;
  transform: translateY(-3px);
}

footer .legal-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #cfd8dc;
  transition: color 0.3s;
}

footer .legal-link:hover {
  color: #00ffff;
  text-decoration: underline;
}

/* --- SKILLS --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.skill-card {
  background: #192038;
  padding: 25px;
  border-radius: 14px;
  border-left: 4px solid #00aaff;
  transition: 0.4s;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,170,255,0.4);
}

.skill-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: #00aaff;
  margin-bottom: 12px;
}

.skill-card ul {
  list-style: none;
  margin-bottom: 15px;
}

.skill-card ul li {
  margin-bottom: 6px;
  color: #cfd8dc;
  font-size: 0.95rem;
}

/* BARRE DE NIVEAU */
.skill-bar {
  height: 8px;
  background: #0f172a;
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00aaff, #00ffff);
  width: 0;
  transition: width 1.5s ease;
}


