@charset "UTF-8";

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --fg: #111827;
  --fg-muted: #6b7280;
  --bg: #f3f4f6;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(79,70,229,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(79,70,229,0.15), 0 2px 8px rgba(0,0,0,0.08);
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --transition: 0.35s ease;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  scroll-behavior: smooth;
}
[data-theme="dark"] {
  --fg: #f1f5f9;
  --fg-muted: #94a3b8;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --border: #334155;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--fg);
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 99px; }

/* ─── Header ────────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
  z-index: 100;
}
[data-theme="dark"] header {
  background: rgba(15,23,42,0.8);
}
.header-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}
.burger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: background var(--transition);
}
.nav-links {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition);
}
[data-theme="dark"] .nav-links {
  background: rgba(15,23,42,0.95);
}
.nav-links.open {
  max-height: 300px;
}
.nav-links ul {
  list-style: none;
  margin: 0;
  padding: 1rem 0;
  text-align: center;
}
.nav-links li {
  margin: 0.5rem 0;
}
.nav-links a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition), background var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-links a:hover::after {
  width: 60%;
}
@media (min-width: 768px) {
  .burger {
    display: none;
  }
  .nav-links {
    position: static;
    display: flex;
    max-height: none;
    background: transparent;
  }
  .nav-links ul {
    display: flex;
    gap: 1.5rem;
    padding: 0;
  }
  .nav-links li {
    margin: 0;
  }
}

main {
  margin-top: 5rem;
}

/* ─── Sections ──────────────────────────────────────────────── */
section {
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
}

/* Titre de section avec ligne dégradée */
section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}
section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  border-radius: 99px;
  background: var(--gradient);
}

/* ─── Hero (#home) ──────────────────────────────────────────── */
#home {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 40%, rgba(79,70,229,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(6,182,212,0.10) 0%, transparent 55%);
}
[data-theme="dark"] #home {
  background: radial-gradient(ellipse at 70% 40%, rgba(79,70,229,0.22) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(6,182,212,0.15) 0%, transparent 55%);
}
#home h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.5rem 0 0.25rem;
  letter-spacing: -0.02em;
}
.tagline {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--fg-muted);
  margin-bottom: 2rem;
  min-height: 1.6em;
}

/* Avatar style */
.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1.5rem;
  position: relative;
  padding: 4px;
  background: var(--gradient);
  box-shadow: var(--shadow-lg);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}

/* ─── À propos ───────────────────────────────────────────────── */
#about p {
  max-width: 680px;
  color: var(--fg-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}
#about p strong {
  color: var(--primary);
  font-weight: 700;
}

/* ─── Contact ────────────────────────────────────────────────── */
#contact > p:first-of-type {
  max-width: 500px;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

/* ─── Expériences ────────────────────────────────────────────── */
#experience {
  text-align: left;
  align-items: center;
  width: 100%;
}
#experience h2 {
  align-self: center;
}
.experience-item {
  width: 100%;
  max-width: 800px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-left-color var(--transition);
}
.experience-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(4px);
  border-left-color: var(--accent);
}
.experience-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.2rem;
}
.experience-item h3 em {
  font-style: normal;
  color: var(--fg-muted);
  font-weight: 500;
}
.experience-item span {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(79,70,229,0.08);
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  margin: 0.5rem 0 0.75rem;
}
.experience-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.experience-item ul li {
  font-size: 0.9rem;
  color: var(--fg-muted);
  padding-left: 1rem;
  position: relative;
}
.experience-item ul li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 0.05em;
}

/* ─── Compétences ────────────────────────────────────────────── */
.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  max-width: 700px;
}
.skills-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-muted);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition);
  cursor: default;
}
.skills-list li:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
  transform: translateY(-2px);
}

/* Projects styling */
.carousel {
  position: relative;
  margin: 2rem auto;
  max-width: 1000px;
}
.carousel-track-container {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform var(--transition);
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 1;
}
.prev {
  left: 10px;
}
.next {
  right: 10px;
}
.project-card {
  flex: 0 0 auto;
  background: var(--bg);
  color: var(--fg);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1rem;
  margin: 0 10px;
  transition: transform var(--transition);
}
.project-card:hover {
  transform: translateY(-5px);
}
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.project-link {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.project-link:hover {
  background: #3730a3;
  transform: translateY(-2px);
}

/* ─── Contact ────────────────────────────────────────────────── */
#contact p {
  margin-top: 0.5rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition),
              color var(--transition), border-color var(--transition);
}
.contact-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.mail-icon {
  flex-shrink: 0;
  color: var(--primary);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  background: var(--gradient);
  color: #fff;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(79,70,229,0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.45);
}
.btn.outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}
.btn.outline:hover {
  background: rgba(79,70,229,0.06);
  box-shadow: none;
}

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* ─── Theme toggle ───────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* ─── Language dropdown ──────────────────────────────────────── */
.lang-dropdown {
  position: relative;
}
.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.25rem 0.6rem 0.25rem 0.3rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.lang-dropdown-toggle:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.chevron {
  stroke: var(--fg-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.lang-dropdown.open .chevron {
  transform: rotate(180deg);
}
.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 140px;
  z-index: 200;
}
.lang-dropdown.open .lang-dropdown-menu {
  display: block;
  animation: fadeDown 0.2s ease;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-dropdown-menu li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg-muted);
  transition: background var(--transition), color var(--transition);
}
.lang-dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 0.875rem;
  width: 100%;
  transition: color var(--transition);
}
.lang-dropdown-menu li:hover,
.lang-dropdown-menu li a:hover {
  background: rgba(79,70,229,0.06);
  color: var(--primary);
}
.lang-active {
  opacity: 0.5;
  cursor: default;
}
.flag-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.35rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

/* ─── Scroll reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease var(--delay, 0ms),
              transform 0.65s ease var(--delay, 0ms);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Fond alterné entre sections ───────────────────────────── */
section:nth-child(even) {
  background: rgba(79,70,229,0.03);
}
[data-theme="dark"] section:nth-child(even) {
  background: rgba(79,70,229,0.06);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 767px) {
  #experience {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .experience-item {
    padding: 1.25rem;
  }
}