/* ─────────────────────────────────────────────
   Anna Preto — deblending scrollytelling
   ───────────────────────────────────────────── */

:root {
  --bg: #030509;
  --ink: #fbfcfe;
  --ink-dim: #e4e9f0;
  --ink-faint: #cbd3df;
  --accent: #9bc8ff;
  --accent-rgb: 155, 200, 255;
  --violet: #c6b3ff;
  --mint: #93e2bf;
  --rose: #f2a9c0;
  --blue: #b4c9f0;
  --hairline: rgba(174, 194, 228, 0.23);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;   /* évite le décalage quand une page détail masque le scroll */
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(var(--accent-rgb), 0.3); color: #fff; }

/* ── scène ── */

.scroll-track { height: 620vh; pointer-events: none; }

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

body.admin-preview .scroll-track,
body.admin-preview #scene,
body.admin-preview .beats,
body.admin-preview .scroll-hint { display: none; }
body.admin-preview .content { padding-top: 92px; }
body.admin-preview .reveal { opacity: 1; transform: none; }

/* ── header : marque à gauche, barre de sections centrée ── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  padding: 22px 40px;
  pointer-events: none;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  pointer-events: auto;
  opacity: 0;                 /* prend le relais du grand titre du hero */
  transition: color 0.4s;
}
.brand:hover { color: #fff; }

.site-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(152, 161, 178, 0.14);
  border-radius: 999px;
  background: rgba(3, 7, 17, 0.9);
  pointer-events: auto;
  transition: border-color 0.45s ease, background 0.45s ease, box-shadow 0.45s ease;
}

/* barre « énergisée » une fois arrivé dans le contenu */
.site-nav[data-energized="true"] {
  border-color: rgba(141, 190, 255, 0.48);
  background: rgba(7, 12, 26, 0.95);
  box-shadow:
    0 0 34px rgba(141, 190, 255, 0.2),
    0 -10px 28px rgba(141, 190, 255, 0.18),
    inset 0 0 18px rgba(141, 190, 255, 0.08);
}

.site-nav a {
  display: inline-block;
  padding: 8px 16px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(239, 243, 248, 0.92);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, text-shadow 0.2s ease;
}
.site-nav a:hover { color: #eef2f8; }

.site-nav a[aria-current="true"] {
  color: var(--ink);
  background: rgba(141, 190, 255, 0.08);
}
.site-nav[data-energized="true"] a[aria-current="true"] {
  color: #f4f6fb;
  background: rgba(141, 190, 255, 0.14);
  text-shadow: 0 0 14px rgba(141, 190, 255, 0.45);
}

.site-nav .nav-cv {
  color: var(--ink);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  font-weight: 500;
  margin-left: 6px;
  transition: color 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.site-nav .nav-cv:hover {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.86);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.2);
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(174, 194, 228, 0.3);
  border-radius: 50%;
  background: rgba(3, 7, 17, 0.92);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1;
  pointer-events: auto;
  cursor: pointer;
}
.nav-toggle:hover,
.nav-toggle:focus-visible { border-color: rgba(var(--accent-rgb), 0.76); }

/* ── récit du hero ── */

.beats { pointer-events: none; }

.beat {
  position: fixed;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

/* voile diffus : le texte reste lisible même par-dessus une galaxie du fond */
.beat::before {
  content: "";
  position: absolute;
  inset: -60px -80px;
  z-index: -1;
  background: radial-gradient(ellipse at center,
    rgba(3, 6, 12, 0.86) 0%,
    rgba(3, 6, 12, 0.66) 42%,
    rgba(3, 6, 12, 0) 76%);
}

.beat-kicker,
.beat-tag {
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 20px;
}

.beat-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 4.6vw, 68px);
  letter-spacing: 0.02em;
  color: #f2f5fa;
  line-height: 1.05;
  margin-bottom: 14px;
}

.beat-role {
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 26px;
}

.beat-line {
  font-weight: 400;
  font-size: 17.5px;
  line-height: 1.78;
  color: var(--ink);
  max-width: 34ch;
}
.company-link {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb), 0.6);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}
.company-link:hover,
.company-link:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
}
.beat .company-link { pointer-events: auto; }

.beat-a { right: 4.5vw; top: 50%; transform: translateY(-50%); max-width: 27vw; }
.beat-c { left: 5vw; top: 50%; transform: translateY(-50%); max-width: 28vw; }

/* ── indice de scroll ── */

.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.6s;
}
.scroll-hint span {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.scroll-hint i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, rgba(163, 178, 205, 0.6), transparent);
}

/* ── contenu ── */

/* voile translucide : le champ de galaxies reste visible et interactif derrière */
.content {
  position: relative;
  z-index: 10;
  background: linear-gradient(to bottom,
    rgba(3, 5, 9, 0.82) 0px,
    rgba(3, 5, 9, 0.96) 240px);
  padding: 180px 0 0;
}

.section {
  max-width: 980px;
  margin: 0 auto;
  padding: 110px 46px;
  scroll-margin-top: 96px;
}

/* apparition au scroll */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 64px;
}
.section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
  transform: translateY(-4px);
}
.section h2 .index {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

/* intro */

.intro { padding-top: 40px; padding-bottom: 80px; }

.kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 26px;
}

.section h2.intro-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 56px);
  color: #eef2f8;
  margin-bottom: 28px;
  display: block;
  letter-spacing: normal;
  text-transform: none;
}
.section h2.intro-title::after { content: none; display: none; }

.lede {
  font-size: 18.5px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ink);
  max-width: 680px;
}
.interest-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 42px;
}
.interest-tags li {
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #f6f8fb;
  border: 1px solid rgba(141, 190, 255, 0.5);
  background: rgba(141, 190, 255, 0.14);
  border-radius: 999px;
  padding: 8px 16px 7px;
}
/* deux teintes alternées pour que la ligne de pastilles respire */
.interest-tags li:nth-child(3n + 2) {
  color: #f6f8fb;
  border-color: rgba(147, 226, 191, 0.5);
  background: rgba(147, 226, 191, 0.13);
}
.interest-tags li:nth-child(3n) {
  color: #f6f8fb;
  border-color: rgba(178, 158, 240, 0.5);
  background: rgba(178, 158, 240, 0.14);
}

/* parcours */

.subhead {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 58px 0 34px;
}
.subhead:first-of-type { margin-top: 0; }

.timeline {
  list-style: none;
  border-left: 1px solid var(--hairline);
  margin-left: 4px;
}

.timeline li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 34px;
  padding: 0 0 46px 38px;
  position: relative;
}
.timeline li:last-child { padding-bottom: 8px; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #05080f;
  border: 1px solid rgba(var(--accent-rgb), 0.75);
}

.timeline .when {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-top: 3px;
}

.timeline h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  color: #e6ecf5;
  margin-bottom: 10px;
}

.timeline p {
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink-dim);
  max-width: 560px;
}

/* recherche */

.research {
  display: block;
}
.research + .research {
  margin-top: 72px;
  padding-top: 64px;
  border-top: 1px solid var(--hairline);
}
.research-kicker {
  margin-bottom: 14px !important;
  color: var(--mint) !important;
  font-size: 10.5px !important;
  font-weight: 500;
  letter-spacing: 0.2em;
  line-height: 1.5 !important;
  text-transform: uppercase;
}
.research-main {
  display: block;
  text-decoration: none;
  color: inherit;
}
.research .more {
  margin-left: auto;
  color: var(--ink);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.55);
  font-weight: 500;
  transition: color 0.3s, border-color 0.3s;
}
.research-main:hover .more { color: #fff; border-color: rgba(var(--accent-rgb), 0.9); }
.research-main:hover h3 { color: #fff; }
.research h3 { transition: color 0.35s; }

.research h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  color: #edf1f7;
  margin-bottom: 30px;
}

.research p {
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--ink);
  max-width: 700px;
  margin-bottom: 22px;
}
.research em { font-style: italic; color: var(--ink); }

.research .status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 400;
  margin-top: 36px;
}
.research .status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(147, 226, 191, 0.58);
}
.research .status a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.55);
  transition: border-color 0.3s, color 0.3s;
}
.research .status a:hover { color: #fff; border-color: rgba(var(--accent-rgb), 0.9); }

.paper-resources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.paper-resources-label {
  flex: 1 1 150px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.paper-resources a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  border-radius: 3px;
  color: var(--ink);
  background: rgba(12, 20, 34, 0.64);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

/* enseignement */

.teaching-feature {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(400px, 1.1fr);
  gap: 52px;
  align-items: center;
  padding: 38px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.teaching-date {
  margin-bottom: 16px;
  color: var(--mint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.teaching-copy h3 {
  margin-bottom: 20px;
  color: #edf1f7;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
  line-height: 1.2;
}
.teaching-copy > p:not(.teaching-date) {
  color: var(--ink-dim);
  font-size: 15.5px;
  line-height: 1.78;
}
.teaching-facts {
  display: grid;
  gap: 0;
  margin: 28px 0;
  border-top: 1px solid var(--hairline);
}
.teaching-facts div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
}
.teaching-facts dt {
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.teaching-facts dd {
  color: var(--ink);
  font-size: 13px;
}
.teaching-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}
.teaching-link span {
  color: var(--accent);
  transition: transform 0.25s ease;
}
.teaching-link:hover span,
.teaching-link:focus-visible span { transform: translate(3px, -3px); }
.teaching-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: #05080f;
}
.teaching-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.paper-resources a:hover,
.paper-resources a:focus-visible {
  background: rgba(var(--accent-rgb), 0.13);
  border-color: rgba(var(--accent-rgb), 0.72);
  transform: translateY(-2px);
}

/* projets */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  --tag-rgb: 155, 200, 255;
  position: relative;
  min-height: 310px;
  overflow: hidden;
  background: rgba(6, 10, 19, 0.9);
  border: 1px solid rgba(174, 194, 228, 0.2);
  padding: 38px 52px 34px 34px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}
.card--ml { --tag-rgb: 112, 191, 255; }
.card--physics { --tag-rgb: 237, 145, 199; }
.card--misc { --tag-rgb: 113, 216, 170; }
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgb(var(--tag-rgb));
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}
.card::after {
  content: "↗";
  position: absolute;
  top: 30px;
  right: 28px;
  color: rgba(var(--tag-rgb), 0.8);
  font-size: 18px;
  line-height: 1;
  opacity: 0.72;
  transform: translate(-3px, 3px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.card:hover,
.card:focus-visible {
  background: rgba(10, 16, 28, 0.96);
  border-color: rgba(var(--tag-rgb), 0.52);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}
.card:hover::before,
.card:focus-visible::before { transform: scaleX(1); }
.card:hover::after,
.card:focus-visible::after { opacity: 1; transform: none; }

.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  color: #e6ecf5;
  transition: color 0.35s;
}
.card:hover h3 { color: #fff; }

.card p {
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink-dim);
  flex: 1;
}

.card .tag {
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f6f8fb;
  border: 1px solid rgba(var(--tag-rgb), 0.5);
  background: rgba(var(--tag-rgb), 0.14);
  border-radius: 999px;
  padding: 6px 13px 5px;
}

/* intérêts */

.interests {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}

.interest {
  --interest-rgb: 116, 203, 235;
  position: relative;
  min-height: 230px;
  text-decoration: none;
  border-top: 2px solid rgba(var(--interest-rgb), 0.62);
  padding: 26px 58px 30px 28px;
  background: linear-gradient(145deg, rgba(var(--interest-rgb), 0.1), rgba(7, 11, 20, 0.62) 48%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease, border-color 0.3s ease;
}
.interest--photo { --interest-rgb: 100, 204, 234; }
.interest--theatre { --interest-rgb: 241, 145, 173; }
.interest--arts { --interest-rgb: 180, 157, 247; }
.interest--poetry { --interest-rgb: 116, 211, 164; }
.interest:hover,
.interest:focus-visible {
  border-top-color: rgb(var(--interest-rgb));
  background: linear-gradient(145deg, rgba(var(--interest-rgb), 0.17), rgba(9, 14, 25, 0.76) 52%);
  transform: translateY(-3px);
}

.interest-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  color: rgb(var(--interest-rgb));
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.interest-label span {
  color: #fff;
  opacity: 0.82;
}
.interest-arrow {
  position: absolute;
  top: 24px;
  right: 28px;
  color: rgb(var(--interest-rgb));
  font-size: 17px;
  line-height: 1;
  transition: transform 0.28s ease;
}
.interest:hover .interest-arrow,
.interest:focus-visible .interest-arrow { transform: translate(3px, -3px); }

.interest h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: #e6ecf5;
  margin-bottom: 14px;
  transition: color 0.35s;
}
.interest:hover h3 { color: #fff; }

.interest p {
  font-size: 15px;
  line-height: 1.78;
  color: var(--ink-dim);
}

/* contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(420px, 1.2fr);
  gap: 72px;
  align-items: start;
  padding: 34px 0 10px;
}
.contact-kicker {
  margin-bottom: 16px;
  color: var(--mint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.contact-copy {
  max-width: 390px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.28;
}
.contact-actions {
  border-top: 1px solid var(--hairline);
}
.contact-action {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 20px;
  gap: 18px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.28s ease, border-color 0.28s ease;
}
.contact-action:hover,
.contact-action:focus-visible {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.52);
}
.contact-action-label {
  color: var(--ink-dim);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.contact-action-value {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 400;
}
.email-at {
  color: var(--mint);
  font-size: 0.88em;
  font-weight: 500;
}
.contact-action-arrow {
  color: var(--accent);
  font-size: 17px;
  line-height: 1;
  transition: transform 0.28s ease;
}
.contact-action:hover .contact-action-arrow,
.contact-action:focus-visible .contact-action-arrow { transform: translate(3px, -3px); }

/* ── pages détail (superposition, routées par le hash) ── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 7, 14, 0.965);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.overlay[hidden] { display: none; }
.overlay.open { opacity: 1; }

/* là où c'est possible, on garde le champ de galaxies visible mais flouté */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .overlay {
    background: rgba(4, 7, 14, 0.84);
    -webkit-backdrop-filter: blur(18px) saturate(0.9);
    backdrop-filter: blur(18px) saturate(0.9);
  }
}

/* le hero et la navigation s'effacent : la page détail est son propre contexte */
.site-header,
.scroll-hint,
.beat { transition: opacity 0.4s ease; }

body.detail-open .site-header,
body.detail-open .scroll-hint,
body.detail-open .beats {
  opacity: 0;
  pointer-events: none;
}

.overlay-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 132px 46px 120px;
}

.overlay-close {
  position: absolute;
  top: 26px;
  left: 40px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 8px;
  border: 1px solid rgba(152, 161, 178, 0.22);
  border-radius: 999px;
  background: rgba(6, 10, 20, 0.85);
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.overlay-close:hover { color: #eef2f8; border-color: rgba(141, 190, 255, 0.5); }

.detail {
  max-width: 720px;
  margin: 0 auto;
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 0.6s 0.06s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s 0.06s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail--wide { max-width: 920px; }
.detail--wide > .detail-kicker,
.detail--wide > .detail-title,
.detail--wide > .detail-meta,
.detail--wide > .detail-links,
.detail--wide .detail-body > p,
.detail--wide .detail-body > h3 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.detail[hidden] { display: none; }
.overlay.open .detail { opacity: 1; transform: none; }

.detail-kicker {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 22px;
}

.detail-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  color: #eef2f8;
  margin-bottom: 26px;
}

.detail-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding-bottom: 34px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--hairline);
}
.detail-meta li {
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #f6f8fb;
  border: 1px solid rgba(147, 226, 191, 0.48);
  background: rgba(147, 226, 191, 0.13);
  border-radius: 999px;
  padding: 7px 15px 6px;
}
.detail-meta li:nth-child(2n) {
  color: #f6f8fb;
  border-color: rgba(141, 190, 255, 0.5);
  background: rgba(141, 190, 255, 0.14);
}

.detail-lede {
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  line-height: 1.6;
  color: #dbe3f0;
  margin-bottom: 40px;
}
.detail-authors {
  color: var(--ink-dim) !important;
  font-size: 13px !important;
  letter-spacing: 0.04em;
  line-height: 1.7 !important;
}

.detail-body h3 {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 44px 0 18px;
}

.detail-body p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 20px;
}
.detail-body em { font-style: italic; color: var(--ink); }

.detail-list {
  list-style: none;
  margin-bottom: 20px;
}
.detail-list li {
  position: relative;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  padding-left: 24px;
  margin-bottom: 12px;
}
.detail-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.88);
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 38px 0 12px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: #05080f;
}
.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.outreach-dates {
  list-style: none;
  margin-top: 38px;
  border-top: 1px solid var(--hairline);
}
.outreach-dates li {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 8px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}
.outreach-dates time {
  grid-row: 1 / 3;
  color: var(--mint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.outreach-dates span {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}
.outreach-dates p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.5;
}

/* figures, galeries et citations dans les pages détail */

.detail-figure {
  margin: 40px 0;
}
.detail-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--hairline);
  background: #05080f;
}
.detail-figure figcaption {
  margin-top: 14px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--ink-dim);
}
.detail-figure figcaption strong {
  color: var(--ink);
  font-weight: 500;
}

.paper-results {
  scroll-margin-top: 36px;
  margin: 72px 0 52px;
  padding-top: 4px;
}
.paper-results > h3 {
  max-width: 720px;
  margin: 0 auto 26px;
}
.research-figure {
  margin: 0 0 58px;
}
.research-figure img {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: #fff;
}
.research-figure figcaption {
  max-width: 760px;
  margin: 16px auto 0;
  font-size: 14px;
  line-height: 1.72;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 34px 0 40px;
}
.detail-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--hairline);
  background: #05080f;
  filter: saturate(0.94) brightness(0.94);
  transition: filter 0.5s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.detail-gallery img:hover {
  filter: none;
  transform: scale(1.015);
}
.photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: #05080f;
  cursor: zoom-in;
}
.photo-thumb img {
  height: 100%;
  border: 0;
  border-radius: 0;
}
.photo-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* captures d'écran de téléphone : format vertical, pas de recadrage */
.detail-gallery.phone {
  grid-template-columns: repeat(auto-fill, minmax(190px, 220px));
}
.detail-gallery.phone img {
  aspect-ratio: auto;
  object-fit: contain;
}

.detail-poem {
  margin: 8px 0 44px;
  padding-left: 26px;
  border-left: 1px solid rgba(198, 179, 255, 0.52);
}
.detail-poem p {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.85;
  color: #dde5f2;
  margin-bottom: 0;
}

/* titres de poèmes : plus proches du texte que les titres de section */
.detail-body h3 + .detail-poem { margin-top: 4px; }

.detail-links {
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.detail-links a {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid rgba(var(--accent-rgb), 0.46);
  border-radius: 999px;
  padding: 11px 22px 10px;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.detail-links a:hover {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.82);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.18);
}

html.detail-open, body.detail-open,
html.lightbox-open, body.lightbox-open { overflow: hidden; }

/* photographie plein écran */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 18px;
  padding: 34px;
  background: rgba(1, 3, 7, 0.97);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lightbox-figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 14px;
  min-width: 0;
  height: calc(100vh - 68px);
}
.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 112px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lightbox-figure figcaption {
  color: var(--ink-dim);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(174, 194, 228, 0.32);
  border-radius: 50%;
  background: rgba(7, 11, 20, 0.72);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.84);
  background: rgba(var(--accent-rgb), 0.12);
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  font-size: 25px;
}
.lightbox-nav { justify-self: center; }

@media (prefers-reduced-motion: reduce) {
  .overlay, .detail, .lightbox { transition: none; }
}

@media (max-width: 900px) {
  .overlay-scroll { padding: 110px 24px 90px; }
  .overlay-close { top: 18px; left: 20px; }
  .detail-lede { font-size: 20px; }
  .lightbox {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 58px 8px 14px;
  }
  .lightbox-figure { height: calc(100vh - 72px); }
  .lightbox-close { top: 10px; right: 12px; }
  .lightbox-close,
  .lightbox-nav { width: 40px; height: 40px; }
}

/* footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 60px;
  padding: 40px 46px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.site-footer .foot-sep { width: 24px; height: 1px; background: var(--hairline); }

/* ── responsive ── */

@media (max-width: 1100px) {
  .beat-a { max-width: 38vw; }
  .beat-c { max-width: 34vw; }
  .site-header { padding: 16px 20px; }
  .brand { font-size: 16px; letter-spacing: 0.24em; }
  .nav-toggle { display: grid; margin-left: auto; }
  .site-nav {
    position: fixed;
    top: 68px;
    left: auto;
    right: 20px;
    width: min(370px, calc(100vw - 40px));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 8px;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease,
                border-color 0.3s ease, background 0.3s ease;
  }
  .site-header.menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  .site-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 3px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }
  .site-nav .nav-cv {
    grid-column: 1 / -1;
    justify-content: center;
    margin: 3px 0 0;
  }
}

@media (max-width: 900px) {
  .section { padding: 80px 26px; }
  .section h2 { margin-bottom: 48px; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; }
  .paper-resources-label { flex-basis: 100%; }
  .paper-resources a { flex: 1 1 140px; }
  .teaching-feature {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .beat-a, .beat-c {
    left: 6vw; right: 6vw; max-width: none;
    top: auto; bottom: 12vh; transform: none;
  }
}

@media (max-width: 640px) {
  .scroll-track { height: 460vh; }
  .site-header { padding: 12px 14px; }
  .brand { max-width: 190px; font-size: 14px; }
  .nav-toggle { width: 40px; height: 40px; }
  .site-nav { top: 60px; left: 14px; right: 14px; width: auto; }
  .section { padding: 68px 20px; }
  .section h2 {
    gap: 12px;
    margin-bottom: 42px;
    font-size: 13px;
    letter-spacing: 0.24em;
  }
  .intro { padding-top: 28px; }
  .lede { font-size: 17px; line-height: 1.72; }
  .timeline { margin-left: 2px; }
  .timeline li { padding-left: 24px; padding-bottom: 38px; }
  .research + .research { margin-top: 54px; padding-top: 50px; }
  .research h3 { font-size: 26px; margin-bottom: 22px; }
  .research p { font-size: 15.5px; line-height: 1.78; }
  .research .status {
    align-items: flex-start;
    flex-wrap: wrap;
    letter-spacing: 0.13em;
    line-height: 1.6;
  }
  .research .more { width: 100%; margin: 6px 0 0 16px; }
  .paper-resources { align-items: stretch; }
  .paper-resources-label { margin-bottom: 4px; }
  .paper-resources a { flex-basis: 100%; width: 100%; }
  .cards,
  .interests { grid-template-columns: 1fr; }
  .card { min-height: 0; padding: 32px 48px 30px 26px; }
  .interest { min-height: 0; }
  .teaching-feature { padding: 30px 0; }
  .teaching-copy h3 { font-size: 25px; }
  .teaching-preview { aspect-ratio: 4 / 3; }
  .contact-copy { font-size: 26px; }
  .contact-action {
    grid-template-columns: 1fr 20px;
    gap: 8px 14px;
    padding: 18px 0;
  }
  .contact-action-label { grid-column: 1 / -1; }
  .contact-action-arrow { grid-column: 2; grid-row: 2; }
  .overlay-scroll { padding: 92px 18px 72px; }
  .overlay-close { top: 14px; left: 14px; }
  .detail-title { font-size: 30px; overflow-wrap: anywhere; }
  .detail-meta { gap: 7px; margin-bottom: 32px; padding-bottom: 28px; }
  .detail-meta li { padding: 6px 11px 5px; font-size: 10px; }
  .detail-body p,
  .detail-list li { font-size: 15.5px; line-height: 1.78; }
  .detail-figure { margin: 30px 0; }
  .research-figure { margin-bottom: 44px; }
  .outreach-dates li { grid-template-columns: 1fr; }
  .outreach-dates time { grid-row: auto; }
  .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .detail-links { gap: 10px; }
  .detail-links a { width: 100%; text-align: center; }
  .lightbox {
    grid-template-columns: 1fr 1fr;
    align-content: center;
    padding: 56px 14px 18px;
  }
  .lightbox-figure {
    grid-column: 1 / -1;
    grid-row: 1;
    height: auto;
  }
  .lightbox-figure img { max-height: calc(100vh - 150px); }
  .lightbox-prev { grid-column: 1; grid-row: 2; }
  .lightbox-next { grid-column: 2; grid-row: 2; }
  .site-footer {
    flex-direction: column;
    gap: 12px;
    padding-inline: 20px;
    text-align: center;
    line-height: 1.6;
  }
  .site-footer .foot-sep { display: none; }
}
