/*===== GOOGLE FONTS =====*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 4rem;

  /* Colors */
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --dark-color: #0f172a;
  --dark-alt: #1e293b;
  --text-color: #334155;
  --text-light: #64748b;
  --bg-color: #ffffff;
  --bg-alt: #f8fafc;
  --border-color: #e2e8f0;

  /* Fonts */
  --body-font: "Poppins", sans-serif;
  --heading-font: "Space Grotesk", sans-serif;
  --big-font: 3.5rem;
  --h1-font: 2.5rem;
  --h2-font: 2rem;
  --h3-font: 1.5rem;
  --normal-font: 1rem;
  --small-font: 0.875rem;

  /* Spacing */
  --mb-1: 0.5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Dark mode */
body.dark-mode {
  --bg-color: #0f172a;
  --bg-alt: #1e293b;
  --text-color: #e2e8f0;
  --text-light: #94a3b8;
  --dark-color: #f8fafc;
  --border-color: #334155;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font);
  color: var(--text-color);
  background: var(--bg-color);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/*===== HEADER & NAV =====*/
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

body.dark-mode .header {
  background: rgba(15, 23, 42, 0.95);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--heading-font);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.nav__link {
  position: relative;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active-link::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.theme-toggle {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--primary-color);
  color: white;
}

.nav__toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/*===== HERO =====*/
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-50px) rotate(180deg);
  }
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero__greeting {
  font-size: var(--h3-font);
  color: var(--primary-color);
  margin-bottom: var(--mb-2);
  font-weight: 600;
}

.hero__title {
  font-size: var(--big-font);
  margin-bottom: var(--mb-2);
  line-height: 1.1;
}

.hero__title span {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--h3-font);
  color: var(--text-light);
  margin-bottom: var(--mb-4);
  font-weight: 400;
}

.hero__description {
  color: var(--text-light);
  margin-bottom: var(--mb-4);
  max-width: 500px;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  font-size: var(--normal-font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.hero__social {
  display: flex;
  gap: 1rem;
  margin-top: var(--mb-4);
}

.social-link {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--transition);
}

.social-link:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-3px);
  border-color: transparent;
}

.hero__img-wrapper {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

.hero__img-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {

  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.hero__img {
  position: relative;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 10px solid var(--bg-color);
  box-shadow: var(--shadow-xl);
  z-index: 2;
  margin: 25px auto;
}

/*===== SECTION TITLE =====*/
.section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  font-size: var(--h1-font);
  margin-bottom: var(--mb-6);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/*===== ABOUT =====*/
.about {
  background: var(--bg-alt);
}

.about__container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.about__img {
  width: 100%;
  max-width: 350px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 0 auto;
}

.about__img img {
  width: 100%;
  transition: transform 0.5s ease;
}

.about__img:hover img {
  transform: scale(1.1);
}

.about__content h3 {
  font-size: var(--h2-font);
  margin-bottom: var(--mb-2);
  color: var(--primary-color);
}

.about__text {
  color: var(--text-light);
  margin-bottom: var(--mb-3);
  line-height: 1.8;
}

.about__info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: var(--mb-4);
}

.info-box {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-color);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.info-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.info-box i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: var(--mb-1);
}

.info-box h4 {
  font-size: var(--h3-font);
  margin-bottom: 0.25rem;
}

.info-box span {
  color: var(--text-light);
  font-size: var(--small-font);
}

/*===== SKILLS =====*/
.skills__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: var(--mb-5);
}

.skill-card {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.skill-card__icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin-bottom: var(--mb-2);
}

.skill-card h3 {
  font-size: var(--h3-font);
  margin-bottom: var(--mb-2);
}

.skill-list {
  list-style: none;
}

.skill-list li {
  padding: 0.5rem 0;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list li::before {
  content: '✓';
  color: var(--primary-color);
  font-weight: bold;
}

/*===== PROJECTS =====*/
.projects {
  background: var(--bg-alt);
}

.projects__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: var(--mb-5);
}

.project-card {
  background: var(--bg-color);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

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

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

.project-card__content {
  padding: 1.5rem;
}

.project-card__title {
  font-size: var(--h3-font);
  margin-bottom: var(--mb-1);
}

.project-card__description {
  color: var(--text-light);
  margin-bottom: var(--mb-2);
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--mb-2);
}

/* Parent relatif pour position absolute */
.project-card-relative {
  position: relative;
}

/* Wrapper de la barre */
.progress-wrapper {
  position: relative;
  margin: 12px 0;
}

/* Barre grise de fond */
.progress-container {
  background: #e6e6e6;
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
}

/* Barre animée */
.progress-bar {
  background: linear-gradient(90deg, #00b894, #0984e3);
  height: 100%;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 184, 148, 0.5);
  animation: progressAnim 1s ease forwards;
}

/* Texte pourcentage */
.progress-text {
  position: absolute;
  right: 0;
  top: -22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}



.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: var(--small-font);
}

.project-card__links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 500;
  transition: var(--transition);
}

.project-link:hover {
  transform: translateX(5px);
}

/*===== CONTACT =====*/
.contact__container {
  max-width: 800px;
  margin: 0 auto;
}

.contact__form {
  background: var(--bg-alt);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: var(--mb-3);
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-family: var(--body-font);
  font-size: var(--normal-font);
  background: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

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

/*===== FOOTER =====*/
.footer {
  background: var(--dark-color);
  color: white;
  padding: 3rem 0 1rem;
}

body.dark-mode .footer {
  background: var(--dark-alt);
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer__title {
  font-size: var(--h3-font);
  margin-bottom: var(--mb-2);
}

.footer__text {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--mb-2);
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer__link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer__copy {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/*===== RESPONSIVE =====*/
@media screen and (max-width: 968px) {
  :root {
    --big-font: 2.5rem;
    --h1-font: 2rem;
    --h2-font: 1.5rem;
    --h3-font: 1.25rem;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    height: calc(60vh - var(--header-height));
    background: var(--bg-color);
    box-shadow: var(--shadow-lg);
    transition: right 0.4s ease;
    padding: 2rem;
  }

  .nav__menu.show {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 2rem;
  }

  .nav__toggle {
    display: block;
  }

  .hero__container,
  .about__container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__img-wrapper {
    width: 300px;
    height: 300px;
  }

  .hero__img {
    width: 250px;
    height: 250px;
  }

  .about__info {
    grid-template-columns: 1fr;
  }

  .contact__form {
    padding: 2rem;
  }

}

@media screen and (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }

  .hero__buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}