/* Reset et font */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  background: rgba(30,30,47,0.95);
  backdrop-filter: blur(10px);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top:0;
  z-index:1000;
  box-shadow:0 4px 12px rgba(0,0,0,0.2);
}
header h1 { font-weight:600; font-size:1.8rem; }

/* Sections */
.section { padding:4rem 2rem; max-width:1000px; margin:auto; text-align:center; }
.section h2 {
  font-size:2.2rem;
  margin-bottom:1rem;
  position:relative;
}
.section h2::after {
  content:'';
  display:block;
  width:60px;
  height:4px;
  background:#ffd369;
  margin:0.5rem auto 0;
  border-radius:2px;
}

/* À propos */
.about-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: max-height 0.6s ease, padding 0.4s ease;
  overflow: hidden;
  max-width: 900px;
  margin: 2rem auto 0;
}
.about-card.collapsed {
  max-height: 120px;
  padding: 1rem 2rem;
}
.about-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}
.about-emoji { font-size: 4rem; }
.about-title { font-size: 1.5rem; font-weight: 600; }
.toggle-btn {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.about-card.collapsed .toggle-btn { transform: rotate(180deg); }
.about-text { transition: opacity 0.4s ease, transform 0.4s ease; }
.about-card.collapsed .about-text { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.about-text p { margin-bottom:1rem; font-size:1.1rem; }
.about-text .highlight { font-weight:600; color:#ffd369; font-size:1.2rem; }

/* Projets */
.projects-grid { display:grid; gap:2rem; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); margin-top:2rem; }
.project-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-radius:1rem;
  padding:2rem;
  box-shadow:0 8px 24px rgba(0,0,0,0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.project-card:hover { transform:translateY(-10px) scale(1.02); box-shadow:0 12px 30px rgba(0,0,0,0.2); }

/* Boutons */
.btn {
  display:inline-block;
  margin-top:1rem;
  background:#1e1e2f;
  color:white;
  padding:0.8rem 1.5rem;
  border-radius:12px;
  text-decoration:none;
  font-weight:600;
  transition:all 0.3s ease;
}
.btn:hover { background:#ffd369; color:#1e1e2f; transform:translateY(-2px); }

/* Footer */
footer {
  text-align:center;
  padding:2rem;
  background: rgba(30,30,47,0.95);
  color:white;
  backdrop-filter: blur(10px);
  margin-top:3rem;
}

/* Fade-in animation */
.fade { opacity:0; transform:translateY(20px); transition:all 0.8s ease; }
.fade.visible { opacity:1; transform:translateY(0); }

/* Responsive */
@media (max-width:768px) {
  .projects-grid { grid-template-columns:1fr; }
}

/* --- Bouton de thème --- */
.theme-toggle {
  background: none;
  border: 2px solid #ffd369;
  color: #ffd369;
  font-size: 1.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.theme-toggle:hover {
  background: #ffd369;
  color: #1e1e2f;
}

/* --- Mode sombre --- */
body.dark-mode {
  background: linear-gradient(135deg, #1e1e2f, #2a2a3d);
  color: #f5f5f5;
}
body.dark-mode header, body.dark-mode footer {
  background: rgba(255, 255, 255, 0.1);
  color: #ffd369;
}
body.dark-mode .about-card, body.dark-mode .project-card {
  background: rgba(40, 40, 60, 0.9);
  color: #f5f5f5;
}
body.dark-mode .btn {
  background: #ffd369;
  color: #1e1e2f;
}
body.dark-mode .btn:hover {
  background: #f5f5f5;
  color: #1e1e2f;
}
body.dark-mode .theme-toggle {
  border-color: #f5f5f5;
  color: #f5f5f5;
}
body.dark-mode .theme-toggle:hover {
  background: #f5f5f5;
  color: #1e1e2f;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 5000;
}

.modal-content {
  width: 500px;
  max-width: 90vw;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.modal input {
  width: 90%;
  padding: 15px;
  margin-top: 15px;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 1.1rem;
}

.close {
  cursor: pointer;
  float: right;
  font-size: 2rem;
  font-weight: bold;
}
