/* Animation sur les cartes d'icônes de technologies */
.skills-grid .tech-card {
  transition: transform 0.18s cubic-bezier(.4,2,.3,1), box-shadow 0.18s cubic-bezier(.4,2,.3,1);
}
.skills-grid .tech-card:hover {
  transform: translateY(-8px) scale(1.07);
  box-shadow: 0 6px 24px 0 rgba(0,0,0,0.22);
  border-color: #3a3f4a;
}
:root {
  --bg: #0f1213;
  --bg-alt: #131719;
  --fg: #f6f7f9;
  --muted: #b8bcc2;
  --accent: #7ce7c9;
  --accent-2: #ffd166;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --max-width: 1180px;
  font-family: 'Syne', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  scroll-behavior: smooth;
  cursor: auto;
  font-size: 15px;
}

body.light {
  --bg: #f5f6f9;
  --bg-alt: #ffffff;
  --fg: #0f1111;
  --muted: #545b62;
  --card: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.08);
  background: radial-gradient(circle at 20% 20%, rgba(124, 231, 201, 0.12), transparent 32%),
              radial-gradient(circle at 80% 0%, rgba(255, 209, 102, 0.12), transparent 28%),
              var(--bg);
}

#app {
  display: flex;
  flex-direction: column;
  gap: 120px;
  padding: 32px clamp(16px, 4vw, 40px) 120px;
}

section { width: 100%; position: relative; }

section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--accent) 20%, 
    var(--accent-2) 50%, 
    var(--accent) 80%, 
    transparent 100%);
  opacity: 0.6;
}

section:last-of-type::after {
  display: none;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(8px, 2vw, 12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  padding: 0;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

/* Burger menu button */
.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
}

.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  transition: all 0.3s ease;
}

/* Menu overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.menu-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.menu-close svg {
  width: 24px;
  height: 24px;
  color: var(--fg);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.menu-link {
  font-size: 28px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.menu-link:hover {
  color: var(--accent);
  transform: translateX(8px);
}

.menu-lang-toggle {
  margin-top: 16px;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

.small-pill { padding: 6px 10px; font-size: 12px; }

.icon-btn {
  min-width: 48px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
}

.icon-btn svg { width: 16px; height: 16px; color: currentColor; }

.btn, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0c0d0d;
  box-shadow: var(--shadow);
}

.btn:hover { transform: translateY(-2px); }

.ghost {
  background: transparent;
  color: var(--fg);
}

.ghost:hover { border-color: var(--accent); color: var(--accent); }

.hide { display: none; }


.hero {
  margin-top: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(32px, 5.5vw, 54px);
  margin: 10px 0 12px;
  line-height: 1.05;
}

.accent { color: var(--accent-2); }

.lede { color: var(--muted); max-width: 520px; line-height: 1.5; }

.eyebrow {
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent);
  margin: 0;
}

.actions { display: flex; gap: 12px; margin: 22px 0 16px; flex-wrap: wrap; }

.hero-visual {
  display: grid;
  place-items: center;
  position: relative;
}

.portrait-container {
  position: relative;
  width: min(320px, 60vw);
  aspect-ratio: 1;
}

.portrait {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.portrait-name-overlay {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: 'Syne', 'Inter', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.7);
  letter-spacing: 2px;
  pointer-events: none;
  animation: floatName 2.5s ease-in-out infinite alternate;
}

@keyframes floatName {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-18px) scale(1.07) rotate(-2deg);
    opacity: 0.92;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.portrait-socials {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.portrait-socials a {
  min-width: 36px;
  height: 36px;
  padding: 6px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--fg);
  transition: transform 150ms ease, background 150ms ease;
}

.portrait-socials a:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-2px);
}

.portrait-socials svg {
  width: 18px;
  height: 18px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  align-items: start;
}

.copy { color: var(--muted); line-height: 1.6; display: grid; gap: 12px; align-self: center; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.skill-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social { display: flex; gap: 12px; align-items: center; }
.social a {
  min-width: 40px;
  height: 40px;
  padding: 8px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  background: var(--card);
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.social a:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.social .icon svg { width: 20px; height: 20px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.projects .card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); }
.link { color: var(--accent); font-weight: 600; }

.section-head { margin-bottom: 20px; }
.section-head h2 { margin: 6px 0 0; }

.experience .timeline {
  display: grid;
  gap: 14px;
}

.timeline-card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
}

.timeline-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--muted);
}

.pill-alt { border-color: rgba(255, 209, 102, 0.5); color: var(--accent-2); }

.muted { color: var(--muted); }

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-actions { display: grid; gap: 16px; }
.contact-form { display: grid; gap: 12px; width: 100%; }
.form-row { display: grid; gap: 12px; }
.form-row.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: grid; gap: 6px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.12);
  color: var(--fg);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: 1px solid var(--accent); }

.social-column { display: grid; gap: 12px; align-content: start; }

.quote {
  margin: 0;
  padding-left: 0;
  border-left: none;
  color: var(--fg);
  line-height: 1.5;
}
.small { color: var(--muted); font-size: 13px; }

.footer {
  padding: 32px clamp(16px, 4vw, 40px) 48px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.footer-left {
  flex: 1 1 0;
  display: flex;
  align-items: center;
}
.footer-center {
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer-right {
  flex: 1 1 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.footer-lang-toggle {
  margin-left: auto;
  margin-right: 0;
  align-self: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 0 8px;
  transition: color 0.2s;
}
.footer-lang-toggle:hover {
  color: var(--accent);
}

.testimonial {
  width: 100%;
  max-width: none;
}

@media (max-width: 768px) {
  #app { gap: 80px; padding: 20px 16px 80px; }
  body { cursor: auto; }
  .nav-links { display: none; }
  .burger-btn { display: flex; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-actions { justify-items: start; }
  .footer-grid {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
  }
  .footer-left, .footer-center, .footer-right {
    width: 100%;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    display: flex;
  }
  .footer-lang-toggle {
    margin-top: 0;
    margin-bottom: 8px;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
  }
  .footer-center .social {
    justify-content: center;
    width: 100%;
  }
}
