/* ======== GLOBAL ======== */
body {
  margin: 0;
  padding: 0;
  background-color: #121212;
  color: #eeeeee;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.6;
}

/* ======== HEADER ======== */
.main-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.5rem;
  margin: 2rem auto;
  max-width: 850px;
  background-color: #1c1c1c;
  border-radius: 50px;
  z-index: 0;
  overflow: hidden;
  border: 1px solid #00ffff55;
  box-shadow: 0 0 12px #00ffff44;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  border-radius: 12px;
  padding: 0.2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.logo img {
  height: 100%;
  width: auto;
  border-radius: 8px;
}

.logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px #00ffff, 0 0 16px #00ffff88;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #eeeeee;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #00ffff;
}

.contact-btn {
  background-color: #00ffff;
  color: #000;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05rem;
  box-shadow: 0 0 20px #00ffff88, 0 0 28px #00ffff55;
  transition: background-color 0.3s ease;
}

.contact-btn:hover {
  background-color: #00e0e0;
}

/* Balle animée */
.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #00ffff;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ffff, 0 0 18px #00ffffaa;
  animation: circuitPath 4s linear infinite;
  z-index: 2;
}

@keyframes circuitPath {
  0%   { top: 0; left: 0; transform: translate(0, 0); }
  25%  { top: 0; left: 100%; transform: translate(-100%, 0); }
  50%  { top: 100%; left: 100%; transform: translate(-100%, -100%); }
  75%  { top: 100%; left: 0; transform: translate(0, -100%); }
  100% { top: 0; left: 0; transform: translate(0, 0); }
}

/* ======== MAIN ======== */

.formation-page {
  max-width: 1200px;
  margin: auto;
  padding: 4rem 2rem;
  color: #eeeeee;
}

/* ======== Titre d'intro bleu ======== */
.intro-title {
  color: #00ffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 5px #00ffff66;
  text-align: center;
}

/* Blocs généraux */
.formation-block {
  background-color: #1e1e1e;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 12px 30px rgba(0, 255, 255, 0.1);
  border-left: 6px solid #00ffff55;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formation-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 255, 255, 0.2);
}

.formation-block h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #00ffff;
  margin-bottom: 1rem;
  text-shadow: 0 0 5px #00ffff66;
}

.formation-block p,
.formation-block li {
  font-size: 1.05rem;
  color: #dddddd;
  line-height: 1.6;
}

/* Objectifs en grille */
.objectifs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

/* Liste à puces */
.bullet-list {
  list-style: disc;
  padding-left: 1.2rem;
  color: #ccc;
}

/* Projets */
.formation-projects {
  margin-top: 5rem;
  text-align: center;
}

.projects-title {
  font-size: 2rem;
  color: #00ffff;
  margin-bottom: 2rem;
}

.project-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.project-card {
  background-color: #1c1c1c;
  border-radius: 16px;
  padding: 1.5rem;
  width: 280px;
  border: 1px solid #00ffff55;
  box-shadow: 0 0 15px #00ffff33;
  transition: transform 0.3s ease;
  text-align: center;
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px #00ffff88;
}

.project-card img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto 0.8rem auto;
  border-radius: 12px;
  object-fit: contain;
}

.project-card h3 {
  color: #00ffff;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: #00ffff22;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.project-spec {
  font-size: 0.9rem;
  color: #00ffff;
  background-color: rgba(0, 255, 255, 0.05);
  border: 1px solid rgba(0, 255, 255, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  margin: 0.5rem auto 0.5rem auto;
  display: inline-block;
  font-weight: 500;
  box-shadow: inset 0 0 4px rgba(0, 255, 255, 0.1);
  max-width: 90%;
  text-align: center;
  white-space: normal;  /* autorise les retours à la ligne */
  line-height: 1.3;
}

.project-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.95rem;
  color: #cccccc;
}

.explorer-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.explorer-window {
  background: #222;
  border: 2px solid #00ffff55;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  padding: 1rem;
  color: #fff;
  box-shadow: 0 0 15px #00ffff88;
}

.explorer-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.explorer-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.file-icon a {
  text-decoration: none;
  color: #00ffff;
  font-size: 1rem;
  padding: 0.3rem 0.5rem;
  display: inline-block;
  border-radius: 6px;
  transition: background 0.2s;
}

.file-icon a:hover {
  background: #00ffff22;
}

.hidden {
  display: none !important;
}

.close-btn {
  background: transparent;
  border: none;
  color: #00ffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.close-btn:hover {
  background-color: rgba(0, 255, 255, 0.1);
}

/* ======== FOOTER ======== */
.site-footer {
  padding: 2rem 1rem;
  background-color: #1c1c1c;
  text-align: center;
  border-top: 1px solid #2e2e2e;
  box-shadow: 0 -4px 12px #00ffff33;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.social-icons a img {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.social-icons a:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px #00ffffcc);
}

.copyright {
  color: #aeaeae;
  font-size: 0.875rem;
}

/* ======== RESPONSIVE ======== */
@media screen and (max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    max-width: 95%;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
  }

  .contact-btn {
    align-self: stretch;
    text-align: center;
    width: 100%;
  }

  .spark {
    display: none;
  }
}
