/* --- Nav --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeDown 0.6s 0.2s forwards;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}

/* Links desktop */
.nav-links-desktop {
  position: fixed;
  top: 0; right: 48px;
  z-index: 101;
  display: flex;
  align-items: center;
  height: 72px;
  opacity: 0;
  animation: fadeDown 0.6s 0.2s forwards;
}
.nav-links-desktop ul { display: flex; gap: 32px; list-style: none; }
.nav-links-desktop a {
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links-desktop a:hover { color: var(--fg); }
.nav-cv {
  background: var(--fg) !important;
  color: var(--bg) !important;
  padding: 4px 12px;
  font-size: 11px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  transition: opacity 0.2s;
}
.nav-cv:hover { opacity: 0.75; }

/* Burger - cache sur desktop */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  width: 32px; height: 32px;
  position: relative;
}
.burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Menu mobile - element independant hors de nav */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--bg);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  flex-direction: column;
  justify-content: center;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu li:first-child { border-top: 1px solid var(--line); }
.mobile-menu a,
.mobile-menu button {
  display: block;
  padding: 22px 32px;
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

@media (max-width: 768px) {
  nav { padding: 20px 24px; z-index: 9998; }
  .burger { display: flex; }
  .nav-links-desktop { display: none; }
  .mobile-menu { display: flex; }
}

.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 10px;
}
@media (max-width: 768px) {
  .nav-mobile-actions { display: flex; }
}

/* --- Theme toggle button --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--fg); color: var(--bg); }
.theme-toggle-mobile { display: none; }
@media (max-width: 768px) {
  .theme-toggle-mobile { display: flex; }
  .theme-toggle-desktop { display: none; }
}

/* --- Language toggle button --- */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.lang-toggle:hover {
  background: var(--fg);
  color: var(--bg);
}
.lang-toggle-mobile { display: none; }
@media (max-width: 768px) {
  .lang-toggle-mobile { display: flex; }
  .lang-toggle-desktop { display: none; }
}

