/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --accent:   #2563eb;
  --accent-d: #1d4ed8;
  --accent-s: #dbeafe;
  --bg:       #ffffff;
  --bg-alt:   #f8fafc;
  --text:     #0f172a;
  --muted:    #64748b;
  --border:   #e2e8f0;
  --r:        10px;
  --shadow:   0 2px 16px rgba(15,23,42,.07);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --mono: 'SF Mono', 'Fira Code', Consolas, 'Courier New', monospace;
}

/* ── Base ──────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Navigation ────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
#nav.scrolled { border-color: var(--border); box-shadow: 0 1px 12px rgba(15,23,42,.06); }

.nav-wrap {
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  height: 62px; display: flex; align-items: center; gap: 2rem;
}
.nav-brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.nav-brand .dot { color: var(--accent); }

#nav ul { list-style: none; display: flex; gap: 1.75rem; margin-left: auto; }
#nav ul a { font-size: .88rem; font-weight: 500; color: var(--muted); transition: color .15s; }
#nav ul a:hover { color: var(--accent); }

.nav-cta {
  background: var(--accent); color: white !important;
  padding: .45rem 1.1rem; border-radius: 6px;
  transition: background .15s !important;
}
.nav-cta:hover { background: var(--accent-d) !important; color: white !important; }

#burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; margin-left: auto; padding: 4px;
}
#burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 2rem 3rem;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, #dbeafe 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 20% 80%, #dcfce7 0%, transparent 60%),
              #fff;
  position: relative;
}

.hero-inner {
  max-width: 1100px; width: 100%;
  display: flex; align-items: center; gap: 5rem;
}

.hero-photo-ring {
  flex-shrink: 0;
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
}
.hero-photo-ring img {
  width: 210px; height: 210px;
  border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 4px solid white;
}

.hero-copy { flex: 1; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-s); padding: .3rem .8rem; border-radius: 99px;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
}
h1 em { color: var(--accent); font-style: normal; }

.hero-pitch {
  font-size: 1.1rem; color: var(--muted);
  max-width: 520px; margin-bottom: 1.25rem;
}

.hero-pills {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem;
}
.hero-pills span {
  font-family: var(--mono); font-size: .75rem;
  padding: .25rem .7rem; border-radius: 6px;
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--muted);
}

.hero-links { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }

.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: white;
  padding: .7rem 1.5rem; border-radius: 8px;
  font-weight: 600; font-size: .9rem;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary:hover { background: var(--accent-d); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.3); }

.btn-ghost {
  display: inline-block;
  padding: .65rem 1.25rem; border-radius: 8px;
  border: 1.5px solid var(--border);
  font-weight: 600; font-size: .9rem; color: var(--muted);
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-scroll-hint {
  position: absolute; bottom: 2rem;
  font-size: 1.25rem; color: var(--muted);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: 5.5rem 2rem; }
.section-alt { background: var(--bg-alt); }
.wrap { max-width: 1100px; margin: 0 auto; }

.section-h {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; letter-spacing: -.03em;
  margin-bottom: 2.5rem; position: relative; display: inline-block;
}
.section-h::after {
  content: ''; position: absolute; bottom: -6px; left: 0;
  width: 40px; height: 4px; border-radius: 2px; background: var(--accent);
}
.section-sub { color: var(--muted); margin-top: -1.5rem; margin-bottom: 2.5rem; font-size: .95rem; }

/* ── À propos ──────────────────────────────────────────────── */
.about-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }

.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 1.02rem; }
.about-text strong { color: var(--text); }

.about-aside {
  background: white; border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem; box-shadow: var(--shadow);
}
.about-aside dl { display: grid; gap: .6rem; }
.about-aside dt { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.about-aside dd { font-size: .9rem; color: var(--text); margin-bottom: .4rem; }

/* ── Services ──────────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.service-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(15,23,42,.1); }

.service-icon {
  width: 42px; height: 42px;
  background: var(--accent-s); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.service-icon svg { width: 20px; height: 20px; color: var(--accent); }

.service-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; }
.service-card > p { font-size: .88rem; color: var(--muted); margin-bottom: .75rem; }
.service-card ul { list-style: none; display: flex; flex-direction: column; gap: .25rem; }
.service-card ul li { font-size: .82rem; color: var(--muted); }
.service-card ul li::before { content: '▸ '; color: var(--accent); }

/* ── Clients ───────────────────────────────────────────────── */
.clients-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 3rem; }

.client-card {
  display: flex; gap: 1.5rem; align-items: flex-start;
  background: white; border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.client-card:hover { box-shadow: 0 6px 24px rgba(15,23,42,.1); }

.client-logo-wrap {
  flex-shrink: 0; width: 120px;
  display: flex; align-items: center; justify-content: center;
}
.client-logo { max-width: 120px; max-height: 70px; object-fit: contain; }

.client-logo-text {
  display: flex; align-items: center; justify-content: center;
  width: 120px; height: 70px;
  border-radius: 8px;
  background: var(--c, #2563eb);
  color: white;
  font-weight: 800; font-size: .75rem; letter-spacing: .04em;
  text-align: center; padding: 4px;
}

.client-body { flex: 1; min-width: 0; }

.client-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  margin-bottom: .6rem;
}
.client-years { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.client-badge {
  font-size: .7rem; font-weight: 700; padding: .15rem .55rem;
  border-radius: 99px; text-transform: uppercase; letter-spacing: .04em;
  margin-left: auto;
}
.client-badge.freelance { background: #dbeafe; color: #1d4ed8; }

.esn-via {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  color: var(--muted);
  margin-left: auto;
}
.esn-logo {
  height: 18px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  opacity: .75;
  vertical-align: middle;
}

.client-body h3 { font-size: .95rem; font-weight: 700; margin-bottom: .15rem; }
.client-role { font-size: .82rem; color: var(--accent); font-weight: 600; margin-bottom: .5rem; }
.client-body > p { font-size: .88rem; color: var(--muted); margin-bottom: .75rem; }

.client-stack {
  display: flex; flex-wrap: wrap; gap: .35rem;
  padding-top: .6rem; border-top: 1px solid var(--border);
}
.client-stack span {
  font-family: var(--mono); font-size: .72rem;
  padding: .15rem .5rem; border-radius: 5px;
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted);
}


/* ── Compétences ───────────────────────────────────────────── */
.skills-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.skill-group h3 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag {
  font-size: .8rem; font-weight: 500;
  padding: .3rem .75rem; border-radius: 99px;
  background: white; border: 1px solid var(--border); color: var(--muted);
}
.tag.hi { background: var(--accent-s); border-color: #bfdbfe; color: var(--accent-d); }

/* ── Formation ─────────────────────────────────────────────── */
.edu-list { display: flex; flex-direction: column; gap: 1rem; }
.edu-item {
  display: flex; gap: 2rem; align-items: flex-start;
  padding: 1.25rem 1.5rem; border-radius: var(--r);
  background: white; border: 1px solid var(--border); box-shadow: var(--shadow);
}
.edu-year { font-family: var(--mono); font-size: .8rem; color: var(--accent); font-weight: 600; white-space: nowrap; width: 90px; flex-shrink: 0; padding-top: .15rem; }
.edu-item strong { display: block; font-size: .95rem; margin-bottom: .15rem; }
.edu-item p { font-size: .88rem; color: var(--muted); }

/* ── Contact ───────────────────────────────────────────────── */
.contact-wrap { text-align: center; }
.contact-wrap .section-h::after { left: 50%; transform: translateX(-50%); }
.contact-sub { color: var(--muted); max-width: 500px; margin: -1rem auto 2.5rem; font-size: 1rem; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.contact-link {
  display: flex; align-items: center; gap: .7rem;
  padding: 1rem 1.75rem; border-radius: var(--r);
  border: 1.5px solid var(--border); background: white;
  font-weight: 600; font-size: .9rem; box-shadow: var(--shadow);
  transition: all .2s;
}
.contact-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,.15); }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--text); color: rgba(255,255,255,.35);
  text-align: center; padding: 1.5rem; font-size: .82rem;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-inner { flex-direction: column; text-align: center; gap: 2.5rem; }
  .hero-pitch { margin: 0 auto 1.25rem; }
  .hero-pills { justify-content: center; }
  .hero-links { justify-content: center; }
  .about-layout { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: 1fr; }
  .skills-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  #nav ul { display: none; }
  #nav ul.open {
    display: flex; flex-direction: column;
    position: fixed; top: 62px; left: 0; right: 0;
    background: white; padding: 1.25rem 2rem; gap: 1rem;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow); z-index: 99;
  }
  #burger { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .skills-cols { grid-template-columns: 1fr; }
  .client-card { flex-direction: column; }
  .esn-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .edu-item { flex-direction: column; gap: .4rem; }
  .edu-year { width: auto; }
  .hero-photo-ring img { width: 160px; height: 160px; }
}
