/* ======== 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 ======== */

.stage-page {
  max-width: 1200px;
  margin: auto;
  padding: 4rem 2rem;
  color: #eeeeee;
  background: #121212;
}

/* Blocs principaux */
.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, box-shadow 0.3s;
}
.formation-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 255, 255, 0.2);
}

/* Titres et emojis */
.intro-title {
  color: #00ffff;
  font-size: 2.2rem;
  font-weight: 800;
  text-shadow: 0 0 5px #00ffff66;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.text-loc { color: #77b5ff; margin-bottom: 0.6em; font-size: 1.13rem; }

/* Image à droite */
.stage-company-flex {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: flex-start;
}
.company-text {
  flex: 1;
}
.img-entreprise {
  flex: 1;
  max-width: 370px;
  min-width: 250px;
  margin: 0;
  align-self: center;
  border-radius: 12px;
  box-shadow: 0 0 14px #00ffff33;
}
@media (min-width: 900px) {
  .stage-company-flex {
    flex-direction: row;
    align-items: center;
  }
  .company-text {
    padding-right: 2rem;
  }
  .img-entreprise {
    margin: 0;
  }
}

/* Bouton bleu */
.btn-blue {
  display: inline-block;
  margin-top: 1.5rem;
  background: #2196f3;
  color: #fff;
  padding: 0.6rem 1.6rem;
  border-radius: 24px;
  font-weight: 600;
  font-size: 1.08rem;
  text-decoration: none;
  box-shadow: 0 0 10px #2196f355;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-blue:hover { background: #1565c0; box-shadow: 0 0 20px #2196f3aa; }

/* Sites */
.sites-list { display: flex; flex-direction: column; gap: 2.5rem; margin-top: 2rem; }
.site-item { display: flex; flex-direction: column; gap: 1.3rem; background: #232531; border-radius: 1rem; padding: 1.5rem; box-shadow: 0 0 10px #00ffff11; }
.site-item.reverse { flex-direction: column-reverse; }
.site-title { color: #00e6e6; font-size: 1.25rem; font-weight: 700; margin-bottom: 0.3em; }
.site-loc { display: block; color: #6be6ff; font-size: 1.02rem; margin-top: 0.5rem; }
.site-img { width: 100%; max-width: 350px; border-radius: 1rem; object-fit: cover; height: 170px; box-shadow: 0 0 10px #00ffff22; }
@media (min-width: 900px) {
  .site-item, .site-item.reverse { flex-direction: row; align-items: center; }
  .site-item.reverse { flex-direction: row-reverse; }
  .site-img { height: 200px; }
}

/* Missions confiées interactives */
.missions-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (min-width: 800px) {
  .missions-cards {
    grid-template-columns: 1fr 1fr;
  }
}
.mission-card {
  background: #232531;
  border-radius: 1rem;
  box-shadow: 0 0 12px #00ffff22;
  padding: 1.2rem 1.2rem 0.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.mission-btn {
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font: inherit;
  padding: 0;
  margin: 0 0 0.7em 0;
  font-size: 1.1rem;
  transition: filter 0.2s;
}
.mission-btn:hover {
  filter: brightness(1.35);
}
.mission-emoji {
  font-size: 2rem;
  margin-top: -2px;
}
.mission-title {
  color: #00ffff;
  font-weight: 700;
  font-size: 1.18rem;
  margin-bottom: 0.1em;
  text-align: left;
}
.mission-detail {
  width: 100%;
  margin-top: 0;
  padding: 0.6em 0.2em 1.2em 2.1em;
  color: #c2e4ff;
  background: none;
  border-left: 3px solid #00ffff60;
  border-radius: 0 0 0.9em 0.9em;
  font-size: 1.06rem;
  line-height: 1.6;
  animation: fadeIn .3s;
}
.mission-detail ul {
  margin: 0.6em 0 0.3em 0.5em;
  padding-left: 1.2em;
  color: #5fffa3;
  font-size: 1em;
}
.mission-detail li {
  margin-bottom: 0.5em;
}
.file-link {
  display: inline-block;
  margin-top: 0.3em;
  color: #2196f3;
  text-decoration: underline;
  font-weight: 500;
}
.file-link:hover {
  color: #00ffff;
  text-shadow: 0 0 6px #00ffff88;
}
.hidden { display: none; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px);}
  to   { opacity: 1; transform: translateY(0);}
}



/* ======== 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;
  }
}
