/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #10b981;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-dark: #111827;
  --bg-dark-secondary: #1f2937;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

.dark-mode {
  --text-color: #f3f4f6;
  --text-light: #d1d5db;
  --bg-color: #111827;
  --bg-secondary: #1f2937;
  --card-bg: #1f2937;
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
    0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

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

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

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  font-family: "Inter", sans-serif;
}

.btn-primary {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-dark)
  );
  color: white;
  box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.text-gradient {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.dark-mode .navbar {
  background-color: rgba(17, 24, 39, 0.8);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* --- Logo dans la navbar --- */
.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-logo-text {
  line-height: 1;
}

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

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

.nav-link {
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  transition: var(--transition);
}

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

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

.theme-toggle-label {
  position: relative;
  display: flex;
  align-items: center;
  width: 60px;
  height: 30px;
  background: var(--bg-secondary);
  border-radius: 50px;
  padding: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-label i {
  font-size: 14px;
  z-index: 1;
  transition: var(--transition);
}

.theme-toggle-label i:first-child {
  color: #f59e0b;
  margin-right: auto;
}

.theme-toggle-label i:last-child {
  color: #d1d5db;
  margin-left: auto;
}

.theme-toggle-ball {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

#theme-toggle:checked ~ .theme-toggle-label .theme-toggle-ball {
  transform: translateX(30px);
}

.language-toggle-label {
  position: relative;
  display: flex;
  width: 60px;
  height: 30px;
  background: var(--bg-secondary);
  border-radius: 50px;
  padding: 5px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}

.language-toggle-label span {
  position: absolute;
  width: 50%;
  text-align: center;
  font-weight: 600;
  transition: var(--transition);
  line-height: 20px;
}

.language-toggle-label span:first-child {
  left: 5px;
}

.language-toggle-label span:last-child {
  right: 5px;
}

#language-toggle:checked ~ .language-toggle-label span:first-child {
  transform: translateY(-30px);
  opacity: 0;
}

#language-toggle:checked ~ .language-toggle-label span:last-child {
  transform: translateY(0);
  opacity: 1;
}

#language-toggle:not(:checked) ~ .language-toggle-label span:first-child {
  transform: translateY(0);
  opacity: 1;
}

#language-toggle:not(:checked) ~ .language-toggle-label span:last-child {
  transform: translateY(30px);
  opacity: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 3px 0;
  border-radius: 3px;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 80px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  max-width: 600px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
  text-align: center;
}

.hero-social {
  display: flex;
  gap: 1rem;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-color);
  transition: var(--transition);
}

.hero-social a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.hero-visual {
  position: relative;
  height: 200px;
}

.visual-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Ancre fixe (ne bouge jamais) */
.floating-anchor {
  position: absolute;
  width: 140px;
  height: 140px;
}

/* Positions des 3 ancres (identiques visuellement à avant) */
.anchor-1 {
  top: 1%;
  left: 1%;
  z-index: 1;
}
/* Carte orange "DevOps & Opérations" : un peu plus haute et plus à gauche */
.anchor-2 {
  top: 99%;
  left: 35%;
  z-index: 1;
}
/* Carte turquoise "Pilotage & Projet" : plus basse et plus à gauche (ne touche plus anchor-2) */
.anchor-3 {
  top: 1%;
  left: 70%;
  z-index: 1;
}

/* Carte animée à l'intérieur de l’ancre */
.floating-card {
  position: absolute;
  inset: 0; /* remplit l’ancre 140x140 */
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  animation: float 3s ease-in-out infinite;
}

/* Styles visuels + décalages d’animation comme avant */
.anchor-1 .floating-card {
  animation-delay: 0s;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
}

.anchor-2 .floating-card {
  animation-delay: 1s;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: white;
}

.anchor-3 .floating-card {
  animation-delay: 2s;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-8px) translateX(2px);
  }
  50% {
    transform: translateY(-5px) translateX(-2px);
  }
  75% {
    transform: translateY(-8px) translateX(2px);
  }
}

.floating-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.floating-card h4 {
  font-size: 0.9rem;
  text-align: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-light);
  border-radius: 12px;
  position: relative;
  margin-top: 0.5rem;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--text-light);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 8px;
  }
  100% {
    opacity: 0;
    top: 20px;
  }
}

/* About Section */
.about {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-light);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-item h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

@media (max-width: 992px) {
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* Séparations renforcées en responsive */
@media (max-width: 1200px) {
  .anchor-2 {
    top: 44%;
    right: 14%;
  }
  .anchor-3 {
    top: 70%;
    left: 34%;
  }
}

@media (max-width: 992px) {
  /* Quand le visuel passe au-dessus, on recentre un peu */
  .hero-visual {
    height: 380px;
  }
  .anchor-1 {
    top: 18%;
    left: 50%;
  }
  .anchor-2 {
    top: 46%;
    left: 35%;
    right: auto;
  }
  .anchor-3 {
    top: 74%;
    left: 65%;
  }
}

.stat-item h3 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.internship-logo {
  margin-top: 0.5rem;
}

.internship-logo img {
  height: 24px;
  opacity: 0.8;
}

.about-image {
  position: relative;
}

.image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: auto;
  transition: var(--transition);
}
.profile-image {
  width: 100%;
  height: auto;
  transition: var(--transition);
}

.dark-mode .profile-light {
  display: none;
}

.dark-mode .profile-dark {
  display: block;
}

.image-frame {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid var(--primary-color);
  border-radius: 25px;
  z-index: -1;
  opacity: 0.5;
}

/* Services Section */
.services {
  padding: 6rem 0;
}

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

.service-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-dark)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 1.5rem;
}

.service-card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--text-light);
}

/* Skills Section */
.skills {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

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

.skills-category {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.skills-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skills-category h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
  font-size: 1.25rem;
  text-align: center;
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  transition: var(--transition);
  text-align: center;
}

.skill-item:hover {
  transform: translateY(-3px);
  background: var(--primary-color);
  color: #fff;
}

/* --- Images (SVG/PNG etc.) --- */
.skill-item img {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
  transition: var(--transition);
  filter: none;
}
.skill-item:hover img {
  filter: brightness(0) invert(1);
}

/* --- Icônes Font Awesome (ex: Docker) --- */
.skill-item i {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  transition: var(--transition);
}
.skill-item:hover i {
  color: #fff;
}

.dark-mode .skill-item img {
  filter: invert(1) brightness(1.1);
}
.dark-mode .skill-item i {
  color: var(--text-color);
}

.skill-item i.fa-docker {
  color: var(--text-color) !important;
}
.dark-mode .skill-item i.fa-docker,
.skill-item:hover i.fa-docker {
  color: #fff !important;
}

/* Projects Section */
.projects {
  padding: 6rem 0;
}

.projects-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  justify-content: center;
}

.filter-group {
  flex: 1;
  min-width: 200px;
  max-width: 250px;
}

.filter-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--text-light);
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Inter", sans-serif;
  outline: none;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.filter-reset {
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background: var(--bg-secondary);
  color: var(--text-color);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Inter", sans-serif;
}

.filter-reset:hover {
  background: var(--primary-color);
  color: white;
}

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

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

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.project-image {
  position: relative;
  height: 350px;
  overflow: hidden;
}

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

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

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

.project-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* .project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-type {
  font-size: 0.8rem;
  color: var(--text-light);
} */

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

.project-link i {
  transition: var(--transition);
}

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

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bg-secondary);
}

.project-type {
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: capitalize;
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  background: var(--bg-secondary);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

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

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--primary-dark)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-item.single-line {
  align-items: center;
}

.contact-item.single-line .contact-details h3 {
  margin-bottom: 0;
}

.contact-details h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.contact-details p {
  color: var(--text-light);
}

/* Liens dans les infos de contact (GitHub / LinkedIn) */
.contact-details a {
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 1px dashed var(--text-light);
  transition: var(--transition);
}
.contact-details a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.contact-form {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.contact-form p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--text-light);
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Inter", sans-serif;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

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

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

* --- Logo dans le footer --- */ .footer-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-logo-text {
  line-height: 1;
  color: #fff; /* assure la lisibilité sur fond sombre */
}

/* Optionnel : légère réduction du gap en mobile */
@media (max-width: 576px) {
  .nav-logo a,
  .footer-logo a {
    gap: 0.4rem;
  }
}

.dark-mode .footer {
  background: #0f172a;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.footer-logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-logo-text {
  line-height: 1;
  color: #fff; /* assure la lisibilité sur fond sombre */
}

/* Optionnel : légère réduction du gap en mobile */
@media (max-width: 576px) {
  .nav-logo a,
  .footer-logo a {
    gap: 0.4rem;
  }
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #d1d5db;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

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

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

.footer-bottom a {
  color: white;
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-visual {
    order: -1;
    height: 300px;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    text-align: center;
  }

  .nav-controls {
    flex-direction: column;
  }

  .nav-toggle {
    display: flex;
    z-index: 1000;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

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

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

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    justify-content: center;
  }
}

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

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

  .projects-filter {
    flex-direction: column;
  }

  .filter-group {
    max-width: 100%;
  }
}

/* Animation utilities */
[data-aos] {
  opacity: 0;
  transition: opacity 0.6s, transform 0.6s;
}

[data-aos].aos-animate {
  opacity: 1;
}

/* Dark mode utilities */
.dark-mode .skill-item img:not(:hover) {
  filter: invert(0.8);
}

/* ======= Fixes mobile (cartes flottantes, bouton "défiler", image & stats) ======= */
@media (max-width: 768px) {
  /* Espace suffisant pour éviter les chevauchements */
  .hero {
    padding-top: 90px;
    padding-bottom: 80px;
  }

  /* Les cartes flottantes : taille & positions adaptées mobile */
  .hero-visual {
    height: 320px;
    order: -1;
  }
  .floating-anchor {
    width: 120px;
    height: 120px;
  }
  .anchor-1 {
    top: 6%;
    left: 10%;
  }
  .anchor-2 {
    top: 38%;
    left: 55%;
  }
  .anchor-3 {
    top: 70%;
    left: 20%;
  }
  .floating-card {
    padding: 1rem;
  } /* compaction du contenu */

  /* Le "Défiler vers le bas" passe sous le contenu => plus d’overlap */
  .scroll-indicator {
    position: static;
    transform: none;
    margin-top: 1rem;
  }
  .mouse {
    margin-top: 0.25rem;
  }

  /* Boutons héros un peu plus serrés */
  .hero-buttons {
    margin-bottom: 0.75rem;
    gap: 0.75rem;
  }

  /* Image profil + stats plus raisonnables */
  .about-image .image-container {
    max-width: 260px;
    margin: 0 auto;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-item {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero-visual {
    height: 300px;
  }
  .floating-anchor {
    width: 104px;
    height: 104px;
  }
  .anchor-1 {
    top: 4%;
    left: 8%;
  }
  .anchor-2 {
    top: 36%;
    left: 54%;
  }
  .anchor-3 {
    top: 68%;
    left: 18%;
  }
  .floating-card h4 {
    font-size: 0.8rem;
  } /* titres plus petits dans les cartes */
}

/* Très étroit */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
}

/* ======= Reflow mobile "Qui suis-je ?" : image d'abord + stats en 2x2 ======= */
@media (max-width: 768px) {
  /* On passe la grille en pile et on remonte l'image au-dessus du texte */
  .about-content {
    display: flex; /* remplace la grille */
    flex-direction: column;
    align-items: center;
    text-align: center; /* cohérent avec mobile */
  }

  .about-image {
    order: -1; /* image AVANT le texte + stats */
    width: 100%;
  }

  .about-image .image-container {
    max-width: 220px; /* photo plus compacte */
    margin: 0 auto 1rem;
  }

  .about {
    /* un peu moins d'espace vertical */
    padding: 4rem 0;
  }

  /* Stats en 2 colonnes sur téléphone */
  .about-stats {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .stat-item {
    padding: 0.75rem;
  }
  .stat-number {
    font-size: 1.6rem;
  }

  /* Paragraphe légèrement plus petit pour éviter les pavés */
  .about-text p {
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .about-image .image-container {
    max-width: 180px;
  }
  .stat-number {
    font-size: 1.4rem;
  }
}
