/* ===== TOKENS ===== */
:root {
  --bg: #0A0A0F;
  --bg2: #12121A;
  --bg3: #1A1A26;
  --accent: #6C63FF;
  --accent2: #FF6B6B;
  --text: #E8E8F0;
  --text-muted: #8888A8;
  --border: rgba(108,99,255,0.15);
  --radius: 12px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--accent); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(10,10,15,0.97);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 20px 5%;
  flex-direction: column;
  gap: 16px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--accent); }

/* ===== HERO ===== */
#accueil {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 5% 60px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(108,99,255,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(255,107,107,0.05) 0%, transparent 60%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.3);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.hero-name .accent { color: var(--accent); }
.hero-name .line2 { color: var(--text-muted); }
.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: 420px;
}
.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s;
  display: inline-block;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: #7B74FF;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108,99,255,0.35);
}
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-socials { display: flex; gap: 12px; margin-top: 32px; }
.hero-socials a {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.25s;
}
.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,99,255,0.08);
}

/* Avatar card */
.hero-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.06;
}
.avatar-ring {
  width: 140px; height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 3px;
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-initials {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
}
.card-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.card-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat { background: var(--bg3); border-radius: 10px; padding: 12px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); }

/* ===== SECTION COMMONS ===== */
section { padding: 80px 5%; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.section-title .dim { color: var(--text-muted); }

/* ===== ABOUT ===== */
#apropos { background: var(--bg2); }
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-text strong { color: var(--text); font-weight: 500; }
.about-timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 28px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px; top: 30px; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(108,99,255,0.15);
  border: 1px solid var(--accent);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}
.timeline-content h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-content p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ===== SKILLS ===== */
#competences { background: var(--bg); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.skill-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
}
.skill-card:hover {
  border-color: rgba(108,99,255,0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.skill-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.skill-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(108,99,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.skill-name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; }
.skill-level { font-size: 0.75rem; color: var(--text-muted); }
.skill-bar-bg {
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.skill-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #9B94FF);
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.skill-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ===== PROJECTS ===== */
#projets { background: var(--bg2); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
}
.project-card:hover {
  border-color: rgba(108,99,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.project-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.project-thumb::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--bg));
}
.project-body { padding: 20px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.project-tag {
  font-size: 0.7rem;
  background: rgba(108,99,255,0.12);
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.project-title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.project-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.project-links { display: flex; gap: 10px; }
.project-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: flex; align-items: center; gap: 4px;
  transition: opacity 0.2s;
}
.project-link:hover { opacity: 0.7; }

/* ===== CERTIFICATS ===== */
#certificats { background: var(--bg); }
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.cert-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
}
.cert-card:hover {
  border-color: rgba(108,99,255,0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.cert-preview {
  height: 200px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
}
.cert-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.cert-preview:hover img { transform: scale(1.03); }
.cert-preview-icon { font-size: 3rem; }
.cert-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108,99,255,0.15);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  gap: 6px;
}
.cert-preview:hover .cert-overlay { opacity: 1; }
.cert-body { padding: 18px; }
.cert-badge {
  font-size: 0.7rem;
  background: rgba(255,107,107,0.12);
  color: var(--accent2);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}
.cert-title { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.cert-org { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.cert-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.cert-link:hover { opacity: 0.7; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* ===== CONTACT ===== */
#contact { background: var(--bg2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.contact-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 28px;
}
.contact-items { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.contact-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.contact-item-icon {
  width: 36px; height: 36px;
  background: rgba(108,99,255,0.1);
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.contact-item a { color: var(--text-muted); text-decoration: none; }
.contact-item a:hover { color: var(--accent); }
.contact-ext { display: flex; gap: 10px; }
.btn-wa {
  display: flex; align-items: center; gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
}
.btn-wa:hover { background: #1FB85A; transform: translateY(-2px); }
.contact-form {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.form-group input,
.form-group textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  cursor: pointer;
}
.form-check input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
#form-result { font-size: 0.85rem; margin-top: 10px; min-height: 20px; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 28px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text); }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { order: -1; max-width: 320px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 60px 5%; }
  footer { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
