/* Variables */
:root {
  --primary-color: #5e17eb;
  --secondary-color: #8953fd;
  --bg-color: #f5f5f5;
  --text-color: #333;
  --light-text-color: #777;
  --border-color: #ddd;
  --section-padding: 80px 0;
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 3px;
  background: var(--primary-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

img {
  max-width: 100%;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Animation pour la barre de navigation au scroll */
header.scrolled {
  padding: 15px 0;
  background-color: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 40px;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.menu-btn {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
}

/* Hero Section */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background-color: white;
  padding-top: 80px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--light-text-color);
  margin-bottom: 30px;
}

.hero-img {
  flex: 1;
  text-align: center;
}

.hero-img img {
  max-width: 80%;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* About Section */
#about {
  padding: var(--section-padding);
  background-color: white;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-img {
  flex: 1;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 20px;
}

/* Skills Section */
#skills {
  padding: var(--section-padding);
  background-color: var(--bg-color);
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px;
}

.skill-card {
  background: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

/* Animation pour les cartes de compétences */
.skill-card.animate {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-card i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.skill-card h3 {
  margin-bottom: 10px;
}

/* Projects Section */
#projects {
  padding: var(--section-padding);
  background-color: white;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* Style uniforme pour toutes les .project-card (projets 1 à 6 inclus) */
.project-card {
  background: var(--bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
  height: 200px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-content {
  padding: 20px;
}

.project-content h3 {
  margin-bottom: 10px;
}

.project-content p {
  margin-bottom: 15px;
  color: var(--light-text-color);
}

.project-links {
  display: flex;
  gap: 15px;
}

/* Contact Section */
#contact {
  padding: var(--section-padding);
  background-color: var(--bg-color);
}

.contact-container {
  display: flex;
  gap: 50px;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 30px;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-right: 15px;
}

.contact-form {
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(94, 23, 235, 0.3);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  background-color: #222;
  color: white;
  padding: 30px 0;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #333;
  color: white;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-5px);
}

.copyright {
  color: #aaa;
  font-size: 0.9rem;
}

/* Animations de section */
section {
  opacity: 1;
  transform: translateY(0);
}

section.appear {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 991px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .contact-container {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 10px 0;
  }

  .section-title {
    font-size: 2rem;
  }
}
