/* Page personnelle — Takéo Takahashi
   Mise en page : bandeau (écoulement autour d'un solide), puis colonne principale + colonne latérale.
   Polices système uniquement : aucun appel à un service extérieur. */

:root {
  --paper: #f4f6f8;
  --surface: #ffffff;
  --ink: #17202b;
  --muted: #586473;
  --rule: #d8dee6;
  --accent: #0d6773;
  --accent-soft: #e0eef0;
  --flow: rgba(13, 103, 115, 0.30);
  --tracer: rgba(13, 103, 115, 0.85);
  --body-fill: #17202b;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.55rem;
  --step-3: clamp(2.1rem, 1.4rem + 3vw, 3.3rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1218;
    --surface: #131a23;
    --ink: #e3e8ee;
    --muted: #97a3b1;
    --rule: #233041;
    --accent: #6ac3cd;
    --accent-soft: #11303a;
    --flow: rgba(106, 195, 205, 0.26);
    --tracer: rgba(150, 220, 228, 0.9);
    --body-fill: #e3e8ee;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0d1218;
  --surface: #131a23;
  --ink: #e3e8ee;
  --muted: #97a3b1;
  --rule: #233041;
  --accent: #6ac3cd;
  --accent-soft: #11303a;
  --flow: rgba(106, 195, 205, 0.26);
  --tracer: rgba(150, 220, 228, 0.9);
  --body-fill: #e3e8ee;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }

.skip {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--surface); color: var(--ink); padding: 0.5rem 0.75rem; z-index: 20;
}
.skip:focus { top: 1rem; }

/* ---------- Bandeau ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 28%, transparent 62%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: clamp(2.75rem, 6vw, 4.75rem) 24px clamp(2.5rem, 5vw, 4rem);
  display: grid; gap: 0.3rem; justify-items: start;
}
.hero h1 { font-size: var(--step-3); letter-spacing: -0.01em; }
.position { margin: 0.35rem 0 0; font-size: var(--step-1); color: var(--accent); font-weight: 500; }
.affil { margin: 0; color: var(--muted); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 1.75rem; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; padding: 0.85rem 0; color: var(--muted); text-decoration: none;
  font-size: var(--step--1); font-weight: 500; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }

/* ---------- Mise en page ---------- */
.layout {
  max-width: 1100px; margin: 0 auto; padding: 3rem 24px 4rem;
  display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 4rem;
  align-items: start;
}
main { display: grid; gap: 3.5rem; min-width: 0; }
section > h2 { font-size: var(--step-2); margin-bottom: 1.1rem; }
.prose { max-width: 64ch; }
.prose p { margin: 0 0 0.85rem; }
.prose ul { margin: 0 0 0.85rem; padding-left: 1.25rem; display: grid; gap: 0.35rem; }
.prose li::marker { color: var(--accent); }
.year-index {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin: 0 0 1.75rem;
  font-size: var(--step--1); font-variant-numeric: tabular-nums;
}
.year-index a { color: var(--muted); text-decoration: none; }
.year-index a:hover { color: var(--accent); text-decoration: underline; }

/* Publications */
.pubs-year { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.pubs-year:first-of-type { border-top: 0; padding-top: 0; }
.pubs-year h3 {
  font-family: var(--font-body); font-size: var(--step--1); font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; padding-top: 0.2rem;
}
.pubs-year ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pub-title { font-family: var(--font-display); font-size: 1.08rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
a.pub-title:hover { color: var(--accent); text-decoration: underline; }
.pubs-year h3 { position: sticky; top: 3.6rem; align-self: start; }
.pub-meta { margin: 0.2rem 0 0; font-size: 0.92rem; color: var(--muted); }
.pub-meta .venue { font-style: italic; }
/* Colonne latérale */
aside { display: grid; gap: 1.25rem; position: sticky; top: 4.5rem; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.2rem 1.25rem; }
.card h2 { font-family: var(--font-body); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.card address { font-style: normal; line-height: 1.55; font-size: 0.95rem; }
.card dl { margin: 0.9rem 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.35rem 0.75rem; font-size: 0.95rem; }
.card dt { color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.95rem; }
.links small { display: block; color: var(--muted); font-size: 0.82rem; }

/* Pied de page */
.footer { border-top: 1px solid var(--rule); }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 1.5rem 24px 2.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--muted); font-size: var(--step--1);
}
.footer a { color: var(--muted); }

/* ---------- Petits écrans ---------- */
@media (max-width: 880px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  aside { position: static; }
}
@media (max-width: 560px) {
  .hero::after { background: linear-gradient(90deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 70%, transparent) 100%); }
  .pubs-year { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .pubs-year h3 { position: static; }
}

/* ---------- Page projet (ANR COINS) ---------- */
.eyebrow {
  margin: 0; font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.acronym { font-weight: 400; }
.acronym b { font-weight: 700; color: var(--accent); }
.nav .home { color: var(--ink); font-weight: 600; }
main.single { max-width: 1100px; margin: 0 auto; padding: 3rem 24px 4rem; display: grid; gap: 3.5rem; }
main.single > section { max-width: 820px; }
.facts {
  margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
}
.facts div { background: var(--surface); padding: 0.85rem 1rem; }
.facts dt { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0.2rem 0 0; }
.sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.site { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.1rem 1.25rem; }
.site h3 { font-size: var(--step-1); }
.site .inst { margin: 0.15rem 0 0.75rem; color: var(--muted); font-size: 0.92rem; }
.members { list-style: none; margin: 0; padding: 0; display: grid; }
.tag {
  margin-left: 0.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 0.08rem 0.45rem; border-radius: 4px; vertical-align: 0.1em;
}
.members li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.1rem 0.75rem; padding: 0.35rem 0; border-top: 1px solid var(--rule); }
.members li:first-child { border-top: 0; padding-top: 0; }
.members .pos { color: var(--muted); font-size: 0.9rem; }
.facts .ref { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: 0.01em; }
.members .who a { color: var(--ink); text-decoration-color: var(--rule); }
.members .who a:hover { color: var(--accent); text-decoration-color: currentColor; }
