@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  --navy: #1a2744;
  --navy2: #243358;
  --accent: #2f6eb5;
  --gold: #b8922a;
  --text: #1e2535;
  --muted: #6b7280;
  --light: #9ca3af;
  --bg: #fafaf8;
  --bg2: #f3f3ef;
  --bg3: #eaeae4;
  --border: #ddddd6;
  --white: #ffffff;
  --radius: 4px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAV ───────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5rem;
  background: rgba(250, 250, 248, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

a {
  font-weight: bold;
  color: var(--gold);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--navy);
  letter-spacing: .01em;
}

.nav-logo span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--navy);
}

/* ── HERO ──────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9rem 5rem 5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: relative;
}

#hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  color: var(--gold);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--navy);
  margin-bottom: 1.4rem;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-weight: 300;
  line-height: 1.85;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
  line-height: 1;
  margin-bottom: .2rem;
}

.stat-label {
  font-size: .72rem;
  color: var(--light);
  text-transform: uppercase;
  letter-spacing: .09em;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: .7rem 1.8rem;
  font-size: .82rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  letter-spacing: .04em;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
}

.btn-primary:hover {
  background: var(--navy2);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* ── SECTIONS ──────────────────────────────────────────── */
.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 5rem;
}

.section-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: .68rem;
  color: var(--gold);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: .7rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--gold);
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3rem;
  letter-spacing: -.01em;
}

.divider {
  height: 1px;
  background: var(--border);
}

/* ── PROFIL ────────────────────────────────────────────── */
#profil {
  background: var(--white);
}

#profil .inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 6rem;
  align-items: start;
}

#profil p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.9;
  margin-bottom: 1.1rem;
  font-weight: 300;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}

.tag {
  padding: .28rem .75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: .75rem;
  font-family: 'DM Mono', monospace;
  color: var(--muted);
  background: var(--bg2);
  letter-spacing: .03em;
}

.contact-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-block h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .88rem;
  color: var(--muted);
}

.contact-icon {
  width: 30px;
  height: 30px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  padding: .5rem 1rem;
  background: #edf7f0;
  border: 1px solid #b8dfc4;
  border-radius: 2px;
  font-size: .78rem;
  color: #2d6a4f;
  font-weight: 500;
}

.avail-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #40b06a;
  flex-shrink: 0;
}

/* ── COMPÉTENCES ───────────────────────────────────────── */
#competences {
  background: var(--bg2);
}

#competences .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* 5 ou 6 cartes → 3 colonnes */
#competences .grid:has(> :nth-child(5)) {
  grid-template-columns: repeat(3, 1fr);
}

/* 7 cartes ou plus → 4 colonnes */
#competences .grid:has(> :nth-child(7)) {
  grid-template-columns: repeat(4, 1fr);
}

.skill-card {
  background: var(--white);
  padding: 1.8rem;
}

.skill-card-title {
  font-size: .72rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.2rem;
  padding-bottom: .8rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.skill-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.skill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}

.skill-name {
  color: var(--text);
}

.skill-lvl {
  font-family: 'DM Mono', monospace;
  font-size: .67rem;
  color: var(--light);
  letter-spacing: .04em;
}

/* ── PARCOURS ──────────────────────────────────────────── */
#parcours {
  background: var(--white);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.tl-item {
  position: relative;
  margin-bottom: 3.5rem;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--gold);
}

.tl-date {
  font-family: 'DM Mono', monospace;
  font-size: .7rem;
  color: var(--gold);
  letter-spacing: .1em;
  margin-bottom: .3rem;
}

.tl-role {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .15rem;
}

.tl-company {
  font-size: .88rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: .7rem;
}

.tl-desc {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.85;
  font-weight: 300;
  text-align: justify;
}

.tl-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .9rem;
}

.metric-pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: .22rem .65rem;
  font-size: .73rem;
  font-family: 'DM Mono', monospace;
  color: var(--navy);
}

/* ── RÉALISATIONS ──────────────────────────────────────── */
#realisations {
  background: var(--navy);
}

#realisations .section-eyebrow {
  color: var(--gold);
}

#realisations .section-eyebrow::before {
  background: var(--gold);
}

#realisations h2 {
  color: var(--white);
}

#realisations .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.real-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: background .25s;
}

.real-card:hover {
  background: rgba(255, 255, 255, .08);
}

.real-tag {
  font-family: 'DM Mono', monospace;
  font-size: .65rem;
  color: var(--gold);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}

.real-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: .4rem;
}

.real-num span {
  font-size: 1.3rem;
}

.real-title {
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
  margin-bottom: .5rem;
}

.real-detail {
  font-size: .8rem;
  color: rgba(255, 255, 255, .45);
  line-height: 1.75;
  font-weight: 300;
  text-align: justify;
  text-justify: distribute;
}

/* ── TÉLÉCHARGEMENTS ───────────────────────────────────── */
#telechargements {
  background: var(--bg2);
}

#telechargements .dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.dl-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  transition: border-color .2s, box-shadow .2s;
}

.dl-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(47, 110, 181, .08);
}

.dl-icon {
  font-size: 1.4rem;
  color: var(--accent);
}

.dl-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.dl-desc {
  font-size: .8rem;
  color: var(--muted);
  flex: 1;
  font-weight: 300;
  line-height: 1.7;
  text-align: justify;
  text-justify: distribute;
}

.dl-btn {
  display: inline-block;
  text-align: center;
  padding: .5rem 1rem;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s;
  letter-spacing: .03em;
}

.dl-btn:hover {
  background: var(--navy2);
}

/* ── CONTACT ───────────────────────────────────────────── */
#contact {
  background: var(--white);
}

#contact .inner {
  text-align: justify;
}

#contact p {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 2rem;
  font-weight: 300;
  line-height: 1.85;
}

.contact-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── FOOTER ────────────────────────────────────────────── */
footer {
  background: var(--navy);
  text-align: center;
  padding: 1.8rem;
  color: rgba(255, 255, 255, .35);
  font-size: .75rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: .05em;
}

footer span {
  color: rgba(255, 255, 255, .65);
}

/* ── REVEAL ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s, transform .55s;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
  nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  #hero,
  .section-wrap {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  #hero::after {
    display: none;
  }

  #profil .inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }
}