/* Variables globales */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

:root {
  --primary-color: var(--color-primary);
  --primary-hover: #1a43b9;
  --dark-bg: var(--page-bg);
  --card-bg: var(--card-bg);
  --text-color: var(--page-text);
  --secondary-text: var(--page-text-muted);
  --transition-speed: 0.3s;
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  --card-hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  --border-radius: 12px;
}

/* Style général */
body {
  background-color: var(--page-bg) !important;
  font-family: "Poppins", sans-serif;
  color: var(--page-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header moderne sans image de fond */
.header {
  height: 350px;
  background: linear-gradient(-45deg, #1f50dc, #4bbf73, #1f50dc, #4bbf73);
  background-size: 400% 400%;
  background-position: 0% 50%;
  animation: gradientShift 15s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 60px;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(var(--header-overlay), rgba(0, 0, 0, 0.4));
  z-index: 1;
  border-radius: 0 0 20px 20px;
}

.header-content {
  margin-top: 20px;
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 1200px;
}

.header-text {
  flex: 1;
}

.header h1 {
  color: #ffffff;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  font-size: 2.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

.profile-image {
  margin-left: 50px;
}

.profile-image img {
  max-height: 250px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(31, 80, 220, 0.4);
}

/* Container principal */
.body {
  padding: 0 5%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
}

/* Section intro */
.intro-section {
  text-align: center;
  margin-bottom: 60px;
  padding: 0 20px;
}

.section-title {
  color: var(--text-color);
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 25px;
  font-size: 1.8rem;
}

.section-title::after {
  content: "";
  position: absolute;
  width: 50%;
  height: 3px;
  bottom: -10px;
  left: 25%;
  background-color: var(--primary-color);
  transition: width var(--transition-speed);
}

.intro-section:hover .section-title::after {
  width: 100%;
  left: 0;
}

.lead {
  color: var(--secondary-text);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

/* Skills Section */
.skills-container {
  margin-bottom: 80px;
}

.skills-category-title {
  color: var(--page-text);
  margin: 20px 0 12px;
  font-weight: 700;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 40px 20px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-speed);
}

.skills:hover {
  box-shadow: var(--card-hover-shadow);
}

.skills i {
  font-size: 50px;
  transition: all var(--transition-speed);
  animation: float 3s infinite ease-in-out;
  animation-delay: calc(var(--i) * 0.2s);
}

/* Les icônes colorées gardent leurs couleurs naturelles par défaut */

.skills i:not(.colored) {
  color: var(--text-color);
}

/* Styles spécifiques pour les icônes problématiques en mode sombre */
[data-theme="dark"] .skills i.devicon-symfony-original.colored {
  color: #ffffff !important;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

[data-theme="dark"] .skills i.devicon-github-original.colored {
  color: #ffffff !important;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.skills i:hover {
  transform: translateY(-10px) scale(1.1);
}

.skills i:not(.colored):hover {
  color: var(--primary-color);
}

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

/* Experience Section */
.experience-section {
  margin-bottom: 80px;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 40px auto 0;
  padding: 0 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  width: 4px;
  background-color: var(--primary-color);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.experience-item {
  position: relative;
  margin-bottom: 50px;
  width: calc(50% - 40px);
}

.experience-item:nth-child(even) {
  margin-left: auto;
}

.experience-item::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  top: 15px;
}

.experience-item:nth-child(odd)::after {
  right: -50px;
}

.experience-item:nth-child(even)::after {
  left: -50px;
}

.experience-content {
  background-color: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed);
}

.experience-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}

.experience-year {
  background-color: var(--primary-color);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 5px 15px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}

.experience-content h3 {
  color: var(--text-color);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.experience-content p {
  color: var(--secondary-text);
  margin-bottom: 0;
}

/* Projects Section */
.projects-section {
  margin-bottom: 80px;
}

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

.project-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--card-hover-shadow);
}

.project-card-header {
  height: 8px;
  background-color: var(--primary-color);
}

.project-card-body {
  padding: 25px;
  flex: 1;
}

.project-card h3 {
  color: var(--text-color);
  font-size: 1.3rem;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.project-card h3::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width var(--transition-speed);
}

.project-card:hover h3::after {
  width: 100%;
}

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

.tech-used {
  background-color: rgba(31, 80, 220, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--secondary-text);
  font-size: 0.85rem;
  display: inline-block;
  margin-top: auto;
}

/* Contact Button */
.contact-button {
  text-align: center;
  margin-bottom: 60px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  transition: all var(--transition-speed);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  box-shadow: 0 5px 15px rgba(31, 80, 220, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(31, 80, 220, 0.4);
}

.btn-primary i {
  margin-left: 8px;
  transition: transform var(--transition-speed);
}

.btn-primary:hover i {
  transform: translateX(5px);
}

/* Animation d'entrée */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 992px) {
  .header {
    margin-top: 150px !important;
  }

  .header h1 {
    font-size: 4.5rem;
  }

  .header p {
    font-size: 1.8rem;
    margin-left: 50px;
  }

  h2 {
    font-size: 2.5rem !important;
  }

  h3 {
    font-size: 2.5rem !important;
  }

  .project-card p {
    font-size: 1.6rem;
  }

  .tech-used {
    font-size: 1.2rem;
  }

  .experience-content p {
    font-size: 1.8rem;
  }

  .lead {
    font-size: 1.9rem;
  }

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

  .profile-image {
    margin-left: 0;
    margin-top: 30px;
  }

  .profile-image img {
    max-height: 180px;
  }

  .timeline::before {
    left: 30px;
  }

  .experience-item {
    width: 100%;
    padding-left: 70px;
  }

  .experience-item:nth-child(even) {
    margin-left: 0;
  }

  .experience-item::after {
    left: 20px !important;
    right: auto !important;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .header {
    height: 300px;
    background-attachment: scroll;
  }

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

  .profile-image img {
    max-height: 150px;
  }

  .skills i {
    font-size: 40px;
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .header {
    height: 250px;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .profile-image img {
    max-height: 120px;
  }

  .skills {
    gap: 20px;
    padding: 30px 15px;
  }

  .skills i {
    font-size: 35px;
  }

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