:root {
  --bg-color: #000;
  --text-color: #fff;
  --accent-color: #ff2500;
  --shadow-color: rgba(255, 37, 0, 0.3);
  --glass-bg: rgba(30, 30, 30, 0.4);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Transitions fluides pour éviter le flash */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  padding-top: 80px;
  min-height: 110vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  opacity: 1;
  animation: fadeInPage 0.5s ease-out;
  position: relative;
}

/* Background gradient subtil */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(255, 37, 0, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

body.creation-page {
  position: relative;
  background-image: url('../images/code.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

body.creation-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: -1;
}

body.creation-page .section {
  background: rgba(0, 0, 0, 0.32);
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

body.light-mode.creation-page .section {
  background: rgba(255, 255, 255, 0.7);
  color: #0f0f0f;
}

body.creation-page footer {
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

body.light-mode.creation-page footer {
  background: rgba(255, 255, 255, 0.7);
  color: #0f0f0f;
}

body.light-mode.creation-page {
  background-color: #f6f6f6;
}

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

/* Transition de sortie de page */
body.page-transition {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease-in;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  height: 100px;
  background: rgba(10, 14, 20, 0.002);
  backdrop-filter: blur(150px) saturate(300%);
  -webkit-backdrop-filter: blur(150px) saturate(300%);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px 0 rgba(0,0,0,0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  background: rgba(10, 14, 20, 0.005);
  backdrop-filter: blur(160px) saturate(320%);
  -webkit-backdrop-filter: blur(160px) saturate(320%);
}
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0.5rem;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 20px var(--shadow-color);
  max-width: 100%;
}
.logo {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.nav-links {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
  position: relative;
}
.nav-links li {
  margin: 0 0.2rem;
}
.nav-links li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.5rem 0.3rem;
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  font-size: 1rem;
  text-align: center;
  display: inline-block;
  transform: translateZ(0);
  will-change: transform, color;
}
.nav-links li a:hover {
  color: var(--accent-color);
  transform: translateY(-2px) scale(1.05);
}
.nav-links li a:active {
  transform: translateY(0) scale(0.98);
}
.nav-links > li > a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: var(--accent-color);
  transition: width 0.3s ease;
}
.nav-links > li > a:hover::after, .nav-links > li > a.active::after {
  width: 100%;
}

/* Style pour la page active */
.nav-links li a.active {
  color: var(--accent-color);
  font-weight: 600;
}

.nav-links li a.active::after {
  width: 100%;
  background: var(--accent-color);
}

.theme-toggle {
  background: var(--accent-color);
  color: var(--text-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.theme-toggle:hover {
  transform: scale(1.05);
}
/* Language toggle */
.lang-toggle {
  --lang-toggle-size: 36px;
  --lang-toggle-gap: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: var(--lang-toggle-gap);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 0.2rem;
  margin-right: 0.6rem;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.lang-toggle::before {
  content: '';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: var(--lang-toggle-size);
  height: var(--lang-toggle-size);
  border-radius: 999px;
  background: var(--accent-color);
  box-shadow: 0 4px 12px var(--shadow-color);
  transform: translateX(0);
  transition: transform 0.25s ease;
  z-index: 0;
  pointer-events: none;
}

body[data-lang="en"] .lang-toggle::before {
  transform: translateX(calc(var(--lang-toggle-size) + var(--lang-toggle-gap)));
}

body.light-mode .lang-toggle {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.lang-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-color);
  width: var(--lang-toggle-size);
  height: var(--lang-toggle-size);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.2s ease, color 0.2s ease;
  outline: none;
  position: relative;
  z-index: 1;
}
.lang-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px var(--shadow-color);
}
.lang-btn.active {
  color: #111;
  font-weight: 600;
}

body.light-mode .lang-btn.active {
  color: #000;
}
.hero {
  margin-top: 0;
  padding-top: 0;
  min-height: 110vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  background-image: url('images/hero-bg.png');
  background-size: cover;
  background-position: center;
  position: relative;
  padding-top: 15vh;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 35%, rgba(0,0,0,0.4) 100%);
backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  pointer-events: none;
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}
.hero-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  margin-top: 6vh;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-photo:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.hero h1 {
  font-size: 4.8rem;
  margin-top: 1rem;
  margin-bottom: 1.2rem;
  color: var(--accent-color);
  font-style: italic;
  animation: fadeInUp 1.5s ease-out;
  text-shadow: 0 0 15px var(--shadow-color);
}
@keyframes fadeInUp {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.subtitle {
  font-size: 2.3rem;
  margin-bottom: 3rem;
  animation: fadeIn 1.8s ease-out;
}
.btn {
  background: linear-gradient(45deg, var(--accent-color), #ff2500);
  color: var(--text-color);
  padding: 1.2rem 3rem;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(255, 37, 0, 0.25), 0 0 20px rgba(255, 37, 0, 0.1);
  font-size: 1.4rem;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 37, 0, 0.4), 0 0 25px rgba(255, 37, 0, 0.25);
}
.section {
  position: relative;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  padding: 3rem 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
  opacity: 0;
  animation: slideIn 1.5s ease-out forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}
.section h2 {
  position: relative;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff2500 50%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
  text-align: center;
  margin-bottom: 3rem;
  font-size: 3.2rem;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 15px var(--shadow-color);
}
#about,
#skills {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
#about {
  margin-bottom: 3rem;
}
#skills {
  margin-top: 1.5rem;
}
#about p {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.8;
}
#skills .skill-cards {
  max-width: 900px;
  margin: 0 auto;
  flex-wrap: wrap;
}
#skills .skill-cards .card {
  flex: 1 1 260px;
  text-align: center;
}
.skills-preview .skill-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}
.skill-cards .card {
  background: linear-gradient(135deg, rgba(255, 37, 0, 0.1), rgba(255, 37, 0, 0.05));
  padding: 2rem;
  border-radius: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(255, 37, 0, 0.25), 0 0 20px rgba(255, 37, 0, 0.1);
  font-size: 1.4rem;
}

.skill-cards .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 40px rgba(255, 37, 0, 0.35), 0 0 30px rgba(255, 37, 0, 0.15);
}
.competence-grid {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 2.5rem !important;
  width: 100% !important;
}
.competence-item, .interest-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 2rem;
  border-radius: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
  font-size: 1.3rem;
}

.competence-item:hover, .interest-item:hover {
  background: linear-gradient(135deg, rgba(255, 37, 0, 0.15), rgba(255, 37, 0, 0.1));
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 8px 20px var(--shadow-color);
}
.competence-icon, .education-icon, .interest-image, .timeline-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 1.2rem;
  transition: all 0.5s ease;
}
.competence-item:hover .competence-icon,
.education-item:hover .education-icon,
.interest-item:hover .interest-image,
.timeline-item:hover .timeline-image {
  transform: scale(1.15) rotate(5deg);
}
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}
.timeline-item {
  padding: 1.8rem 2.5rem;
  border-left: 4px solid var(--accent-color);
  margin-bottom: 2.5rem;
  position: relative;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
  font-size: 1.3rem;
}

.timeline-item ul {
  margin: 1rem 0;
}

.timeline-item li {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.timeline-item li:last-child {
  margin-bottom: 0;
}
.timeline-item:hover {
  transform: translateX(8px);
  background: rgba(255, 37, 0, 0.1);
  box-shadow: 0 8px 30px rgba(255, 37, 0, 0.25), 0 0 20px rgba(255, 37, 0, 0.1);
}
.timeline-item h3 {
  color: var(--accent-color);
  margin: 0 0 0.5rem 0;
  font-size: 2.2rem;
  font-style: italic;
}
.timeline-item p {
  margin: 0.6rem 0;
}
.timeline-image {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0.8rem 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: all 0.5s ease;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
}
.timeline-item:hover .timeline-image {
  transform: scale(1.05);
  box-shadow: 0 6px 16px var(--shadow-color);
}
.education-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  transition: all 0.4s ease;
  margin-bottom: 2.5rem;
}

.education-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.02);
}

.education-item ul {
  margin: 1rem 0 0 0;
  padding-left: 1.5rem;
}

.education-item li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  max-width: 750px;
  margin: 2.5rem auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(255, 37, 0, 0.25), 0 0 20px rgba(255, 37, 0, 0.1);
  font-size: 1.3rem;
}
.input-field {
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-color);
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 1.3rem;
}

.input-field:focus {
  background: rgba(255, 37, 0, 0.1);
  box-shadow: 0 0 10px var(--shadow-color);
  outline: none;
}
footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 37, 0, 0.2);
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.2rem;
  position: relative;
  min-width: 100px;
}

.footer-links a:hover {
  transform: translateY(-3px);
}
.footer-links a.linkedin {
  background: rgba(0, 119, 181, 0.08);
  border: 1px solid rgba(0, 119, 181, 0.2);
}
.footer-links a.linkedin:hover {
  color: #ffffff;
  background: #0077B5;
  border-color: #0077B5;
  box-shadow: 0 6px 20px rgba(0, 119, 181, 0.4);
  transform: translateY(-3px) scale(1.05);
}
.footer-links a.twitter {
  background: rgba(55, 65, 81, 0.08);
  border: 1px solid rgba(55, 65, 81, 0.2);
}
.footer-links a.twitter:hover {
  color: #ffffff;
  background: #374151;
  border-color: #374151;
  box-shadow: 0 6px 20px rgba(55, 65, 81, 0.4);
  transform: translateY(-3px) scale(1.05);
}
.footer-links a.twitter i {
  font-weight: 300;
}
.footer-links a.twitter::after {
  background: #374151;
}
.footer-links a.website {
  background: rgba(255, 37, 0, 0.08);
  border: 1px solid rgba(255, 37, 0, 0.2);
}
.footer-links a.website:hover {
  color: #ffffff;
  background: #FF4500;
  border-color: #FF4500;
  box-shadow: 0 6px 20px rgba(255, 37, 0, 0.4);
  transform: translateY(-3px) scale(1.05);
}
.footer-links a.github {
  background: rgba(107, 114, 128, 0.08);
  border: 1px solid rgba(107, 114, 128, 0.2);
}
.footer-links a.github:hover {
  color: #ffffff;
  background: #6b7280;
  border-color: #6b7280;
  box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
  transform: translateY(-3px) scale(1.05);
}
.footer-links a.github::after {
  background: #6b7280;
}
.footer-links a i {
  font-size: 1.2rem;
  transition: all 0.4s ease;
}
.footer-links a:hover i {
  transform: scale(1.1);
  color: #ffffff !important;
}
.footer-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transition: all 0.4s ease;
  transform: translateX(-50%);
}
.footer-links a.linkedin::after {
  background: #0077B5;
}
.footer-links a.twitter::after {
  background: #6b7280;
}
.footer-links a.website::after {
  background: #FF4500;
}
.footer-links a.github::after {
  background: #181717;
}
footer-links a:hover::after {
  width: 80%;
}
footer p {
  color: var(--text-color);
  font-size: 1.2rem;
  margin: 1rem 0;
  opacity: 0.8;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--shadow-color);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 37, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 37, 0, 0);
  }
}
.footer-links a:active {
  animation: pulse 0.5s;
}
body.light-mode {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --accent-color: #ff2500;
  --shadow-color: rgba(255, 37, 0, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.08);
}

body.light-mode header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(155px) saturate(260%);
  -webkit-backdrop-filter: blur(155px) saturate(260%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

body.light-mode .navbar {
  background: transparent;
}

body.light-mode .logo {
  color: var(--text-color);
}

body.light-mode .nav-links a {
  color: var(--text-color);
  background: rgba(0, 0, 0, 0.02);
}

body.light-mode .nav-links a:hover {
  background: rgba(255, 37, 0, 0.1);
  color: var(--text-color);
  box-shadow: 0 4px 12px var(--shadow-color);
}

body.light-mode .submenu {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.light-mode .submenu li a {
  color: var(--text-color);
}

body.light-mode .submenu li a:hover {
  background: rgba(255, 37, 0, 0.1);
  color: var(--text-color);
}

body.light-mode .hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

body.light-mode .hero::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

body.light-mode .hero h1 {
  color: var(--text-color);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.light-mode .subtitle {
  color: var(--text-color);
  opacity: 0.8;
}

body.light-mode .btn {
  background: linear-gradient(45deg, var(--accent-color), #ff2500);
  box-shadow: 0 4px 15px var(--shadow-color);
}

body.light-mode .btn:hover {
  background: linear-gradient(45deg, #ff2500, var(--accent-color));
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 37, 0, 0.4), 0 0 25px rgba(255, 37, 0, 0.25);
}

body.light-mode .section {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(180%);
}

body.light-mode .glassmorphism {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(155px) saturate(260%);
}

body.light-mode .skill-cards .card {
  background: linear-gradient(135deg, rgba(255, 37, 0, 0.08), rgba(255, 37, 0, 0.04));
  color: var(--text-color);
  backdrop-filter: blur(10px) saturate(180%);
}

body.light-mode .skill-cards .card:hover {
  background: linear-gradient(135deg, rgba(255, 37, 0, 0.12), rgba(255, 37, 0, 0.06));
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 35px var(--shadow-color);
}

body.light-mode .competence-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .timeline-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .timeline-item::before {
  background: var(--accent-color);
  box-shadow: 0 0 15px var(--shadow-color);
}

body.light-mode .interest-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode .contact-form {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.light-mode footer {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .footer-links a.linkedin {
  background: rgba(0, 119, 181, 0.06);
  border: 1px solid rgba(0, 119, 181, 0.15);
}
body.light-mode .footer-links a.linkedin:hover {
  background: #0077B5;
  border-color: #0077B5;
  box-shadow: 0 6px 20px rgba(0, 119, 181, 0.4);
}

body.light-mode .footer-links a.twitter {
  background: rgba(55, 65, 81, 0.06);
  border: 1px solid rgba(55, 65, 81, 0.15);
}
body.light-mode .footer-links a.twitter:hover {
  background: #374151;
  border-color: #374151;
  box-shadow: 0 6px 20px rgba(55, 65, 81, 0.4);
}

body.light-mode .footer-links a.website {
  background: rgba(255, 37, 0, 0.06);
  border: 1px solid rgba(255, 37, 0, 0.15);
}
body.light-mode .footer-links a.website:hover {
  background: #FF4500;
  border-color: #FF4500;
  box-shadow: 0 6px 20px rgba(255, 37, 0, 0.4);
}

body.light-mode .footer-links a.github {
  background: rgba(107, 114, 128, 0.06);
  border: 1px solid rgba(107, 114, 128, 0.15);
}
body.light-mode .footer-links a.github:hover {
  background: #6b7280;
  border-color: #6b7280;
  box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

body.light-mode .theme-toggle {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

body.light-mode .theme-toggle:hover {
  background: rgba(255, 37, 0, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 6px 20px var(--shadow-color);
}

/* Corrections pour les éléments avec texte blanc en mode clair */
body.light-mode .contact-link,
body.light-mode .social-link {
  color: var(--text-color) !important;
  background: var(--accent-color);
}

body.light-mode .flip-back-btn,
body.light-mode .download-pdf-btn,
body.light-mode .copy-text-btn {
  color: var(--text-color) !important;
}

body.light-mode .essential-info {
  color: var(--text-color) !important;
}

/* Pas de transitions - changement instantané */

/* Préchargement du mode clair pour éviter le flash */
html.light-mode-preload body {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --accent-color: #ff2500;
  --shadow-color: rgba(255, 37, 0, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.08);
}

html.light-mode-preload body.light-mode {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --accent-color: #ff2500;
  --shadow-color: rgba(255, 37, 0, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0, 0, 0, 0.08);
}
body.light-mode .input-field {
  background: rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 1rem;
    height: auto;
    flex-wrap: wrap;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    margin: 0.5rem 0;
    justify-content: flex-start;
    padding: 0.5rem 0;
  }
  
  .theme-toggle {
    margin-left: auto;
  }
  .lang-toggle {
    margin-left: 0.6rem;
  }
  
  .nav-links li {
    margin: 0 0.2rem;
  }
  .nav-links li a {
    padding: 0.4rem 0.6rem;
  }
  .hero-photo {
    width: 160px;
    height: 160px;
    margin-top: 8vh;
    margin-bottom: 0.9rem;
  }
  .hero h1 { font-size: 2.8rem; margin-top: 0.6rem; }
  .subtitle { font-size: 1.4rem; }
  .section { padding: 3.5rem 1rem; }
  .contact-form { max-width: 90%; padding: 1.2rem; }
  .footer-content p { font-size: 1.2rem; }
  .social-links a { font-size: 1.2rem; margin: 0 1rem; }
  
  /* Styles responsifs pour les sections de formation */
  .education-section {
    padding: 1.5rem;
    margin-bottom: 3rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
  
  .education-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .education-content {
    margin-left: 0;
  }
  
  .education-content h4 {
    font-size: 1.5rem;
  }
  
  .education-icon {
    width: 100px;
    height: 100px;
  }
  
  /* Styles responsifs pour la page contact */
  .contact-cards, .social-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .contact-card, .social-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .contact-icon, .social-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
  }
  
  .contact-content h4, .social-content h4 {
    font-size: 1.3rem;
  }
  
  .contact-section {
    padding: 1.5rem;
    margin-bottom: 3rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  /* Styles responsifs pour la carte qui se retourne */
  .flip-card {
    width: 300px !important;
    height: 350px !important;
    min-width: 300px;
    max-width: 300px;
    min-height: 350px;
    max-height: 350px;
  }
  
  .flip-card-container {
    height: 400px;
    margin-bottom: 4rem;
  }
  
  .essential-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }
  
  .info-item {
    padding: 0.4rem;
    margin-bottom: 0.6rem;
  }
  
  .info-item span {
    font-size: 0.75rem;
  }
  
  .flip-back-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    margin-top: 0.8rem;
  }
}
main {
  margin-top: 0;
  flex: 1;
}
.interest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}
.interest-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.interest-item:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 20px var(--shadow-color);
}
.interest-image {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 15px var(--shadow-color);
  transition: all 0.5s ease;
  border: 3px solid rgba(255, 37, 0, 0.1);
}
.interest-item:hover .interest-image {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 37, 0, 0.4), 0 0 25px rgba(255, 37, 0, 0.25);
  border-color: rgba(255, 37, 0, 0.3);
}
.interest-item h3 {
  color: var(--accent-color);
  margin: 0;
  font-size: 2.2rem;
  font-style: italic;
}
.interest-item p {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.6;
}
.footer-links a i.fa-x {
  font-weight: 900;
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
}
.footer-links a i.fa-x-twitter {
  font-weight: 900;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0 auto;
}

/* Grille pour la page Infrastructure */
.creation-hero {
  margin: 0 auto 2.5rem;
  max-width: 1100px;
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 22px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.creation-hero-image {
  width: 100%;
  max-width: 820px;
  border-radius: 18px;
  box-shadow: 0 12px 30px var(--shadow-color);
  object-fit: cover;
}

body.light-mode.creation-page .creation-hero {
  background: rgba(255, 255, 255, 0.65);
}
.creation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.creation-item {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 2.5rem;
  border-radius: 15px;
  transition: all 0.6s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
  font-size: 1.3rem;
  border: 1px solid rgba(255, 37, 0, 0.1);
}

.creation-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 12px 35px rgba(255, 37, 0, 0.4), 0 0 25px rgba(255, 37, 0, 0.25);
  border-color: rgba(255, 37, 0, 0.3);
}

.creation-item h3 {
  color: var(--accent-color);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.creation-item h3 i {
  font-size: 1.6rem;
  color: var(--accent-color);
}

.creation-item p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.creation-item ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.creation-item li {
  margin-bottom: 0.8rem;
  line-height: 1.5;
}

.creation-item strong {
  color: var(--accent-color);
  font-weight: 600;
}

/* Styles pour les sections de formation */
.education-section {
  margin-bottom: 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  border-left: 4px solid var(--accent-color);
  transition: all 0.5s ease;
}

.education-section:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(10px);
  box-shadow: 0 12px 35px rgba(255, 37, 0, 0.4), 0 0 25px rgba(255, 37, 0, 0.25);
}

.section-title {
  color: var(--accent-color);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

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

.education-content {
  flex: 1;
  margin-left: 1.5rem;
}

.education-content h4 {
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.education-period {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Styles pour la page contact */
.contact-section {
  margin-bottom: 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
  border-left: 4px solid var(--accent-color);
  transition: all 0.5s ease;
  position: relative;
  z-index: 1;
}

.contact-section:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(10px);
  box-shadow: 0 12px 35px rgba(255, 37, 0, 0.4), 0 0 25px rgba(255, 37, 0, 0.25);
}

.contact-cards, .social-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-card, .social-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 15px;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-card:hover, .social-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 10px 30px var(--shadow-color);
}

.contact-icon, .social-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color);
  border-radius: 50%;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.contact-card:hover .contact-icon,
.social-card:hover .social-icon {
  transform: scale(1.1) rotate(5deg);
}

.contact-content, .social-content {
  flex: 1;
}

.contact-content h4, .social-content h4 {
  color: var(--accent-color);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-content p, .social-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.contact-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.contact-link, .social-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.contact-link:hover, .social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 37, 0, 0.25), 0 0 20px rgba(255, 37, 0, 0.1);
}

/* Couleurs spécifiques pour les réseaux sociaux */
.linkedin-card .social-icon {
  background: #0077B5;
}

.twitter-card .social-icon {
  background: #6b7280;
}

.website-card .social-icon {
  background: var(--accent-color);
}

.contact-info {
  text-align: center;
  margin-top: 2rem;
}

/* Styles pour la carte qui se retourne */
.flip-card-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 4rem;
  height: 450px;
  position: relative;
  width: 100%;
}

.flip-card {
  width: 350px !important;
  height: 400px !important;
  perspective: 1000px;
  cursor: pointer;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  flex-shrink: 0;
  min-width: 350px;
  max-width: 350px;
  min-height: 400px;
  max-height: 400px;
}

.flip-card-inner {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  flex-shrink: 0;
  min-width: 100%;
  max-width: 100%;
  min-height: 100%;
  max-height: 100%;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100% !important;
  height: 100% !important;
  backface-visibility: hidden;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  max-width: 100%;
  min-height: 100%;
  max-height: 100%;
  box-sizing: border-box;
}

.flip-card-front {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-direction: column;
  position: relative;
}

.flip-card-back {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: rotateY(180deg);
  padding: 1rem;
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
}

.flip-card-front .contact-map {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 15px;
}

.flip-card-front:hover .card-overlay {
  opacity: 1;
}

.card-overlay h4 {
  color: var(--accent-color);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-overlay p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.card-overlay i {
  font-size: 2rem;
  color: var(--accent-color);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-10px) scale(1.02);
  }
}

.essential-info {
  text-align: center;
  color: white;
  width: 100% !important;
  height: 100% !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.2rem 1rem 1rem 1rem;
  max-height: 100% !important;
  overflow: visible;
  box-sizing: border-box;
  min-width: 100%;
  max-width: 100%;
  min-height: 100%;
  max-height: 100%;
}

.essential-info h4 {
  color: var(--accent-color);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: unset;
  box-sizing: border-box;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.info-item i {
  color: var(--accent-color);
  font-size: 1.1rem;
  min-width: 18px;
}

.info-item span {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.75rem;
  line-height: 1.3;
}

.flip-back-btn {
  margin-top: 0;
  padding: 0.4rem 0.8rem;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  width: 100%;
  font-weight: 500;
}

.flip-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.flip-back-btn i {
  font-size: 0.8rem;
}

/* Conteneur des actions de la carte */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.8rem;
  flex-shrink: 0;
  width: 100%;
  padding: 0 0.5rem;
}

.card-actions-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.download-pdf-btn, .copy-text-btn {
  width: 100%;
  flex: 1 1 0;
}

.flip-back-btn {
  margin-top: 0.4rem;
  width: 60%;
  align-self: center;
}

/* Bouton de téléchargement PDF (vert) */
.download-pdf-btn {
  padding: 0.4rem 0.8rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  width: 100%;
  font-weight: 500;
}

.download-pdf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
  background: #218838;
}

.download-pdf-btn i {
  font-size: 0.8rem;
}

/* Bouton de copie de texte (bleu) */
.copy-text-btn {
  padding: 0.4rem 0.8rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  width: 100%;
  font-weight: 500;
}

.copy-text-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
  background: #0056b3;
}

.copy-text-btn i {
  font-size: 0.8rem;
}

/* Styles pour le mode clair - carte qui se retourne */
body.light-mode .flip-card-front {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light-mode .flip-card-back {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

body.light-mode .essential-info {
  color: #333;
}

body.light-mode .info-item {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .info-item:hover {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.2);
}

body.light-mode .card-overlay {
  background: rgba(0, 0, 0, 0.8);
}

.essential-info, .info-item {
  font-family: 'Space Grotesk', 'Poppins', sans-serif !important;
  font-size: 1rem !important;
}

.flip-card-back, .card-actions, .card-actions-row, .flip-back-btn, .download-pdf-btn, .copy-text-btn {
  font-family: 'Space Grotesk', 'Poppins', sans-serif !important;
}

/* Effet glassmorphism générique */
.glassmorphism {
  background: rgba(10, 14, 20, 0.002);
  backdrop-filter: blur(150px) saturate(300%);
  -webkit-backdrop-filter: blur(150px) saturate(300%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px 0 rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}

.glassmorphism:hover {
  box-shadow: 0 6px 24px 0 rgba(0,0,0,0.12);
}

body.light-mode .glassmorphism {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 20px 0 rgba(0,0,0,0.06);
}

/* Sous-menus déroulants glassmorphism */
.nav-links {
  position: relative;
}
.has-submenu {
  position: relative;
}
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 320px;
  padding: 0.5rem 0;
  z-index: 9999;
  pointer-events: auto;
  list-style: none;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.22);
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(40, 40, 40, 0.9)); /* Dégradé sombre plus opaque */
  backdrop-filter: blur(20px) saturate(200%); /* Flou intense pour effet verre */
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.25); /* Bordure légèrement plus visible */
}
body.light-mode .submenu {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(220,220,220,0.85)); /* Dégradé clair légèrement plus opaque */
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.18); /* Bordure adaptée au mode clair */
  backdrop-filter: blur(20px) saturate(220%); /* Flou intense en mode clair */
  -webkit-backdrop-filter: blur(20px) saturate(220%);
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.submenu:hover,
.submenu:focus-within {
  display: block;
}
.submenu li {
  width: 100%;
}
.submenu li a {
  display: block;
  padding: 0.7rem 1.2rem;
  color: var(--text-color);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.light-mode .submenu li a {
  color: #222;
}
.submenu li a:hover, .submenu li a:focus {
  background: rgba(40,40,40,0.2);
  color: var(--accent-color);
  box-shadow: 0 2px 12px 0 rgba(255, 37, 0,0.2);
  transform: translateY(-2px) scale(1.04);
}
body.light-mode .submenu li a:hover, body.light-mode .submenu li a:focus {
  background: rgba(255, 37, 0,0.12);
  color: var(--accent-color);
}

/* Amélioration du glassmorphism sur les sections */
.section.glassmorphism {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
  .submenu {
    min-width: 120px;
    left: 0;
    right: auto;
  }
}

/* Pour éviter que les ancres soient masquées par le header */
[id], .competence-item, .timeline-item, .education-section, .contact-section {
  scroll-margin-top: 90px;
}

.has-submenu {
  position: relative;
}
.submenu.glassmorphism {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  max-width: 340px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15,15,15,0.98), rgba(35,35,35,0.95)); /* Dégradé sombre très opaque */
  box-shadow: 0 12px 40px 0 rgba(0,0,0,0.28), 0 2px 10px 0 rgba(255,255,255,0.15) inset;
  border: 1px solid rgba(255,255,255,0.3); /* Bordure plus marquée */
  overflow: hidden;
  padding: 0.5rem 0;
  backdrop-filter: blur(20px) saturate(200%); /* Flou intense pour effet verre premium */
  -webkit-backdrop-filter: blur(20px) saturate(200%);
}
body.light-mode .submenu.glassmorphism {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(200,200,200,0.90)); /* Dégradé clair très opaque pour meilleure lisibilité */
  border: 1.5px solid rgba(0,0,0,0.15);
  box-shadow: 0 12px 40px 0 rgba(0,0,0,0.22), 0 2px 10px 0 rgba(30,30,30,0.1) inset;
  backdrop-filter: blur(20px) saturate(220%); /* Flou intense en mode clair */
  -webkit-backdrop-filter: blur(20px) saturate(220%);
}
.submenu.glassmorphism::before,
.submenu.glassmorphism::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 60%, transparent 100%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 3;
  filter: blur(15px);
}
body.light-mode .submenu.glassmorphism::before,
body.light-mode .submenu.glassmorphism::after {
  background: radial-gradient(ellipse at center, rgba(30,30,30,0.6) 0%, rgba(30,30,30,0.2) 60%, transparent 100%);
}
.submenu.glassmorphism::before {
  top: -10%;
  left: -10%;
  transform: translate(-10%, -10%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.submenu.glassmorphism::after {
  bottom: -10%;
  right: -10%;
  transform: translate(10%, 10%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
body:not(.light-mode) .submenu.glassmorphism::before,
body:not(.light-mode) .submenu.glassmorphism::after {
  display: block;
}
.submenu li a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0.7rem 1.2rem !important;
  margin: 0 !important;
  color: var(--text-color);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 4;
  min-width: 160px;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
}
body.light-mode .submenu li a {
  color: #222;
}

/* Reflet glassmorphism uniquement en mode sombre, doux, sans bord net, coin haut gauche et coin bas droit, symétriques */
.submenu.glassmorphism::before {
  top: -10%;
  left: -10%;
  transform: translate(-10%, -10%) !important;
  width: 60% !important;
  height: 60% !important;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 60%, transparent 100%) !important;
}
.submenu.glassmorphism::after {
  bottom: -10%;
  right: -10%;
  transform: translate(10%, 10%) !important;
  width: 60% !important;
  height: 60% !important;
  background: radial-gradient(ellipse at bottom right, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 60%, transparent 100%) !important;
}

/* Survol sous-menu : centrage parfait, padding uniforme, alignement parfait, pas de débordement */
.submenu li a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.7rem 1.1rem !important;
  margin: 0 !important;
  color: var(--text-color);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 4;
  min-width: 160px;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
}
body.light-mode .submenu li a {
  color: #222;
}
.submenu li a:hover, .submenu li a:focus {
  background: linear-gradient(90deg, rgba(255, 37, 0,0.15) 0%, rgba(255, 37, 0,0.1) 100%);
  color: var(--accent-color);
  box-shadow: 0 2px 12px 0 rgba(255, 37, 0,0.15);
  transform: translateY(-2px) scale(1.04);
}
body.light-mode .submenu li a:hover, body.light-mode .submenu li a:focus {
  background: linear-gradient(90deg, rgba(255,165,0,0.2) 0%, rgba(255,165,0,0.12) 100%);
  color: var(--accent-color);
}
/* ============================================
   Améliorations visuelles des pages
   ============================================ */

/* Sections avec effets visuels améliorés */
.section {
position: relative;  border-radius: 20px;  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);  overflow: hidden;
  position: relative;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 37, 0, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.section:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 37, 0, 0.15);
}

/* Titres avec gradient animé */
.section h2 {
position: relative;  background: linear-gradient(135deg, var(--accent-color) 0%, #ff2500 50%, var(--accent-color) 100%);  -webkit-background-clip: text;  -webkit-text-fill-color: transparent;  background-clip: text;  background-size: 200% 200%;  animation: gradientShift 4s ease infinite;
  position: relative;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff2500 50%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Cartes avec effets améliorés */
.skill-cards .card,
.card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 37, 0, 0.2);
}

.skill-cards .card::before,
.card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 37, 0, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-cards .card:hover::before,
.card:hover::before {
  opacity: 1;
}

.skill-cards .card:hover,
.card:hover {
  transform: translateY(-10px) scale(1.03);
  border-color: rgba(255, 37, 0, 0.5);
  box-shadow: 0 20px 50px rgba(255, 37, 0, 0.3), 0 0 30px rgba(255, 37, 0, 0.2);
}

/* Boutons améliorés */
.btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-color), #ff2500);
  box-shadow: 0 8px 25px rgba(255, 37, 0, 0.4), 0 0 15px rgba(255, 37, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 37, 0, 0.5), 0 0 25px rgba(255, 37, 0, 0.3);
}

/* Hero amélioré */
.hero {
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top, rgba(255, 37, 0, 0.2) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

/* Animation photo hero */
.hero-photo {
  transition: transform 0.4s ease;
}

.hero-photo:hover {
  transform: scale(1.05);
}



/* ============================================
   Améliorations de l'affichage du contenu
   ============================================ */

/* Amélioration de la typographie et des espacements */
.section p {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: justify;
  text-justify: inter-word;
}

#about p {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
  line-height: 2;
  padding: 0 1rem;
}

/* Mise en page en colonnes pour le texte long */
.section > p:first-of-type,
.timeline-item > p:first-of-type {
  column-count: 1;
}

@media (min-width: 900px) {
  .section > p:first-of-type,
  .timeline-item > p:first-of-type {
    column-count: 2;
    column-gap: 3rem;
    column-rule: 1px solid rgba(255, 37, 0, 0.2);
  }
}

/* Amélioration des titres h3 et h4 */
.competence-item h3,
.timeline-item h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  font-weight: 600;
  text-align: center;
}

.timeline-item h4 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 37, 0, 0.3);
  padding-bottom: 0.5rem;
}

/* Amélioration des listes */
.competence-item ul,
.timeline-item ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.competence-item li,
.timeline-item li {
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(255, 37, 0, 0.4);
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  line-height: 1.7;
}

.competence-item li:hover,
.timeline-item li:hover {
  background: rgba(255, 37, 0, 0.1);
  border-left-color: var(--accent-color);
  transform: translateX(5px);
  padding-left: 1.3rem;
}

.competence-item li strong,
.timeline-item li strong {
  color: var(--accent-color);
  font-weight: 600;
}

/* Grille de compétences améliorée */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem;
  min-height: 100%;
}

.competence-item h3 {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.competence-item ul {
  text-align: left;
  width: 100%;
  margin-top: auto;
}

/* Timeline améliorée */
.timeline-item {
  padding: 2.5rem 3rem;
  margin-bottom: 3rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--accent-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.timeline-item p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.9;
}

.timeline-item img {
  margin: 2rem auto;
  display: block;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Espacements améliorés pour les sections */
.section {
  margin-bottom: 4rem;
}

.section:last-child {
  margin-bottom: 2rem;
}

/* Responsive amélioré */
@media (max-width: 768px) {

/* Amélioration de la lisibilité */
body {
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

