:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #16181a;
  --muted: #4a5056;
  --accent: #1d4ed8;
  --accent-contrast: #ffffff;
  --border: #d9dbd6;
  --radius: 0.75rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315;
    --surface: #1a1d20;
    --text: #f1f1ee;
    --muted: #b4b9be;
    --accent: #8fb0ff;
    --accent-contrast: #0b0d10;
    --border: #2c3034;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111315;
  --surface: #1a1d20;
  --text: #f1f1ee;
  --muted: #b4b9be;
  --accent: #8fb0ff;
  --accent-contrast: #0b0d10;
  --border: #2c3034;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

.container { width: 100%; max-width: 64rem; margin-inline: auto; padding-inline: 1.25rem; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 1rem; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); max-width: 22ch; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; max-width: 70ch; }

a { color: var(--accent); text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 0.25rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 20;
  background: var(--accent); color: var(--accent-contrast);
  padding: 0.75rem 1rem; border-radius: 0.5rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 0.75rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.nav-list { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { display: inline-block; padding: 0.6rem 0.75rem; color: var(--text); text-decoration: none; border-radius: 0.5rem; min-height: 44px; }
.nav-list a:hover { text-decoration: underline; }
.nav-list a[aria-current="true"] { text-decoration: underline; font-weight: 600; }

.theme-toggle {
  min-height: 44px; padding: 0.5rem 1rem; font: inherit; font-size: 1rem;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; cursor: pointer;
}

.hero { padding-block: 5rem 3rem; }
.eyebrow { color: var(--muted); font-weight: 600; letter-spacing: 0.02em; margin-bottom: 0.75rem; }
.lead { font-size: 1.25rem; color: var(--muted); }

.button {
  display: inline-block; min-height: 44px; padding: 0.7rem 1.4rem;
  background: var(--accent); color: var(--accent-contrast);
  font-weight: 600; text-decoration: none; border-radius: 999px;
}
.button:hover { filter: brightness(1.08); }

.section { padding-block: 3rem; border-top: 1px solid var(--border); }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card p:last-child { margin-bottom: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.tags li { max-width: 100%; overflow-wrap: anywhere; font-size: 0.9rem; padding: 0.15rem 0.7rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); }

.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.links a { display: inline-block; padding-block: 0.4rem; }

.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; color: var(--muted); font-size: 1rem; }

@media (prefers-reduced-motion: no-preference) {
  .button, .theme-toggle, .nav-list a { transition: background-color 150ms, filter 150ms; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Parcours */
.timeline { list-style: none; margin: 0 0 3rem; padding: 0 0 0 1.5rem; border-left: 2px solid var(--border); display: grid; gap: 2rem; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.5rem - 7px); top: 0.55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline h3 { margin-bottom: 0.4rem; }
.timeline p { margin-bottom: 0; }
.timeline .when { color: var(--muted); font-weight: 600; margin-bottom: 0.25rem; }
.where { font-weight: 400; color: var(--muted); }
.grid-info ul { margin: 0; padding-left: 1.2rem; }
.grid-info li { margin-bottom: 0.4rem; }
.card .links { margin-top: 1rem; }
.note { color: var(--muted); font-size: 1rem; margin-top: 1.5rem; }

.tags-big { margin-top: 0.5rem; }
.tags-big li { font-size: 1rem; padding: 0.35rem 1rem; color: var(--text); }

/* Hobbies : cartes photo. Illustrations provisoires dans img/hobby-*.svg ; pour mettre une photo, changer le src
   (ex. img/tennis.webp, 1200 px de large) et remplacer alt="" par une description utile de la photo. */
.hobbies { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.hobby { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; background: #1f2937; isolation: isolate; }
.hobby-media { display: block; width: 100%; height: 100%; object-fit: cover; }
.hobby::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.72) 40%, transparent 78%); pointer-events: none; }
.hobby-text { position: absolute; z-index: 2; left: 1rem; right: 1rem; bottom: 0.9rem; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
.hobby h3 { margin: 0; font-size: 1.25rem; }
.hobby p { margin: 0.2rem 0 0; font-size: 0.95rem; line-height: 1.3; max-width: none; }
@media (min-width: 700px) {
  .hobbies { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .hobby { aspect-ratio: 4 / 3; }
  .hobby-voyage { grid-column: span 3; aspect-ratio: 21 / 9; }
}
@media (prefers-reduced-motion: no-preference) {
  .hobby-media { transition: transform 400ms ease; }
  .hobby:hover .hobby-media { transform: scale(1.05); }
}
