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

/*===== VARIABLES CSS =====*/
:root {
  --header-height: 3rem;
  --font-semi: 600;

  /* Couleurs modernes avec palettes étendues */
  --hue-color: 230;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --rainbow-gradient: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
  --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  --neon-gradient: linear-gradient(135deg, #667eea, #764ba2, #4facfe, #00f2fe);
  --aurora-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  --cyber-gradient: linear-gradient(135deg, #0f3460 0%, #0f4c75 50%, #3282b8 100%);
  
  --first-color: #667eea;
  --first-color-alt: #5a6fd8;
  --second-color: #2c3e50;
  --title-color: #2c3e50;
  --text-color: #525f7f;
  --text-color-light: #8898aa;
  --body-color: #f8fafc;
  --container-color: rgba(255, 255, 255, 0.9);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 25px 50px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.1);

  /* Mode sombre */
  --first-color-dark: #8b9bf7;
  --title-color-dark: #ffffff;
  --text-color-dark: #cbd5e0;
  --text-color-light-dark: #94a3b8;
  --body-color-dark: #0f172a;
  --container-color-dark: rgba(30, 41, 59, 0.8);

  /* Typographie */
  --title-font: "Space Grotesk", sans-serif;
  --body-font: "Inter", sans-serif;
  --big-font-size: 2.5rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.75rem;

  /* Espacements */
  --mb-0-5: 0.5rem;
  --mb-1: 1rem;
  --mb-2: 2rem;
  --mb-3: 3rem;
  --mb-4: 4rem;
  --mb-5: 2.5rem;
  --mb-6: 3rem;

  --z-back: -10;
  --z-fixed: 1000;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 968px) {
  :root {
    --big-font-size: 3.5rem;
    --h2-font-size: 2rem;
    --normal-font-size: 1rem;
    --smaller-font-size: 0.875rem;
  }
}

/* Base */
*,
::before,
::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: var(--transition);
}

/* Fond interactif avec particules amélioré */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(75, 192, 192, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 40% 80%, rgba(153, 102, 255, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 90% 70%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 60% 30%, rgba(79, 172, 254, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(168, 237, 234, 0.06) 0%, transparent 40%);
  z-index: -1;
  opacity: 0;
  animation: fadeInBackground 1s ease-in 0.5s forwards;
  will-change: transform;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(102, 126, 234, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(75, 192, 192, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 107, 107, 0.3), transparent);
  background-size: 200px 200px;
  z-index: -1;
  opacity: 0;
  animation: fadeInBackground 1s ease-in 1s forwards;
}

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

@keyframes sparkle {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes fadeInBackground {
  from { opacity: 0; }
  to { opacity: 1; }
}

h1, h2, p {
  margin: 0;
}

h1, h2 {
  font-family: var(--title-font);
  font-weight: 700;
  color: var(--title-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

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

/*===== LAYOUT =====*/
.bd-grid {
  max-width: 1024px;
  display: grid;
  margin-left: var(--mb-2);
  margin-right: var(--mb-2);
}

.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.l-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-gradient);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.l-header.scroll-header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-hover);
}

.l-header.scroll-header::before {
  opacity: 0.8;
}

/*===== NAV =====*/
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-semi);
}

@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 80%;
    height: calc(100vh - var(--header-height));
    padding: 2rem;
    background-color: var(--container-color);
    backdrop-filter: blur(10px);
    transition: 0.5s;
    z-index: var(--z-fixed);
    box-shadow: var(--shadow);
  }
  
  .nav__link {
    display: block;
    padding: 1rem;
    margin-bottom: 0;
    color: var(--text-color);
    border-radius: 8px;
  }
  
  .nav__link:hover,
  .nav__link.active {
    color: var(--first-color);
  }
}

.nav__item {
  margin-bottom: var(--mb-4);
}

.nav__link {
  position: relative;
  color: var(--text-color);
  transition: var(--transition);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__link.active {
  color: var(--first-color);
}

.nav__logo {
  color: var(--second-color);
  font-family: var(--title-font);
  font-weight: 700;
  font-size: 1.25rem;
  position: relative;
  z-index: 1000;
  transform: none !important;
}

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

/* Theme toggle */
.change-theme {
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--first-color);
  background-color: var(--body-color);
  padding: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.change-theme:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.change-theme__icon {
  font-size: 1.5rem;
}

/* Style .active::after supprimé pour éviter les conflits */

.show-menu {
  right: 0;
}

/*===== HOME =====*/
.home {
  position: relative;
  row-gap: 5rem;
  padding: 4rem 0 5rem;
  min-height: calc(100vh - var(--header-height));
  align-content: center;
}

.home__data {
  align-self: center;
}

.home__title {
  font-size: var(--big-font-size);
  margin-bottom: var(--mb-5);
  font-family: var(--title-font);
  font-weight: 800;
  line-height: 1.1;
  color: var(--title-color);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: titleEntrance 1s ease-out;
  position: relative;
}

@keyframes titleEntrance {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.home__title br + span {
  display: inline-block;
  animation: slideInRight 0.8s ease-out 0.3s both;
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.home__title-color {
  color: var(--first-color);
  font-weight: 800;
  position: relative;
  transition: var(--transition);
}

.home__title-color:hover {
  color: var(--first-color-alt);
  transform: scale(1.05);
}

/* Animation gradientShift supprimée */

.highlight-name {
  color: var(--first-color);
  font-weight: 700;
}

.home__social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home__social-icon {
  width: max-content;
  margin-bottom: var(--mb-2);
  font-size: 1.5rem;
  color: var(--second-color);
  transition: var(--transition);
  padding: 0.75rem;
  border-radius: 16px;
  background: var(--container-color);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  /* Animation d'apparition seulement, pas en boucle */
  animation-delay: calc(var(--i) * 0.2s);
}

.home__social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--neon-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.home__social-icon:hover {
  color: white;
  transform: translateY(-5px) scale(1.1) rotate(5deg);
  box-shadow: 
    var(--shadow-glow),
    0 0 30px rgba(102, 126, 234, 0.5);
}

.home__social-icon:hover::before {
  left: 0;
  opacity: 1;
}

.home__img {
  position: absolute;
  right: 0;
  bottom: 5%;
  width: 260px;
}

.home__blob {
  fill: var(--first-color);
  animation: float 8s ease-in-out infinite;
  will-change: transform;
}

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

.home__blob-img {
  width: 360px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  color: #fff;
  padding: 1rem 2.5rem;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  backdrop-filter: blur(10px);
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.button:hover::before {
  left: 100%;
}

.button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    var(--shadow-glow),
    0 0 50px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: var(--neon-gradient);
}

.button:active {
  transform: translateY(-2px) scale(0.98);
  transition: 0.1s;
}

.button i {
  margin-right: 0.5rem;
  transition: var(--transition);
}

.button:hover i {
  transform: scale(1.2);
}

.home__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: var(--mb-2);
}

.button--secondary {
  background: transparent;
  color: var(--first-color);
  border: 2px solid var(--first-color);
}

.button--secondary:hover {
  background: var(--first-color);
  color: white;
}

.button i {
  margin-right: 0.5rem;
}

/*===== ABOUT =====*/
.about__container {
  row-gap: 2rem;
  text-align: center;
}

.about__subtitle {
  margin-bottom: var(--mb-1);
  font-family: var(--title-font);
  color: var(--title-color);
}

.about__img {
  justify-self: center;
}

.about__img img {
  width: 200px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.about__img img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.about__text {
  line-height: 1.8;
}

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

.stat__item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-gradient);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.stat__item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-glow);
  border-color: rgba(102, 126, 234, 0.5);
}

.stat__item:hover::before {
  opacity: 1;
}

.stat__item:nth-child(1) { animation-delay: 0.1s; }
.stat__item:nth-child(2) { animation-delay: 0.2s; }
.stat__item:nth-child(3) { animation-delay: 0.3s; }

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

.stat__number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--first-color);
  font-family: var(--title-font);
}

.stat__label {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
}

/*===== SKILLS =====*/
.skills__container {
  row-gap: 2rem;
  text-align: center;
}

.skills__subtitle {
  margin-bottom: var(--mb-1);
  font-family: var(--title-font);
  font-size: var(--h3-font-size);
}

.skills__text {
  margin-bottom: var(--mb-4);
  line-height: 1.8;
}

.skills__data {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  font-weight: 600;
  padding: 1.5rem 2rem;
  margin-bottom: var(--mb-4);
  border-radius: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.skills__data::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: 0.6s;
}

.skills__data:hover::before {
  left: 100%;
}

.skills__data:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-glow);
  border-color: rgba(102, 126, 234, 0.3);
}

.skills__names {
  display: flex;
  align-items: center;
  z-index: 1;
}

.skills__name {
  font-weight: 600;
  font-size: 1.1em;
}

.skills__icon {
  font-size: 2rem;
  margin-right: var(--mb-0-5);
  color: var(--first-color);
}

.skills__names {
  display: flex;
  align-items: center;
}

.skills__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 0.4rem;
  border-radius: 1rem;
  z-index: var(--z-back);
  overflow: hidden;
  background: rgba(0,0,0,0.1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.skills__bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  /* Animation supprimée pour éviter l'effet "visualiseur de musique" */
}

@keyframes skillShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.skills__html {
  width: 60%;
  background: var(--primary-gradient);
}

.skills__css {
  width: 55%;
  background: var(--secondary-gradient);
}

.skills__js {
  width: 30%;
  background: var(--accent-gradient);
}

.skills__python {
  width: 40%;
  background: linear-gradient(135deg, #3776ab 0%, #ffd343 100%);
}

.skills__java {
  width: 10%;
  background: linear-gradient(135deg, #f89820 0%, #ed1d25 100%);
}

.skills__percentage {
  font-size: var(--smaller-font-size);
}

.skills__img {
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skills__img:hover {
  transform: scale(1.02);
}

/*===== WORK =====*/
.work__container {
  row-gap: 2rem;
}

.work__img {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: block;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
}

.work__img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(75, 192, 192, 0.6));
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

.work__img::after {
  content: '🔗 View Project';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: 600;
  font-size: 1.1em;
  opacity: 0;
  transition: var(--transition);
  z-index: 3;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.work__img:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-glow);
  border-color: rgba(102, 126, 234, 0.5);
}

.work__img:hover::before,
.work__img:hover::after {
  opacity: 1;
}

.work__img img {
  transition: var(--transition);
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.work__img:hover img {
  transform: scale(1.15);
  filter: blur(1px);
}

.work__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: var(--transition);
  z-index: 4;
}

.work__img:hover .work__overlay {
  transform: translateY(0);
}

.work__title {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.work__description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin: 0;
}



/*===== CLASSES =====*/
.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: var(--mb-2);
  margin-bottom: var(--mb-4);
  text-align: center;
  font-family: var(--title-font);
  font-weight: 700;
  text-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
  /* Pas d'animation continue pour les titres */
}

.section-title::before {
  content: '✨';
  position: absolute;
  left: -2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  /* Pas d'animation continue pour les étoiles */
}

/* Trait décoratif sous les titres supprimé */
.section-title::after {
  display: none;
}

@keyframes titleGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.1); }
}

@keyframes sparkleRotate {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Animation lineExpand supprimée car plus utilisée */

.section {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.link-custom {
  color: var(--first-color);
  font-weight: 600;
  position: relative;
  transition: var(--transition);
}

.link-custom::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--primary-gradient);
  transition: var(--transition);
}

.link-custom:hover::after {
  width: 100%;
}

.glow-text {
  text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.typewrite {
  color: var(--first-color);
  font-weight: 600;
  position: relative;
}

.typewrite .wrap {
  position: relative;
}

.typewrite .wrap::after {
  content: '|';
  position: absolute;
  right: -5px;
  top: 0;
  color: var(--first-color);
  font-weight: 300;
  animation: blink-cursor 1s infinite;
}

@keyframes blink-cursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Animations supprimées pour plus de simplicité */

@keyframes floatingElements {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
    opacity: 0.7;
  }
  33% { 
    transform: translateY(-20px) rotate(5deg); 
    opacity: 1;
  }
  66% { 
    transform: translateY(10px) rotate(-3deg); 
    opacity: 0.8;
  }
}

@keyframes skillShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/*===== MEDIA QUERIES =====*/
@media screen and (max-width: 320px) {
  .home {
    row-gap: 4rem;
  }
  .home__img {
    width: 200px;
  }
}

@media screen and (max-width: 480px) {
  .home__buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .about__stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media screen and (min-width: 576px) {
  .home {
    padding: 4rem 0 2rem;
  }
  .home__social {
    padding-top: 0;
    padding-bottom: 2.5rem;
    flex-direction: row;
    align-self: flex-end;
  }
  .home__social-icon {
    margin-bottom: 0;
    margin-right: var(--mb-4);
  }
  .home__img {
    width: 300px;
    bottom: 25%;
  }
  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  }
  .skills__container {
    grid-template-columns: 0.7fr;
    justify-content: center;
    column-gap: 1rem;
  }
  .work__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    padding-top: 2rem;
  }
}

@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }
  .section {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
  .section-title {
    margin-bottom: var(--mb-6);
  }
  /* .section-title::after supprimé */
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }
  .nav__list {
    display: flex;
    padding-top: 0;
  }
  .nav__item {
    margin-left: var(--mb-6);
    margin-bottom: 0;
  }
  .nav__toggle {
    display: none;
  }
  .nav__link {
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
  }
  .home {
    padding: 8rem 0 2rem;
  }
  .home__img {
    width: 400px;
    bottom: auto;
    top: 30%;
    transform: translateY(-50%);
  }
  .about__container {
    padding-top: 2rem;
  }
  .about__img img {
    width: 300px;
  }
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    align-items: center;
    text-align: initial;
  }
  .work__container {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2rem;
  }
}

@media screen and (min-width: 992px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
  .home {
    padding: 10rem 0 2rem;
  }
  .home__img {
    width: 450px;
  }
}

/*===== DARK THEME =====*/
body.dark-theme {
  --title-color: var(--title-color-dark);
  --text-color: var(--text-color-dark);
  --body-color: var(--body-color-dark);
  --container-color: var(--container-color-dark);
  --glass-bg: rgba(30, 41, 59, 0.3);
  --glass-border: rgba(148, 163, 184, 0.1);
  --shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 25px 50px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(139, 155, 247, 0.3);
}

body.dark-theme::before {
  background: 
    radial-gradient(circle at 20% 50%, rgba(139, 155, 247, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(75, 192, 192, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 40% 80%, rgba(255, 107, 107, 0.1) 0%, transparent 60%);
}

body.dark-theme .l-header {
  background: rgba(15, 23, 42, 0.8);
}

body.dark-theme .l-header.scroll-header {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 20px rgba(139, 155, 247, 0.2);
}

body.dark-theme .change-theme {
  background-color: var(--first-color);
  color: var(--title-color-dark);
}

body.dark-theme .home__title-color {
  color: var(--first-color-dark);
  background: transparent;
}

body.dark-theme .home__title-color:hover {
  color: var(--accent-gradient);
  transform: scale(1.05);
}

body.dark-theme .typewrite {
  color: var(--first-color-dark);
}

body.dark-theme .typewrite .wrap::after {
  color: var(--first-color-dark);
}

/* body.dark-theme .section-title::after supprimé */

body.dark-theme .home__blob {
  fill: var(--first-color-dark);
}

body.dark-theme .nav__logo,
body.dark-theme .nav__link:hover,
body.dark-theme .nav__link.active {
  color: var(--first-color-dark);
}

body.dark-theme .link-custom {
  color: var(--first-color-dark);
}

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

body.dark-theme .home__social-icon,
body.dark-theme .skills__data,
body.dark-theme .stat__item {
  background: var(--container-color-dark);
  color: var(--text-color-dark);
}

/* Effects */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Scroll bar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--body-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--first-color-alt);
}

/* Optimisations pour les performances mobiles */
@media screen and (max-width: 768px) {
  /* Réduire les animations coûteuses sur mobile */
  body::before {
    animation-duration: 40s !important;
  }
  
  body::after {
    animation-duration: 4s !important;
  }
  
  .home__blob {
    animation-duration: 12s !important;
  }
  
  /* Optimiser les transformations pour mobile */
  .parallax {
    transform: none !important;
  }
  
  /* Réduire will-change pour éviter la surconsommation */
  * {
    will-change: auto !important;
  }
  
  /* Déplacer le blob SVG plus haut sur mobile */
  .home__blob {
    animation: floatMobile 8s ease-in-out infinite !important;
  }
  
  @keyframes floatMobile {
    0%, 100% { transform: translateY(-100px); }
    50% { transform: translateY(-110px); }
  }
}

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--first-color);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

picture,
img,
video {
  max-width: 100%;
  height: auto;
}

/* Effets avancés et micro-animations */

/* Curseur par défaut restauré */
* {
  cursor: default;
}

/* Curseurs appropriés pour les éléments interactifs */
a, button, .nav__toggle, .change-theme, 
[role="button"], [tabindex="0"],
input[type="button"], input[type="submit"], 
input[type="reset"], .work__img {
  cursor: pointer;
}

a:hover, button:hover, .nav__toggle:hover, 
.change-theme:hover, .work__img:hover {
  cursor: pointer;
}

/* Scroll snap désactivé pour une navigation libre */
html {
  scroll-behavior: smooth;
}

/* Particules flottantes */
.home::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1), transparent 70%);
  border-radius: 50%;
  /* Pas d'animation continue pour les particules */
  pointer-events: none;
  z-index: -1;
}

.about::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 5%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(75, 192, 192, 0.08), transparent 70%);
  border-radius: 50%;
  /* Pas d'animation continue pour les particules */
  pointer-events: none;
  z-index: -1;
}

/* Animations d'entrée pour les éléments */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeInRight 0.8s ease forwards;
}

@keyframes fadeInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Effet de parallaxe */
.parallax {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Bouton scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(100px);
  z-index: 1000;
}

.scroll-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-5px) scale(1.1) rotate(10deg);
  box-shadow: 
    var(--shadow-glow),
    0 0 40px rgba(102, 126, 234, 0.6);
  background: var(--neon-gradient);
}

/* Effet de typing amélioré */
.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--first-color);
  white-space: nowrap;
  animation: typing 3s steps(30) 1s both, blink-caret 1s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  0%, 50% { border-color: var(--first-color); }
  51%, 100% { border-color: transparent; }
}

/* Effets de hover pour les icônes sociales */
.home__social-icon {
  position: relative;
  overflow: hidden;
}

.home__social-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.home__social-icon:hover::before {
  left: 100%;
}

/* Loading skeleton pour les images */
.img-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Effet de focus accessible */
*:focus-visible {
  outline: 2px solid var(--first-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth transitions pour tous les éléments interactifs */
a, button, .nav__link, .work__img, .stat__item, .skills__data {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Effet de glow au focus pour l'accessibilité */
.button:focus,
.nav__link:focus,
.home__social-icon:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Media query pour réduire les animations sur demande */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .parallax {
    transform: none !important;
  }
}
