/* ===== STYLE GLOBAL ===== */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  background: #f4f4f9;
  color: #333;
  line-height: 1.6;
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(135deg, #1a1a1d, #333);
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
}
#profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffdd57;
  display: block;
  margin: 0 auto 15px auto;
}
header h1 {
  margin: 0;
  font-size: 2.5rem;
}
header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ===== HAMBURGER ===== */
#menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #ffdd57;
  cursor: pointer;
  margin-top: 10px;
}

/* ===== NAVIGATION ===== */
nav {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
nav a {
  color: #ffdd57;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}
nav a:hover {
  color: #fff;
}

/* ===== BOUTON DARK MODE ===== */
#dark-mode-toggle {
  margin-top: 15px;
  padding: 8px 15px;
  background: #ffdd57;
  color: #222;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}
#dark-mode-toggle:hover {
  background: #ffc107;
}

/* ===== SECTIONS ===== */
section {
  padding: 4rem 10%;
  max-width: 1000px;
  margin: auto;
}
section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #222;
  position: relative;
}
section h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: #ffdd57;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== PROJETS ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.card h3 {
  margin-top: 0;
  color: #222;
}
.card a {
  display: inline-block;
  margin-top: 10px;
  color: #1a73e8;
  text-decoration: none;
  font-weight: bold;
}
.card a:hover {
  text-decoration: underline;
}

/* ===== CONTACT ===== */
#contact p {
  text-align: center;
  font-size: 1.1rem;
}
#contact a {
  color: #1a73e8;
  font-weight: bold;
  text-decoration: none;
}
#contact a:hover {
  text-decoration: underline;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  background: #1a1a1d;
  color: #aaa;
  font-size: 0.9rem;
}
footer p {
  margin: 0;
}

/* ===== DARK MODE ===== */
body.dark {
  background: #121212;
  color: #e0e0e0;
}
body.dark header {
  background: linear-gradient(135deg, #000, #222);
}
body.dark nav a {
  color: #ffdd57;
}
body.dark nav a:hover {
  color: #fff;
}
body.dark .card {
  background: #1e1e1e;
  color: #e0e0e0;
}
body.dark footer {
  background: #000;
  color: #aaa;
}

/* ===== APPARITION DES CARTES ===== */
.hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}
.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CURSEUR MACHINE À ÉCRIRE ===== */
#cursor {
  display: inline-block;
  margin-left: 3px;
  color: #ffdd57;
  animation: blink 0.7s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    margin-top: 15px;
  }
  nav a {
    margin: 10px 0;
    font-size: 1.2rem;
  }
  #menu-toggle {
    display: block;
  }
  nav.active {
    display: flex;
  }
}
