/* Site-CV — feuille de style unique. Polices hébergées localement (licence OFL, voir fonts/). */

@font-face { font-family: "Manrope"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/raleway-latin-700-normal.woff2") format("woff2"); }

/* ---------- Couleurs : thème clair (bleu du CV) ---------- */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1b2733;
  --muted: #4f5f70;
  --rule: #d9e1ea;
  --accent: #184572;
  --band: #184572;
  --band-text: #ffffff;
  --band-muted: #c9d6e4;
  --button-bg: #ffffff;
  --button-text: #184572;
  --helix-a: #184572;
  --helix-b: #6885a3;
  --rung: #4a9fd0;
  --tag-bg: #e2e7ed;
  --focus: #c4581f;
  --display: "Raleway", "Segoe UI", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

/* ---------- Thème sombre ---------- */
:root[data-theme="dark"] {
  --bg: #0d1823;
  --surface: #13212f;
  --text: #e3eaf1;
  --muted: #a7b5c3;
  --rule: #26384b;
  --accent: #8fbde8;
  --band: #0f2d4b;
  --band-text: #ffffff;
  --band-muted: #b8c9da;
  --button-bg: #e3eaf1;
  --button-text: #0f2d4b;
  --helix-a: #8fbde8;
  --helix-b: #4d7397;
  --rung: #4a9fd0;
  --tag-bg: #1c2f42;
  --focus: #f0a878;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1823;
    --surface: #13212f;
    --text: #e3eaf1;
    --muted: #a7b5c3;
    --rule: #26384b;
    --accent: #8fbde8;
    --band: #0f2d4b;
    --band-text: #ffffff;
    --band-muted: #b8c9da;
    --button-bg: #e3eaf1;
    --button-text: #0f2d4b;
    --helix-a: #8fbde8;
    --helix-b: #4d7397;
    --rung: #4a9fd0;
    --tag-bg: #1c2f42;
    --focus: #f0a878;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.03rem/1.65 var(--sans);
  transition: background-color .2s, color .2s;
}

.wrap { max-width: 50rem; margin-inline: auto; padding-inline: 1.25rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--surface); color: var(--text);
  padding: 0.5rem 0.75rem; border: 1px solid var(--rule); z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---------- Bandeau d'en-tête ---------- */
.site-header { background: var(--band); color: var(--band-text); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "tools tools" "identity photo";
  align-items: center;
  column-gap: 1.5rem;
  padding-block: 1rem 2rem;
}
.header-tools {
  grid-area: tools;
  display: flex; justify-content: flex-end; align-items: center; gap: 1rem;
  font-size: 0.88rem; margin-bottom: 0.5rem;
}
.header-tools .lang { color: var(--band-text); }
.theme-toggle { display: none; }
.js .theme-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; color: var(--band-text);
  background: transparent; border: 1px solid var(--band-muted);
  border-radius: 999px; padding: 0.2rem 0.7rem; cursor: pointer;
}
.theme-toggle:hover { background: rgba(255,255,255,.1); }
.theme-toggle svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; }
.theme-toggle svg .fill { fill: currentColor; stroke: none; }

.identity { grid-area: identity; }
.identity p { margin: 0; }
h1 {
  font: 700 clamp(2.1rem, 6.5vw, 3rem)/1.1 var(--display);
  margin: 0 0 0.45rem;
  letter-spacing: -0.005em;
}
.role { font-size: 1.12rem; font-weight: 600; }
.place { color: var(--band-muted); margin-bottom: 1.2rem !important; }
.button {
  display: inline-block;
  background: var(--button-bg); color: var(--button-text);
  padding: 0.6rem 1.15rem; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
.button:hover { filter: brightness(0.94); }
.photo {
  grid-area: photo;
  width: 9rem; height: 9rem; object-fit: cover;
  border-radius: 10px;
  border: 3px solid rgba(255,255,255,.85);
}

/* ---------- Bande d'ADN ---------- */
.dna { display: block; width: 100%; height: 28px; margin-top: 0.4rem; }
.dna .strand-a { fill: none; stroke: var(--helix-a); stroke-width: 2.2; stroke-linecap: round; }
.dna .strand-b { fill: none; stroke: var(--helix-b); stroke-width: 2; stroke-linecap: round; }
.dna .rung { stroke: var(--rung); stroke-width: 1.6; stroke-dasharray: 1.5 2.6; stroke-linecap: round; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.site-nav ul {
  list-style: none; margin-block: 0;
  display: flex; flex-wrap: wrap; column-gap: 1.25rem; row-gap: 0;
}
.site-nav a {
  display: block; padding: 0.7rem 0;
  color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 600;
}
.site-nav a:hover { color: var(--accent); }

/* ---------- Sections ---------- */
main { padding-bottom: 2rem; }
section { padding-top: 2.5rem; scroll-margin-top: 3.25rem; }
h2 {
  display: flex; align-items: center; gap: 0.65rem;
  font: 700 1.2rem/1.2 var(--display);
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule);
}
.h-icon {
  width: 1.7rem; height: 1.7rem; flex: none;
  fill: none; stroke: var(--accent); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
h3 { font-size: 1.04rem; line-height: 1.35; margin: 0; font-weight: 700; }

.lead { margin-top: 0; }
.facts { color: var(--muted); font-size: 0.94rem; }

/* Expérience */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.card p { margin: 0.5rem 0 0; }
.card .org { margin-top: 0.15rem; font-weight: 600; color: var(--accent); }
.card .meta { margin-top: 0.1rem; color: var(--muted); font-size: 0.9rem; }
.card ul { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.card li + li { margin-top: 0.35rem; }
.card li::marker { color: var(--accent); }

/* Formation */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--rule);
}
.timeline li:last-child { border-bottom: 0; }
.when { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Compétences */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.85rem; }
.skill {
  background: var(--surface); border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 8px; padding: 0.9rem 1rem;
}
.skill p { margin: 0.3rem 0 0; font-size: 0.96rem; }

/* Publications */
.pubs { margin: 0; padding-left: 1.4rem; }
.pubs li { padding-left: 0.3rem; }
.pubs li + li { margin-top: 0.9rem; }
.pubs li::marker { color: var(--accent); font-weight: 700; }
.pubs b { color: var(--accent); }
.pubs cite { font-style: normal; font-weight: 600; }
.pubs a { overflow-wrap: anywhere; }
.tag {
  display: inline-block; font-size: 0.78rem; color: var(--muted);
  background: var(--tag-bg); border-radius: 999px; padding: 0 0.55rem;
}

/* Communications */
.plain { margin: 0; padding-left: 1.2rem; }
.plain li + li { margin-top: 0.4rem; }
.plain li::marker { color: var(--accent); }

/* Pied de page */
.site-footer { color: var(--muted); font-size: 0.94rem; }
.site-footer .dna { margin-top: 0; }
.site-footer p { margin-block: 0; padding-block: 1rem 2.5rem; }

/* ---------- Téléphone ---------- */
@media (max-width: 34rem) {
  .header-inner { grid-template-areas: "tools tools" "identity photo"; column-gap: 1rem; padding-bottom: 1.5rem; }
  .photo { width: 5.5rem; height: 5.5rem; align-self: start; margin-top: 0.3rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.1rem; }
  .card { padding: 1rem; }
  .site-nav ul { column-gap: 1rem; }
  .site-nav a { padding: 0.45rem 0; }
  section { scroll-margin-top: 5rem; }
}

/* ---------- Impression ---------- */
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --rule: #bbb;
    --accent: #184572; --band: #fff; --band-text: #000; --band-muted: #444;
    --button-bg: #fff; --button-text: #000;
  }
  body { font-size: 10.5pt; }
  .site-nav, .skip, .header-tools, .dna { display: none; }
  .header-inner { padding: 0 0 0.5rem; }
  .photo { width: 2.8cm; height: 2.8cm; border: 0; }
  .button { padding: 0; font-weight: 400; }
  .button::after { content: " : " attr(href); }
  section { padding-top: 1rem; }
  .card, .skill { break-inside: avoid; }
}
