/* ===== VARIABLES CSS ===== */
:root {
  /* Couleurs thème clair - Palette Premium */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --text-primary: #1a2332;
  --text-secondary: #6b7280;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: #818cf8;
  --border-color: #e5e7eb;
  --card-shadow: 0 10px 25px rgba(99, 102, 241, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
}

/* Thème sombre */
body.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --accent-color: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-light: #c4b5fd;
  --border-color: #334155;
  --card-shadow: 0 10px 25px rgba(99, 102, 241, 0.2);
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
}

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

/* ===== NAVIGATION ===== */
.navbar {
  background-color: var(--bg-primary);
  box-shadow: 0 2px 20px rgba(99, 102, 241, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

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

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

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

.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: scale(1.1);
  border-color: var(--accent-color);
}

/* ===== SECTION ACCUEIL ===== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3.8rem;
  margin-bottom: 1rem;
  color: white;
  font-weight: 800;
  letter-spacing: -1px;
}

.highlight {
  color: #fbbf24;
  position: relative;
  font-weight: 900;
}

.subtitle {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition);
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
  border: 2px solid white;
  color: white;
  background-color: transparent;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background-color: white;
  color: #6366f1;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.fade-in-delay {
  animation: fadeIn 0.8s ease 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 0.8s ease 0.4s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 0.8s ease 0.6s forwards;
  opacity: 0;
}

/* ===== SECTIONS COMMUNES ===== */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  position: relative;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-title::after {
  content: "";
  display: block;
  width: 100px;
  height: 5px;
  background: var(--gradient-primary);
  margin: 1rem auto 0;
  border-radius: 10px;
}

/* ===== SECTION PROJETS ===== */
.projects {
  background-color: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
}

.project-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.project-card h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: var(--gradient-accent);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

/* ===== SECTION COMPÉTENCES ===== */
.skills {
  background: var(--bg-primary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-card {
  background-color: var(--bg-secondary);
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
  height: 350px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.08);
}

.skill-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
  border-color: var(--accent-color);
}

.skill-card:hover .skill-card-overlay {
  background-color: rgba(0, 0, 0, 0.65);
}

.skill-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(99, 102, 241, 0.3));
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  z-index: 2;
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #fbbf24;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.skill-card h3 {
  color: white;
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.skill-card p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.skill-level {
  background-color: var(--bg-primary);
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
  border-radius: 10px;
  transition: width 1s ease;
}

/* ===== SECTION CONTACT ===== */
.contact {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  bottom: -100px;
  left: -50px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.contact .section-title {
  color: white;
}

.contact .section-title::after {
  background: rgba(255, 255, 255, 0.5);
}

.contact-intro {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.contact-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.contact-icon {
  font-size: 1.8rem;
  color: #fbbf24;
}

.contact-item a {
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.contact-item a:hover {
  color: #fbbf24;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer p {
  color: rgb(255, 255, 255);
  margin: 0.5rem 0;
  font-weight: 500;
}
.contact-item {
    flex-direction: column; /* icône au-dessus du texte */
    text-align: center;
}

.contact-item i {
    font-size: 80px;
    margin-bottom: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

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

  .subtitle {
    font-size: 1.2rem;
  }

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

  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .navbar .container {
    justify-content: space-between;
  }
}

