/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', sans-serif;
  background: #0b1224;
  color: #cbd5e1;
  line-height: 1.5;
}

a {
  color: #22d3ee;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  text-decoration: underline;
  outline: none;
}

/* Navbar */
header.navbar {
  background: #061122;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 900;
  font-size: 1.5rem;
  color: #22d3ee;
}

.logo span {
  color: #4ade80; /* vert fluo */
}

nav ul.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav ul.nav-links li a {
  color: #cbd5e1;
  font-weight: 600;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent; /* barre invisible par défaut */
  text-decoration: none; /* désactive le soulignement natif */
  -webkit-text-decoration-skip: none; /* pour Safari */
  text-underline-offset: 0; /* éviter décalage sous soulignement */
  transition: border-color 0.3s ease;
}

nav ul.nav-links li a:hover,
nav ul.nav-links li a:focus,
nav ul.nav-links li a.active {
  border-bottom-color: #22d3ee; /* barre bleu */
  text-decoration: none !important; /* forcer suppression soulignement */
  outline: none;
}

/* Burger menu */
.burger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.burger span {
  width: 25px;
  height: 3px;
  background: #22d3ee;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.burger.toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.toggle span:nth-child(2) {
  opacity: 0;
}

.burger.toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive nav */
@media (max-width: 768px) {
  nav ul.nav-links {
    position: fixed;
    top: 64px;
    right: 0;
    background: #061122;
    height: calc(100% - 64px);
    width: 200px;
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  nav ul.nav-links.nav-active {
    transform: translateX(0);
  }

  .burger {
    display: flex;
  }
}

/* Main content */
main {
  max-width: 960px;
  margin: 3rem auto 5rem;
  padding: 0 1rem;
}

.page-header {
  text-align: center;
  padding: 0 2rem 3rem;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #00ffe7;
  font-weight: 800;
}

.page-header p {
  font-size: 1.1rem;
  color: #94a3b8;
}

/* Timeline */
.timeline {
  margin-top: 3rem;
  display: flex;
  justify-content: space-between;
  position: relative;
}

/* Ligne centrale */
.timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22d3ee, #4ade80);
  transform: translateY(-50%);
  z-index: 1;
}

/* Items */
.timeline-item {
  background: #112233;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  width: 28%;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover,
.timeline-item:focus-within {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.8);
}

.timeline-date {
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 0.6rem;
  letter-spacing: 1.5px;
  font-size: 0.9rem;
}

.timeline-content h3 {
  color: #22d3ee;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 1.2rem;
}

.timeline-content p {
  font-size: 1rem;
  color: #cbd5e1;
}

/* Responsive timeline */
@media (max-width: 768px) {
  .timeline {
    flex-direction: column;
    gap: 2rem;
  }

  .timeline::before {
    top: 0;
    left: 20px;
    width: 3px;
    height: 100%;
    transform: none;
  }

  .timeline-item {
    width: auto;
    margin-left: 50px;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
  }

  .timeline-item:hover,
  .timeline-item:focus-within {
    transform: none;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.6);
  }

  .timeline-date {
    font-size: 1rem;
  }
}

/* Projects */
.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 1rem;
}

/* Chaque carte prend 30% de largeur sur grand écran */
.project-card {
  flex: 1 1 30%;
  max-width: 30%;
  background: #112233;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Pour que l’image prenne bien la place */
.project-image {
  width: 100%;
  padding-top: 56.25%; /* ratio 16:9 */
  background-size: cover;
  background-position: center;
}

/* Contenu projet */
.project-content {
  padding: 1rem;
  flex-grow: 1;
}

/* Responsive mobile : une carte = 100% largeur */
@media (max-width: 768px) {
  .project-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
}


.project-card:hover,
.project-card:focus-within {
  transform: translateY(-10px);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}
.project-title {
  font-size: 1.8rem;
  color: #00ffe7;
  margin-bottom: 1rem;
}

.project-desc {
  font-size: 1rem;
  color: #b0dfe5;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.project-btn {
  align-self: flex-start;
  background-color: transparent;
  border: 2px solid #00ffe7;
  color: #00ffe7;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-btn:hover,
.project-btn:focus {
  background-color: #00ffe7;
  color: #0a0f1a;
  box-shadow: 0 0 12px #00ffe7;
  outline: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 0.5rem 1rem;
  background: #061122;
  color: #94a3b8;
  font-size: 0.9rem;
  width: 100%;
}

.timeline-zigzag {
  position: relative;
  max-width: 900px;
  margin: 3rem auto;
  padding: 2rem 0;
  clear: both; /* Pour que les floats soient bien gérés */
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #22d3ee, #4ade80);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  position: relative;
  width: 45%;
  padding: 1rem 2rem;
  background: #112233;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 0 10px rgb(34 211 238 / 0.5);
  z-index: 2;
  transition: transform 0.3s ease;
  clear: both;
}

.timeline-item.left {
  float: left;
  text-align: right;
}

.timeline-item.right {
  float: right;
  text-align: left;
}

/* Points */
.timeline-item.left::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  right: -32px; /* à droite du bloc gauche */
  width: 20px;
  height: 20px;
  background: #22d3ee;
  border: 4px solid #4ade80;
  border-radius: 50%;
  z-index: 3;
}

.timeline-item.right::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: -32px; /* à gauche du bloc droit */
  width: 20px;
  height: 20px;
  background: #22d3ee;
  border: 4px solid #4ade80;
  border-radius: 50%;
  z-index: 3;
}

/* Responsive */
@media (max-width: 768px) {
  .timeline-zigzag {
    width: 95%;
  }
  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    float: none !important;
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .timeline-item::before {
    left: -30px !important;
    right: auto !important;
  }
}
.timeline-zigzag::after {
  content: "";
  display: block;
  clear: both;
}

.certif-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.certif-card {
  background: #101820;
  color: #ffffff;
  border: 1px solid #1e90ff33;
  border-radius: 12px;
  padding: 1.5rem;
  width: 300px;
  text-align: center;
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.2);
  transition: transform 0.3s ease;
}

.certif-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.certif-card img {
  width: 150px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.3));
}

.certif-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #00ffff;
}

.certif-card p {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Responsive mobile */
@media (max-width: 768px) {
  .certif-container {
    flex-direction: column;
    align-items: center;
  }

  .certif-card {
    width: 90%;
  }
}

.certif-card {
  text-decoration: none;
  color: inherit; /* pour garder la couleur du texte normale */
  cursor: pointer;
}

.timeline-item .content img.timeline-icon {
  width: 80px; /* ou plus petit selon ce que tu veux */
  height: auto;
  margin-top: 10px;
}

.contact-form {
  max-width: 600px;
  margin: 4rem auto;
  padding: 2rem;
  background: #10121a;
  border: 1px solid #1f2a38;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,255,255,0.05);
}

.contact-form form {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  font-weight: 600;
  color: #00ffff;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

.contact-form input,
.contact-form textarea {
  background-color: #0e121b;
  color: #e0e0e0;
  border: 1px solid #2a3a4f;
  border-radius: 8px;
  padding: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border: 1px solid #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.contact-form .btn {
  background: linear-gradient(145deg, #00ffff, #0099cc);
  border: none;
  padding: 0.9rem 1.2rem;
  color: #0e121b;
  font-weight: bold;
  font-size: 1rem;
  margin-top: 2rem;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.3s ease;
}

.contact-form .btn:hover {
  background: linear-gradient(145deg, #0099cc, #00ffff);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
}

.profile-header {
  display: flex;
  align-items: center;
  max-width: 900px;
  margin: 2rem auto 3rem auto;
  gap: 1.5rem;
  padding: 0 1rem;
}

.profile-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #48d1cc;
  box-shadow: 0 0 15px #48d1cc;
  flex-shrink: 0;
}

.profile-info h1 {
  margin: 0 0 0.3rem 0;
  font-size: 2.2rem;
  color: #48d1cc;
  font-weight: 700;
}

.profile-info p {
  margin: 0.2rem 0;
  color: #a0b9ca;
  font-weight: 600;
}

/* Responsive : empiler en colonne sur petit écran */
@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  .profile-avatar {
    margin-bottom: 1rem;
  }
}
