@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
  --main-bg: #f8f9fa;
  --section-bg: #fff;
  --primary: #17a2b8;
  --primary-dark: #138496;
  --text: #343a40;
  --text-secondary: #6c757d;
  --border: #dee2e6;
  --shadow: rgba(0,0,0,0.05);
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Base */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--main-bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary-dark); }

/* Container */
.container { max-width: 1140px; margin: 0 auto; padding: 20px; }

/* Header */
header {
  background: var(--text);
  color: #fff;
  text-align: center;
  padding: 40px 0 30px 0;
  margin-bottom: 2rem;
}
header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.header-title { font-size: 1.2rem; color: #adb5bd; }
.profile-photo {
  width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  margin-bottom: 1rem; border: 5px solid #fff; box-shadow: 0 4px 8px var(--shadow);
}
.social-links a { color: #fff; margin: 0 10px; font-size: 1.2rem; transition: color 0.3s; }
.social-links a:hover { color: var(--primary); }

/* Navigation */
nav { background: var(--primary); padding: 1rem 0; position: sticky; top: 0; z-index: 100; }
nav ul { display: flex; justify-content: center; list-style: none; }
nav ul li { margin: 0 1.5rem; }
nav ul li a { color: #fff; font-weight: 500; font-size: 1.1rem; transition: color 0.3s; }
nav ul li a:hover { color: var(--text); }
.menu-toggle { display: none; cursor: pointer; font-size: 2rem; color: #fff; margin-left: auto; }

/* Sections */
.section { padding: 4rem 0; }
.section h2 {
  font-size: 2rem; text-align: center; margin-bottom: 2.5rem; color: var(--text);
  position: relative; padding-bottom: 0.5rem;
}
.section h2::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  height: 3px; width: 50px; background: var(--primary);
}

/* About */
#about {
  background: var(--section-bg); border-radius: 10px; box-shadow: 0 4px 8px var(--shadow); padding: 3rem;
}
#about p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; }

/* Skills */
#skills { background: var(--main-bg); }
.skill-category { margin-bottom: 3rem; }
.skill-category h3 {
  font-size: 1.5rem; color: var(--text); margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border); padding-bottom: 0.5rem;
}
.skills-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem;
}
.skill {
  background: var(--section-bg); border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 4px var(--shadow);
}
.skill-name {
  font-weight: 600; margin-bottom: 0.75rem; color: #495057;
  display: flex; align-items: center; font-size: 1.1rem;
}
.skill-name i { margin-right: 0.5rem; }
.skill-bar { background: #e9ecef; border-radius: 5px; height: 10px; margin-top: 0.5rem; overflow: hidden; }
.skill-level {
  height: 100%; background: var(--primary); border-radius: 5px; width: 0%; transition: width 0.6s;
}
.skill-level[style] { transition: width 0.6s; }

/* Projects */
#projects, #school-projects { background: var(--section-bg); }
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem;
}
.project-card {
  background: var(--main-bg); border-radius: 10px; box-shadow: 0 4px 8px var(--shadow);
  padding: 2rem; display: flex; flex-direction: column; justify-content: space-between;
}
.project-card h3 { font-size: 1.3rem; color: var(--text); margin-bottom: 1rem; }
.project-card p { font-size: 1rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

/* Project actions */
.project-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.cta-button {
  background: var(--primary); color: #fff; padding: 1rem 1.5rem; border: none; border-radius: 0.25rem;
  cursor: pointer; font-size: 1.1rem; text-decoration: none; display: inline-flex; align-items: center;
  transition: background 0.3s, transform 0.3s; min-width: 48px; min-height: 48px;
}
.cta-button i { margin-right: 0.4em; }
.cta-button:hover { background: var(--text); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(23,162,184,0.3); }

/* Technos badges */
.technos-list { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.techno-badge {
  background-color: #17a2b8; color: white; padding: 0.25rem 0.75rem; border-radius: 15px;
  font-size: 0.85rem; font-weight: 500;
}
.skill-name i, .skill-name svg {
  margin-right: 0.5rem; font-size: 1.2em; vertical-align: middle;
}

/* Experience & Education */
#parcours, #formations { background: var(--main-bg); }
.experience-card, .formation-card {
  background: var(--section-bg); border-radius: 10px; box-shadow: 0 4px 8px var(--shadow);
  padding: 2rem; margin-bottom: 2rem;
}
.experience-card h3, .formation-card h3 { font-size: 1.3rem; color: var(--text); margin-bottom: 1rem; }
.entreprise-date, .etablissement-date {
  font-style: italic; color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1rem;
}

/* Veille */
#veille ul { margin-top: 1rem; list-style: disc inside; color: var(--primary); }
#veille ul li { margin-bottom: 0.5rem; }

/* Contact */
#contact { background: var(--section-bg); }
.contact-details { margin-bottom: 2rem; text-align: center; }
.contact-details p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1rem; }
.contact-details ul { list-style: none; padding: 0; margin: 0; display: inline-block; }
.contact-details ul li { margin-bottom: 0.75rem; }
.contact-details ul li a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
.contact-details ul li a:hover { color: var(--text); }
.contact-details i { margin-right: 0.5rem; }

/* Footer */
footer {
  background: var(--text); color: #fff; text-align: center; padding: 1.5rem 0; font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .container { padding: 15px; }
  .projects-grid, .skills-list { grid-template-columns: 1fr; gap: 1.2rem; }
  .skill-category { margin-bottom: 2rem; }
}
@media (max-width: 991px) {
  nav ul.menu {
    display: none; flex-direction: column; align-items: center; background: var(--primary);
    position: absolute; top: 60px; left: 0; width: 100%; z-index: 999; padding-bottom: 1rem;
  }
  nav ul.menu.active { display: flex; }
  .menu-toggle { display: block; }
}
@media (max-width: 768px) {
  header { padding: 20px 0; }
  header h1 { font-size: 1.6rem; }
  .profile-photo { width: 90px; height: 90px; }
  nav ul.menu { flex-direction: column; align-items: center; padding: 0; }
  nav ul.menu li { margin: 0.7rem 0; }
  .section { padding: 1.2rem 0; }
  .project-card, .experience-card, .formation-card { padding: 1rem; }
  .skills-list { gap: 1rem; }
}
@media (max-width: 480px) {
  header h1 { font-size: 1.2rem; }
  .header-title { font-size: 1rem; }
  .profile-photo { width: 60px; height: 60px; }
  .section { padding: 0.7rem 0; }
  .cta-button, .project-actions a { font-size: 0.95rem; padding: 0.7rem 1.1rem; }
  .project-actions { gap: 0.5rem; }
}
img, video { max-width: 100%; height: auto; display: block; }
