/* =====================================================
   Portfolio Thierno Sadou Diallo
   Couleurs reprises du CV (bleu marine + bleu accent)
   ===================================================== */

:root {
  --navy: #1F3A5F;
  --accent: #2B6CB0;
  --accent-soft: #E6EEF8;
  --bg: #FFFFFF;
  --bg-alt: #F5F8FC;
  --text: #1E2A38;
  --muted: #5A6878;
  --border: #DCE3EC;
  --green: #2F855A;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(31, 58, 95, 0.08);
  --max: 1100px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
strong { color: var(--navy); font-weight: 600; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.15rem; color: var(--navy); letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--accent); }
.nav .nav-cta {
  background: var(--navy); color: #fff; padding: 8px 18px; border-radius: 999px;
}
.nav .nav-cta:hover { background: var(--accent); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.2s; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 0.98rem; transition: 0.2s; border: 2px solid transparent;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* ---------- Accueil ---------- */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%); }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #E8F5EE; color: var(--green); font-weight: 600; font-size: 0.88rem;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; color: var(--navy); letter-spacing: -0.02em; }
.hero-role { font-size: clamp(1.15rem, 2.4vw, 1.45rem); color: var(--accent); font-weight: 600; margin: 10px 0 18px; }
.hero-pitch { color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero-meta { color: var(--muted); font-size: 0.92rem; }

.hero-photo img {
  width: 100%; height: auto; max-width: 340px; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%;
  border-radius: 50%; margin-left: auto;
  border: 6px solid #fff; box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}

.stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px;
}
.stats li {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.stats strong { display: block; font-size: 1.7rem; color: var(--navy); font-weight: 800; }
.stats span { color: var(--muted); font-size: 0.9rem; line-height: 1.4; display: block; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); color: var(--navy); line-height: 1.2; margin-bottom: 20px; letter-spacing: -0.015em; }
.section p + p { margin-top: 14px; }
.section-intro { color: var(--muted); margin-bottom: 36px; }

.saad {
  margin-top: 28px; padding: 18px 22px;
  background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0;
  color: var(--text); font-style: italic;
}
.saad strong { font-style: normal; }

/* ---------- Projets ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
}
.project-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.project h3 { font-size: 1.15rem; color: var(--navy); line-height: 1.35; }
.project-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; font-style: italic; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.project-context { font-size: 0.95rem; color: var(--muted); }
.project-list { padding-left: 18px; font-size: 0.95rem; }
.project-list li + li { margin-top: 6px; }
.project-list li::marker { color: var(--accent); }

/* Schéma en étoile */
.star {
  display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto auto;
  gap: 8px; text-align: center; font-size: 0.8rem; font-weight: 600; margin: 4px 0;
}
.star span { padding: 8px 6px; border-radius: 8px; }
.star-dim { background: var(--bg-alt); border: 1px dashed var(--accent); color: var(--navy); }
.star-fact { background: var(--navy); color: #fff; grid-column: 2; grid-row: 2; }
.star-dim:nth-child(1) { grid-column: 2; grid-row: 1; }
.star-dim:nth-child(2) { grid-column: 1; grid-row: 2; }
.star-dim:nth-child(4) { grid-column: 3; grid-row: 2; }
.star-dim:nth-child(5) { grid-column: 2; grid-row: 3; }

/* Graphique en barres */
.chart { background: var(--bg-alt); border-radius: 10px; padding: 16px; font-size: 0.85rem; }
.chart figcaption { font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.chart figcaption span { font-weight: 400; color: var(--muted); }
.bar { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 8px; margin: 6px 0; }
.bar-label { color: var(--text); }
.bar-track { background: #fff; border-radius: 4px; height: 12px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--v); background: var(--accent); border-radius: 4px; }
.bar-fill.muted { background: #A9B8CA; }
.bar-value { text-align: right; font-weight: 600; color: var(--navy); }
.chart-note { margin-top: 10px; color: var(--muted); }

/* ---------- Parcours ---------- */
.timeline { list-style: none; border-left: 2px solid var(--border); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 28px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px;
  border-radius: 50%; background: #fff; border: 3px solid var(--accent);
}
.timeline li.tl-work::before { background: var(--accent); }
.tl-date { font-size: 0.85rem; font-weight: 700; color: var(--accent); }
.timeline h3 { font-size: 1.05rem; color: var(--navy); margin: 2px 0; }
.timeline p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Compétences ---------- */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.skill-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 10px; }
.skill-card ul { list-style: none; font-size: 0.92rem; color: var(--text); }
.skill-card li { padding: 4px 0; border-bottom: 1px solid var(--bg-alt); }
.skill-card li:last-child { border-bottom: 0; }
.languages { margin-top: 28px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: #DCE6F2; }
.contact h2, .contact strong { color: #fff; }
.contact .eyebrow { color: #9EC3EE; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.contact .btn-primary { background: #fff; color: var(--navy); }
.contact .btn-primary:hover { background: var(--accent-soft); }
.contact .btn-ghost { border-color: #fff; color: #fff; }
.contact .btn-ghost:hover { background: #fff; color: var(--navy); }

/* ---------- Pied de page ---------- */
.site-footer { padding: 24px 0; text-align: center; color: var(--muted); font-size: 0.88rem; border-top: 1px solid var(--border); }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 960px) {
  .skills { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .projects { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { order: -1; }
  .hero-photo img { max-width: 200px; margin: 0 auto; }
  .hero-pitch { margin: 0 auto; }
  .hero-actions { justify-content: center; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; width: 100%; border-top: 1px solid var(--bg-alt); }
  .nav .nav-cta { border-radius: 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .logo { font-size: 1rem; }
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 40px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats li { padding: 14px; }
  .stats strong { font-size: 1.35rem; }
  .skills { grid-template-columns: 1fr; }
  .project { padding: 20px; }
  .project-head { flex-direction: column; gap: 2px; }
  .bar { grid-template-columns: 92px 1fr 36px; }
}
