/* Bordure néon verte pour la carte startup */
.startup-card {
  border: 3px solid #bfff00;
  box-shadow: 0 0 24px 4px #bfff00, 0 0 4px 1px #a2cf52;
  border-radius: 1.5rem;
  /* Optionnel : effet de glow plus doux */
}
.startup-logo {
  filter:
    drop-shadow(0 0 3px #bfff00)
    drop-shadow(0 0 2px #fff);
}


/* ==== Variables CSS ==== */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --dark-color: #1f2937;
  --light-color: #f9fafb;
  --white-color: #ffffff;
  --gray-color: #6b7280;
  --accent-color: #f59e0b;
  --green-color:#A2CF52;
  
  --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ==== Variables Dark Mode ==== */
body.dark-mode {
  --dark-color: #f9fafb;
  --light-color: #1a1a2e;
  --white-color: #16213e;
  --gray-color: #a0a0a0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode {
  background-color: var(--light-color);
  color: var(--dark-color);
}

/* ==== Reset & Base ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
}

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

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


/* ==== Header ==== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 1rem ;
}

/* Blur only on desktop for better performance on mobile */
@media (min-width: 768px) {
  header {
    backdrop-filter: blur(10px);
  }
}

header .logo h2 {
  font-size: 1.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

header nav a {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.75rem 0.5rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}

header nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}

header nav a:hover::after {
  width: 100%;
}

#toggle-button {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.75rem;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

#toggle-button span {
  width: 25px;
  height: 3px;
  background: var(--dark-color);
  border-radius: 3px;
  transition: var(--transition);
}

/* ==== Dark Mode Toggle ==== */
#dark-mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

#dark-mode-toggle:hover {
  background: rgba(102, 126, 234, 0.1);
}

#dark-mode-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--dark-color);
}

.sun-icon {
  display: block;
}

.moon-icon {
  display: none;
}

body.dark-mode .sun-icon {
  display: none;
}

body.dark-mode .moon-icon {
  display: block;
}

/* ==== Language Switcher ==== */
.language-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: var(--transition);
  text-transform: uppercase;
}

.lang-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.2);
}

.lang-btn.active {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

body.dark-mode .lang-btn {
  color: var(--text-color);
}

body.dark-mode .lang-btn:hover {
  background: rgba(102, 126, 234, 0.2);
}

/* ==== Language Toggle ==== */
.language-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#language-toggle {
  background: none;
  border: 2px solid var(--border-color);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

#language-toggle:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

#language-toggle:active {
  transform: translateY(0);
}

.lang-icon {
  width: 28px;
  height: 28px;
  position: absolute;
  transition: var(--transition);
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--dark-color);
  letter-spacing: 0.5px;
}

.fr-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.en-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

html[lang="en"] .fr-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

html[lang="en"] .en-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.dark-mode #language-toggle {
  border-color: var(--border-color);
}

body.dark-mode #language-toggle:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: var(--primary-color);
}

body.dark-mode header {
  background: rgba(22, 33, 62, 0.95);
}

body.dark-mode .about-section {
  background: var(--white-color);
}

body.dark-mode .skills-section,
body.dark-mode .contact-section {
  background: var(--light-color);
}

body.dark-mode .projects-section {
  background: var(--white-color);
}

body.dark-mode .filter-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
  color: #ffffff;
}

body.dark-mode .filter-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

body.dark-mode .filter-btn.active {
  background: var(--gradient);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

/* Change background image in dark mode */
body.dark-mode .home::before {
  background: url('../img/back2.webp') center/cover;
}

/* Buttons in dark mode */
body.dark-mode .btn-secondary {
  color: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark-bg);
  text-shadow: none;
}

body.dark-mode .btn-primary:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Improve contrast for primary buttons in dark mode */
body.dark-mode .btn-primary,
body.dark-mode a.btn.btn-primary,
body.dark-mode button.btn.btn-primary {
  /* use a bright gradient background for good contrast */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body.dark-mode .btn-primary:hover,
body.dark-mode a.btn.btn-primary:hover,
body.dark-mode button.btn.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* Hero text in dark mode */
body.dark-mode .hero-greeting,
body.dark-mode .hero-name,
body.dark-mode .hero-title,
body.dark-mode .hero-description,
body.dark-mode .hero-status {
  color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .hero-name {
  color: #ffffff;
}

body.dark-mode .hero-status {
  background: rgba(255, 255, 255, 0.15);
  border-left-color: rgba(255, 255, 255, 0.8);
}

/* Reduce text-shadow on mobile for performance */
@media (min-width: 768px) {
  body.dark-mode .hero-greeting,
  body.dark-mode .hero-name,
  body.dark-mode .hero-title,
  body.dark-mode .hero-description,
  body.dark-mode .hero-status {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  body.dark-mode .hero-name {
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  }
}


/* ==== Section Home (Hero) ==== */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background: var(--gradient); */
  color: var(--white-color);
  padding: 8rem 2rem 2rem;
  position: relative;
  overflow: hidden;
}

.home::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/back.webp') center/cover;
  opacity: 0.9;
  will-change: opacity;
}

/* Disable opacity on mobile dark mode for better perf */
@media (max-width: 767px) {
  body.dark-mode .home::before {
    opacity: 1;
  }
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  animation: fadeInLeft 1s ease;
}

.hero-greeting {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-status {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 10px;
  border-left: 4px solid var(--accent-color);
  margin-bottom: 2rem;
}

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

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
  cursor: pointer;
}

.btn-primary {
  background: var(--white-color);
  /* use a stronger primary color for text to improve contrast */
  color: rgba(79, 70, 229, 1); /* slightly darker primary */
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Keyboard focus visible for buttons */
.btn:focus {
  outline: 3px solid rgba(79,70,229,0.18);
  outline-offset: 3px;
}

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

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

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 1s ease;
}

.hero-image img {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-shape {
  position: absolute;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: pulse 3s infinite;
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* ==== Bouton Retour en Haut ==== */
#scroll-to-top {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  min-width: 56px;
  min-height: 56px;
  width: 56px;
  height: 56px;
  background: var(--gradient);
  border: none;
  border-radius: 50%;
  color: var(--white-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-to-top:hover {
  transform: translate(-50%, -5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

#scroll-to-top svg {
  width: 24px;
  height: 24px;
}

body.dark-mode #scroll-to-top {
  background: var(--gradient);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==== Sections Communes ==== */
section {
  padding: 5rem 2rem;
}

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

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

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-color);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ==== Section À propos ==== */
.about-section {
  background: var(--white-color);
}

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

.about-image {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

/* Make the container size match the contained image so the ::before overlay exactly covers it */
.about-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.about-image { max-width: 350px; }

.about-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* default: high-res background for large displays */
  background: url('../img/profile-1600.webp') center/cover;
  background-size: cover;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

/* Responsive background variants for hover overlay to reduce bandwidth on small screens */
@media (max-width: 600px) {
  .about-image::before {
    background-image: url('../img/profile-480.webp');
  }
}

@media (min-width: 601px) and (max-width: 1200px) {
  .about-image::before {
    background-image: url('../img/profile-900.webp');
  }
}

.about-image:hover::before {
  opacity: 1;
}

/* When hovering, fade out the base img so the overlay (profile-*.webp) appears in its place */
.about-image:hover img {
  opacity: 0;
}

/* Show overlay on keyboard focus as well */
.about-image:focus::before,
.about-image:focus img {
  outline: none;
}
.about-image:focus::before {
  opacity: 1;
}
.about-image:focus img {
  opacity: 0;
}

.about-image img {
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 350px;
  display: block;
  transition: opacity 0.5s ease;
}

.about-text h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--gray-color);
  margin-bottom: 1rem;
  line-height: 1.8;
}

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

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--light-color);
  border-radius: 15px;
  transition: var(--transition);
}

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

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  color: var(--gray-color);
  margin-top: 0.5rem;
}

/* ==== Section Compétences ==== */
.skills-section {
  background: var(--light-color);
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skill-category {
  background: var(--white-color);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);

}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.skills-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 100px;
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.skill-item.animate {
  opacity: 1;
  transform: translateX(0);
}

.skill-category:nth-child(even) .skill-item {
  transform: translateX(50px);
}

.skill-category:nth-child(even) .skill-item.animate {
  transform: translateX(0);
}

.skill-item img {
  width: 40px;
  height: 40px;
}

.skill-item span {
  font-weight: 600;
  text-align: center;
}

/* Tags (badges) */
.tag {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  color: var(--white-color);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Light mode: subtle primary tint with dark text for contrast */
body:not(.dark-mode) .tag {
  background: rgba(102,126,234,0.12);
  color: rgba(17,24,39,0.95);
}

/* Dark mode tags */
body.dark-mode .tag {
  background: rgba(102,126,234,0.22);
  color: rgba(255,255,255,0.95);
}
/* ==== Section Projets ==== */
.projects-section {
  background: var(--white-color);
}

.projects-section .container {
  background: transparent;
}

/* Filtres des projets */
.projects-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: var(--white-color);
  border: 2px solid var(--primary-color);
  color: #2c3e50;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

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

.filter-btn.active {
  background: var(--gradient);
  border-color: var(--primary-color);
  color: var(--white-color);
  box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

/* Animation pour filtrage */
.project-card {
  animation: fadeIn 0.4s ease;
}

.project-card.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  background: transparent;
  justify-content: center;
}

.project-card {
  flex: 0 0 calc(33.333% - 1.5rem);
  min-width: 300px;
  background: var(--white-color);
  border: solid,1px,rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}



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

.project-image picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Vidéo */
.project-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding-bottom: 1.5rem;
}

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

.overlay-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.btn-project {
  padding: 0.8rem 1.5rem;
  background: var(--white-color);
  color: var(--primary-color);
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

/* Responsive project buttons */
@media (max-width: 768px) {
  .overlay-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }

  .btn-project {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }

  .project-overlay {
    padding-bottom: 1rem;
  }
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-content p {
  color: var(--gray-color);
  margin-bottom: 1rem;
}

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

.tag {
  padding: 0.3rem 0.8rem;
  background: var(--light-color);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.projects-cta {
  text-align: center;
  margin-top: 3rem;
  background: transparent;
}

/* ===== Startup Section ===== */
.startup-section {
  background: var(--light-color);
  padding: 6rem 0;
  position: relative;
}

.startup-content {
  max-width: 900px;
  margin: 3rem auto 0;
}

.startup-card {
  background: white;
  border-radius: 25px;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Effet d'ondulation d'eau qui suit la souris */
.startup-card::after {
  content: '';
  position: absolute;
  left: var(--mouse-x, 50%);
  top: var(--mouse-y, 50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, rgba(102, 126, 234, 0.08) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: left 0.15s ease, top 0.15s ease, opacity 0.3s ease;
  z-index: 1;
}

.startup-card:hover::after {
  opacity: 1;
}

.startup-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 25px;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.startup-card:hover::before {
  opacity: 1;
}

.startup-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25), 0 10px 25px rgba(0, 0, 0, 0.15);
}

.startup-logo {
  width: 200px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.startup-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 5px 15px rgba(102, 126, 234, 0.3));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.startup-logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 8px 20px rgba(102, 126, 234, 0.5));
}

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

.startup-name {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.startup-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.startup-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-color);
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

.startup-info-item svg {
  stroke: var(--primary-color);
  flex-shrink: 0;
}

.startup-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 2;
}

.startup-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--white-color);
  border: 1px solid rgba(102, 126, 234, 0.1);
  border-radius: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.value-item:hover {
  transform: translateY(-3px);
  background: #f8f9ff;
  border-color: rgba(102, 126, 234, 0.2);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.15);
}

.value-item svg {
  stroke: var(--primary-color);
  flex-shrink: 0;
}

.value-item span {
  font-weight: 600;
  color: var(--text-color);
}

.startup-link {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-top: 1rem;
}

/* Dark mode for startup section */
body.dark-mode .startup-section {
  background: var(--light-color);
}

body.dark-mode .startup-card {
  background: #1a1a2e;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .startup-card:hover {
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4), 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.dark-mode .startup-card::after {
  background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.1) 40%, transparent 70%);
}

body.dark-mode .value-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .value-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(102, 126, 234, 0.3);
}

/* Responsive startup section */
@media (max-width: 950px) {
  .startup-section {
    padding: 0 2rem;
  }
}
@media (max-width: 768px) {
  .startup-card {
    padding: 2rem 1.5rem;
  }
  
  .startup-name {
    font-size: 2rem;
  }
  
  .startup-info {
    flex-direction: column;
    gap: 1rem;
  }
  
  .startup-values {
    grid-template-columns: 1fr;
  }
  
  /* Language switcher en mobile */
  .language-switcher {
    width: 100%;
    justify-content: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
  }
  
  .lang-btn {
    flex: 0 0 auto;
  }
}

/* ==== Section Contact ==== */
.contact-section {
  background: var(--light-color);
}

.contact-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-info-full {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info-full h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info-full p {
  color: var(--gray-color);
  margin-bottom: 2rem;
  line-height: 1.8;
  font-size: 1.1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
  align-items: center;
}

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

.contact-item svg {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.social-links a {
  min-width: 56px;
  min-height: 56px;
  width: 56px;
  height: 56px;
  background: var(--white-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  animation: bounce 2s ease-in-out infinite;
}

.social-links a:nth-child(1) {
  animation-delay: 0s;
}

.social-links a:nth-child(2) {
  animation-delay: 0.2s;
}

.social-links a:nth-child(3) {
  animation-delay: 0.4s;
}

.social-links a:nth-child(4) {
  animation-delay: 0.6s;
}

.social-links a:hover {
  transform: translateY(-10px) scale(1.1);
  animation: none;
}

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

.social-links img {
  width: 25px;
  height: 25px;
}

#open-contact-form {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

#open-contact-form svg {
  flex-shrink: 0;
}

.contact-form {
  background: var(--white-color);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: inherit;
  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: 120px;
}

.contact-form button {
  width: 100%;
}

/* ==== Modal Formulaire Contact ==== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  background: var(--white-color);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow: visible;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
  z-index: 10000;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--light-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--dark-color);
}

.modal-close:hover {
  background: var(--gradient);
  color: var(--white-color);
  transform: rotate(90deg);
}

.modal-content h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  color: var(--gray-color);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.modal .contact-form {
  padding: 0;
  box-shadow: none;
}

/* Animations modal */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==== Footer ==== */
footer {
  background: var(--light-color);
  color: var(--text-color);
  padding: 3rem 2rem 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

.footer-info h3 {
  margin-bottom: 0.5rem;
}

.footer-info p {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.footer-bottom p,
.footer-bottom a {
  color: rgba(31, 41, 55, 0.7);
}

.footer-bottom a:hover {
  color: #1f2937;
}

/* ==== Responsive ==== */
@media (max-width: 968px) {
  #scroll-to-top {
    left: 90%;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-image {
    order: -1;
  }
  
  .hero-image img {
    width: 300px;
    height: 300px;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-stats {
    grid-template-columns: 1fr;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* hide des tags de projets */
@media (max-width: 950px) {
  .project-tags {
    display: none;
  }
}

@media (max-width: 820px) {
  header nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white-color);
    padding: 2rem;
    transition: var(--transition);
  }
  
  header nav.active {
    left: 0;
  }
  
  header nav ul {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  #toggle-button {
    display: flex;
  }
  
  .hero-name {
    font-size: 2.5rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    text-align: center;
  }
  
  /* Ajustements modal mobile */
  .modal-content {
    padding: 1.5rem;
    max-height: 95vh;
  }
  
  .modal-content h3 {
    font-size: 1.5rem;
  }
  
  #open-contact-form {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive slider pour tablettes */
@media (min-width: 768px) and (max-width: 1199px) {
  .project-card {
    flex: 0 0 calc(50% - 1rem);
    width: calc(50% - 1rem);
  }
}

/* Mobile: 1 carte */
@media (max-width: 767px) {
  .project-card {
    flex: 0 0 100%;
    width: 100%;
  }

  .projects-filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
}



/* ==== Additional Dark Mode Styles ==== */
body.dark-mode .skill-category,
body.dark-mode .project-card,
body.dark-mode .contact-form,
body.dark-mode .modal-content,
body.dark-mode .stat-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .skill-category:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: var(--dark-color);
}

body.dark-mode .modal-close:hover {
  background: var(--gradient);
  color: var(--white-color);
}



body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--dark-color);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .tag {
  background: rgba(102, 126, 234, 0.2);
  color: #a0b4ff;
}

body.dark-mode .social-links a {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .skill-category .Markdown,
body.dark-mode .skill-category .github,
body.dark-mode .social-links .github {
  filter: invert(100%);

}

body.dark-mode .social-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode footer {
  background: var(--light-color);
  color: var(--text-color);
}

body.dark-mode footer .footer-bottom p,
body.dark-mode footer .footer-bottom a {
  color: rgba(249, 250, 251, 0.7);
}

body.dark-mode footer .footer-bottom a:hover {
  color: #f9fafb;
}

/* Footer links */
.footer-links {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
  opacity: 0.7;
}

.footer-links a:hover {
  color: var(--primary-color);
  opacity: 1;
}

.footer-links span {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* Legal pages styles */
.legal-section {
  padding: 6rem 0;
  background: var(--light-color);
  min-height: calc(100vh - 200px);
}

.legal-content {
  max-width: 900px;
  margin: 3rem auto 0;
}

.legal-card {
  background: var(--white-color);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.legal-card h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.legal-card h3 {
  color: var(--text-color);
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
}

.legal-card p {
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal-card ul {
  margin: 1rem 0;
  padding-left: 2rem;
}

.legal-card li {
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.legal-card a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.legal-card a:hover {
  border-bottom-color: var(--primary-color);
}

.legal-update {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 15px;
  margin-top: 2rem;
}

.legal-update p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Dark mode for legal pages */
body.dark-mode .legal-section {
  background: var(--light-color);
}

body.dark-mode .legal-card {
  background: var(--white-color);
}

body.dark-mode .legal-card h2,
body.dark-mode .legal-card h3,
body.dark-mode .legal-card p,
body.dark-mode .legal-card li {
  color: var(--text-color);
}

body.dark-mode .legal-card a {
  color: var(--primary-color);
}

/* Dark mode for project buttons */
body.dark-mode .btn-project {
  background: var(--white-color);
  color: var(--primary-color);
}

body.dark-mode .btn-code {
  background: transparent;
  color: var(--white-color);
  border: 2px solid var(--white-color);
}

/* Responsive legal pages */
@media (max-width: 768px) {
  .legal-section {
    padding: 4rem 0;
  }
  
  .legal-card {
    padding: 1.5rem;
  }
  
  .legal-card h2 {
    font-size: 1.3rem;
  }
  
  .footer-links {
    font-size: 0.8rem;
  }
  
  .footer-links span {
    margin: 0 0.3rem;
  }
}


/* Smooth transition for theme change */
body,
header,
footer,
.skill-category,
.project-card,
.contact-form,
.stat-item,
.form-group input,
.form-group textarea,
.social-links a {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Animation des ellipsis pour "Projet en cours..." */
@keyframes ellipsis-animation {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

.project-content h3[data-i18n="project4.title"]::after {
  content: '...';
  display: inline-block;
  animation: ellipsis-animation 2s infinite;
  width: 1.5em;
  text-align: left;
}

