:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #16202e;
  --muted: #5a6474;
  --line: #e3dfd6;
  --navy: #182b49;
  --accent: #c8553d;
  --accent-soft: #f6e4de;
  --shadow: 0 1px 2px rgba(22, 32, 46, .06), 0 8px 24px rgba(22, 32, 46, .06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1520;
    --surface: #172030;
    --text: #e9edf3;
    --muted: #9aa5b6;
    --line: #263247;
    --navy: #9fb7e0;
    --accent: #ef8a6f;
    --accent-soft: #3a2420;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1520;
  --surface: #172030;
  --text: #e9edf3;
  --muted: #9aa5b6;
  --line: #263247;
  --navy: #9fb7e0;
  --accent: #ef8a6f;
  --accent-soft: #3a2420;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: Fraunces, Georgia, serif; line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; margin: 0; }
p { margin: 0 0 .8em; }
a { color: inherit; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 8px 14px; background: var(--surface); z-index: 20; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding: 12px max(16px, calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: Fraunces, serif; font-weight: 700; text-decoration: none; color: var(--navy); font-size: 1.2rem; }
.nav nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.nav nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: .92rem; white-space: nowrap; }
.nav nav a:hover { color: var(--text); background: var(--surface); }
.theme { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; flex: none; }

/* Sections */
main > section { max-width: 1120px; margin: 0 auto; padding: 72px 16px; }
main > section + section { border-top: 1px solid var(--line); }
.fade { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade.vu { opacity: 1; transform: none; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: .6em; }
.section-intro { max-width: 760px; color: var(--muted); }
.mt { margin-top: 40px; }

/* Hero */
.hero { padding-top: 96px !important; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.6rem); color: var(--navy); margin-bottom: .3em; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 780px; }
.lead.small { font-size: 1rem; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.cta.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem;
  background: var(--navy); color: var(--bg); border: 1px solid var(--navy);
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.kpis { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpis li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.kpis b { display: block; font-family: Fraunces, serif; font-size: 2rem; color: var(--accent); line-height: 1.1; }
.kpis span { color: var(--muted); font-size: .9rem; }

/* Balompia */
.feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }
.feature-card { display: flex; flex-direction: column; align-items: center; }
.mock { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.mock-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-title { font-weight: 600; }
.mock-list { list-style: none; padding: 0; margin: 0 0 14px; }
.mock-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mock-list b { color: #2f8f5b; }
.mock-btn { text-align: center; background: #2f8f5b; color: #fff; padding: 10px; border-radius: 10px; font-weight: 600; margin: 0; }
.mock-note { font-size: .8rem; color: var(--muted); margin-top: 8px; }

/* Parcours */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .when { font-size: .82rem; font-weight: 600; color: var(--accent); margin: 0 0 2px; }
.timeline .where { color: var(--muted); font-size: .92rem; margin: 2px 0 6px; }
.timeline p:last-child { margin: 0; font-size: .95rem; }

/* Projets */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.filter { border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; }
.filter[aria-pressed="true"] { background: var(--navy); color: var(--bg); border-color: var(--navy); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.card p { color: var(--muted); font-size: .95rem; flex: 1; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pill { background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.year { color: var(--muted); font-size: .82rem; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .78rem; border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--muted); }
.tags.big li { font-size: .95rem; padding: 6px 14px; border-radius: 999px; color: var(--text); background: var(--surface); }
.card-link { margin-top: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }

/* Compétences */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.skill { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.skill h3 { font-size: 1.05rem; color: var(--navy); }
.skill p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Contact */
.contact { text-align: center; }
.contact p { color: var(--muted); }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 32px 16px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .feature, .cols { grid-template-columns: 1fr; gap: 36px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nav nav { display: none; }
  .theme { margin-left: auto; }
  main > section { padding: 56px 16px; }
  .grid { grid-template-columns: 1fr; }
}
