/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #020817;
  color: #f8fafc;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* ── Variables ──────────────────────────────────────────── */
:root {
  --cyan: #22d3ee;
  --cyan-dim: rgba(34,211,238,0.15);
  --cyan-border: rgba(34,211,238,0.3);
  --blue: #3b82f6;
  --slate-950: #020817;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --linkedin: #0077B5;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.anim-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.anim-hidden {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ── Navbar ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
nav.scrolled {
  background: rgba(2,8,23,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-800);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.nav-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.nav-logo-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(6,182,212,0.3);
  transition: transform 0.2s;
}
.nav-logo:hover .nav-logo-icon { transform: scale(1.1); }
.nav-logo-text { font-weight: 700; font-size: 1.1rem; }
.nav-logo-text span { color: var(--cyan); }

.nav-links { display: flex; gap: 4px; }
.nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-400);
  transition: all 0.2s;
  cursor: pointer;
}
.nav-link:hover { color: #fff; background: var(--slate-800); }
.nav-link.active { color: var(--cyan); background: var(--cyan-dim); }

.burger {
  display: none;
  color: var(--slate-400);
  padding: 4px;
  transition: color 0.2s;
}
.burger:hover { color: #fff; }

.mobile-menu {
  display: none;
  background: var(--slate-900);
  border-bottom: 1px solid var(--slate-800);
  padding: 0 24px 16px;
}
.mobile-menu.open { display: block; }
.mobile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  color: var(--slate-300);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--slate-800);
  transition: color 0.2s;
}
.mobile-menu button:last-child { border-bottom: none; }
.mobile-menu button:hover { color: var(--cyan); }

/* ── Hero ───────────────────────────────────────────────── */
#accueil {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(to right, #0f172a, #0a1628);
}
.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(#1e3a5f 1px, transparent 1px),
    linear-gradient(90deg, #1e3a5f 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow-1 {
  position: absolute;
  top: 33%; left: 25%;
  width: 320px; height: 320px;
  background: rgba(6,182,212,0.08);
  border-radius: 50%;
  filter: blur(80px);
}
.hero-glow-2 {
  position: absolute;
  bottom: 33%; right: 25%;
  width: 240px; height: 240px;
  background: rgba(59,130,246,0.08);
  border-radius: 50%;
  filter: blur(80px);
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  max-width: 896px;
  animation: fadeInUp 0.8s ease-out both;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-border);
  border-radius: 9999px;
  padding: 8px 16px;
  color: var(--cyan);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.hero-badge-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero-title .gradient {
  background: linear-gradient(to right, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--slate-400);
  font-weight: 300;
  margin-bottom: 8px;
}
.hero-sub2 { color: var(--slate-500); margin-bottom: 40px; }
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}
.btn-primary {
  padding: 16px 32px;
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(6,182,212,0.25);
}
.btn-outline {
  padding: 16px 32px;
  border: 1px solid var(--slate-700);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--slate-300);
  display: flex; align-items: center; gap: 8px;
  transition: all 0.2s;
}
.btn-outline:hover {
  border-color: var(--cyan-border);
  color: var(--cyan);
  background: var(--cyan-dim);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 400px;
  margin: 0 auto;
}
.stat-num { font-size: 2rem; font-weight: 900; color: var(--cyan); }
.stat-label { font-size: 0.75rem; color: var(--slate-500); margin-top: 4px; }
.hero-chevron {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--slate-600);
  cursor: pointer;
  animation: bounce 2s infinite;
  transition: color 0.2s;
}
.hero-chevron:hover { color: var(--cyan); }

/* ── Section Headers ────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--cyan);
}
.section-title {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 900;
  color: #fff;
  margin-top: 8px;
}
.section-bar {
  width: 64px; height: 4px;
  background: linear-gradient(to right, #06b6d4, #3b82f6);
  border-radius: 9999px;
  margin: 16px auto 0;
}
.section-desc { color: var(--slate-400); margin-top: 16px; font-size: 0.9rem; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ── Containers ─────────────────────────────────────────── */
.container { max-width: 1152px; margin: 0 auto; padding: 0 24px; }
.py-section { padding: 96px 0; }
.bg-900 { background: var(--slate-900); }
.bg-950 { background: var(--slate-950); }

/* ── QUI SUIS-JE ────────────────────────────────────────── */
.profil-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.profil-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.avatar-wrap {
  position: relative;
  animation: float 4s ease-in-out infinite;
}
.avatar {
  width: 190px;  /* On a agrandi ici */
  height: 190px; /* Et ici */
  border-radius: 20px;
  background: linear-gradient(135deg, #06b6d4, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(6,182,212,0.2);
  overflow: hidden; 
}
.avatar-badge {
  position: absolute;
  bottom: -12px; right: -12px;
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  display: flex; align-items: center; gap: 6px;
}
.tags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}
.tag-item {
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem;
  color: var(--slate-300);
}
.tag-item i { color: var(--cyan); }
.btn-linkedin {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: var(--linkedin);
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,119,181,0.3);
}
.btn-linkedin:hover { background: #006fa3; transform: scale(1.05); }

.profil-text { color: var(--slate-300); }
.profil-text p { margin-bottom: 20px; line-height: 1.8; }
.profil-text .hl { color: #fff; font-weight: 600; }
.profil-text .hl-cyan { color: var(--cyan); font-weight: 500; }
.profil-text .quote {
  font-style: italic;
  color: var(--slate-400);
  border-left: 2px solid var(--cyan);
  padding-left: 16px;
  margin-top: 4px;
}

/* ── PARCOURS ───────────────────────────────────────────── */
.parcours-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.parcours-col-title {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.col-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.col-icon.cyan { background: rgba(6,182,212,0.15); color: var(--cyan); }
.col-icon.blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.col-title-text { font-size: 1.2rem; font-weight: 700; color: #fff; }

.timeline {
  position: relative;
  padding-left: 24px;
  border-left: 1px solid var(--slate-800);
}
.timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -33px;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--slate-800);
  border: 2px solid var(--cyan);
  transition: background 0.2s;
}
.timeline-dot.blue { border-color: var(--blue); }
.timeline-item:hover .timeline-dot { background: var(--cyan); }
.timeline-item:hover .timeline-dot.blue { background: var(--blue); }

.timeline-card {
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}
.timeline-card:hover {
  border-color: rgba(6,182,212,0.3);
  box-shadow: 0 4px 20px rgba(6,182,212,0.05);
}
.timeline-card.blue:hover { border-color: rgba(59,130,246,0.3); box-shadow: 0 4px 20px rgba(59,130,246,0.05); }
.timeline-period {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600;
  color: var(--cyan);
  margin-bottom: 4px;
}
.timeline-period.blue { color: var(--blue); }
.timeline-title { font-weight: 700; color: #fff; margin-bottom: 2px; }
.timeline-place { color: var(--slate-400); font-size: 0.875rem; margin-bottom: 12px; }
.timeline-tasks { display: flex; flex-direction: column; gap: 4px; }
.timeline-task {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.875rem; color: var(--slate-400);
}
.timeline-task i { color: var(--blue); margin-top: 2px; flex-shrink: 0; }

/* ── PROJETS ────────────────────────────────────────────── */
.projets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.projet-card {
  background: rgba(30,41,59,0.5);
  border: 1px solid var(--slate-700);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 16px;
  transition: all 0.3s;
}
.projet-card:hover {
  border-color: rgba(6,182,212,0.35);
  background: var(--slate-800);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(6,182,212,0.05);
}
.projet-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(59,130,246,0.15));
  border: 1px solid rgba(6,182,212,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
  flex-shrink: 0;
  transition: transform 0.3s;
}
.projet-card:hover .projet-icon { transform: scale(1.1); }
.projet-body { flex: 1; }
.projet-tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-bottom: 8px;
}
.projet-tag.ecole {
  background: rgba(6,182,212,0.12);
  color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.2);
}
.projet-tag.entreprise {
  background: rgba(59,130,246,0.12);
  color: var(--blue);
  border: 1px solid rgba(59,130,246,0.2);
}
.projet-title { font-weight: 700; color: #fff; font-size: 1.1rem; margin-bottom: 8px; }
.projet-desc { color: var(--slate-400); font-size: 0.875rem; line-height: 1.6; }

/* ── PROCÉDURES ─────────────────────────────────────────── */
.proc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.proc-card {
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
}
.proc-card:hover {
  border-color: rgba(6,182,212,0.35);
  background: rgba(30,41,59,0.8);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(6,182,212,0.05);
}
.proc-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(6,182,212,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
  margin-bottom: 16px;
  transition: background 0.2s;
}
.proc-card:hover .proc-icon { background: rgba(6,182,212,0.2); }
.proc-title { font-weight: 700; color: #fff; margin-bottom: 8px; }
.proc-desc { color: var(--slate-400); font-size: 0.8rem; line-height: 1.5; }
.proc-link {
  display: none;
  align-items: center; gap: 4px;
  font-size: 0.75rem; font-weight: 600;
  color: var(--cyan);
  margin-top: 16px;
}
.proc-card:hover .proc-link { display: flex; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--slate-900);
  border-top: 1px solid var(--slate-800);
  padding: 40px 0;
}
.footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 8px; }
.footer-logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: flex; align-items: center; justify-content: center;
}
.footer-copy { color: var(--slate-500); font-size: 0.875rem; text-align: center; }
.footer-li a { color: var(--slate-400); transition: color 0.2s; }
.footer-li a:hover { color: var(--linkedin); }

/* ── Back to top ────────────────────────────────────────── */
#backTop {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border-radius: 12px;
  display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(6,182,212,0.3);
  transition: transform 0.2s;
  z-index: 99;
  cursor: pointer;
}
#backTop.visible { display: flex; }
#backTop:hover { transform: scale(1.1); }


/* ── Responsive ─────────────────────────────────────────── */
@media (min-width: 640px) {
  .projets-grid { grid-template-columns: 1fr 1fr; }
  .proc-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .burger { display: none !important; }
}
@media (max-width: 767px) {
  .nav-links { display: none; }
  .burger { display: flex !important; }
  .nav-logo-text { display: none; }
  .proc-link { display: flex; } /* Ligne magique pour les téléphones */
}
@media (min-width: 1024px) {
  .profil-grid { grid-template-columns: 1fr 1fr; }
  .parcours-grid { grid-template-columns: 1fr 1fr; }
  .proc-grid { grid-template-columns: repeat(4, 1fr); }
}