/* =========================================================
   CHRONIQUES D’AILLEURS - V11
   Une interface éditoriale chaude, lisible et immersive.
   ========================================================= */

:root {
  --bg: #f4efe6;
  --bg-2: #eee6da;
  --surface: rgba(255, 252, 247, 0.78);
  --surface-solid: #fffaf3;
  --text: #24201c;
  --text-soft: #6f665d;
  --text-faint: #9b9187;
  --line: rgba(36, 32, 28, 0.14);
  --line-strong: rgba(36, 32, 28, 0.24);
  --accent: #9f3f2b;
  --accent-2: #c67451;
  --accent-soft: #ecd8cc;
  --shadow: 0 24px 80px rgba(61, 45, 32, 0.10);
  --shadow-soft: 0 14px 40px rgba(61, 45, 32, 0.07);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shell: min(1180px, calc(100vw - 44px));
  --reading: 720px;
  --reading-size: 1.12rem;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 14px;
}

html[data-theme="dark"] {
  --bg: #161412;
  --bg-2: #1c1815;
  --surface: rgba(31, 27, 23, 0.82);
  --surface-solid: #211d19;
  --text: #f1e9de;
  --text-soft: #b9afa4;
  --text-faint: #8c837a;
  --line: rgba(241, 233, 222, 0.13);
  --line-strong: rgba(241, 233, 222, 0.22);
  --accent: #e18f73;
  --accent-2: #f0b28f;
  --accent-soft: #472f27;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.20);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 3%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 27rem),
    radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 30rem),
    linear-gradient(180deg, var(--bg), var(--bg-2) 68%, var(--bg));
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: color 180ms ease, background 180ms ease;
}

body::selection { background: var(--accent-soft); }

.page-noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.1'/%3E%3C/svg%3E");
}

button,
input,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

img { max-width: 100%; display: block; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
  transform: translateY(-170%);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(20px) saturate(120%);
  transition: border-color 160ms ease, background 160ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.brand-copy strong {
  display: block;
  font: 600 1.04rem/1.08 var(--serif);
  letter-spacing: -0.015em;
}
.brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: .68rem;
  letter-spacing: .04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 23px;
  color: var(--text-soft);
  font-size: .82rem;
}

.main-nav a {
  position: relative;
  text-decoration: none;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transition: right 180ms ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { right: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-solid);
}

.menu-toggle { display: none; }

.mobile-nav {
  width: var(--shell);
  margin: 0 auto 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}
.mobile-nav a {
  display: block;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 650;
}
.mobile-nav a:hover { background: var(--accent-soft); }

/* Generic typography */

.eyebrow,
.section-kicker,
.work-kicker,
.cv-label,
.series-label {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 44px;
}

.section-heading h2,
.mini-heading h2,
.archives-inner h2,
.author-copy h2,
.related-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.6vw, 4.8rem);
  line-height: .98;
  font-weight: 500;
  letter-spacing: -.045em;
}

.section-lede,
.section-aside {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.65;
}

.section-aside { margin: 0; }

.prose {
  font-family: var(--serif);
  font-size: var(--reading-size);
  line-height: 1.88;
}
.prose p { margin: 0 0 1.35em; }
.prose blockquote {
  margin: 2.1em 0;
  padding: .1em 0 .1em 24px;
  border-left: 2px solid var(--accent);
  color: var(--text-soft);
  font-style: italic;
}

/* Hero */

.hero {
  min-height: min(790px, calc(100vh - 78px));
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(42px, 7vw, 92px);
  padding-block: 84px 92px;
}

.hero-copy-wrap { max-width: 760px; }

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.3rem, 9.2vw, 8.6rem);
  font-weight: 500;
  line-height: .78;
  letter-spacing: -.075em;
}

.hero h1 em {
  font-weight: 400;
  color: var(--accent);
}

.hero-copy {
  max-width: 650px;
  margin: 32px 0 0;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.button-primary:hover { transform: translateY(-1px); }
.button-ghost:hover { border-color: var(--text); background: var(--surface-solid); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 52px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-stats div { min-width: 120px; }
.hero-stats strong {
  display: block;
  font: 500 1.75rem/1 var(--serif);
}
.hero-stats span {
  display: block;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero-art {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hero-art::before {
  content: "";
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero-portrait {
  position: relative;
  width: min(390px, 82%);
  margin: 0;
  border-radius: 44% 56% 48% 52% / 37% 41% 59% 63%;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}
.hero-portrait img {
  width: 100%;
  aspect-ratio: 0.76;
  object-fit: cover;
  object-position: center 28%;
  filter: contrast(1.03);
}

.hero-quote {
  position: absolute;
  top: 118px;
  right: -118px;
  bottom: auto;
  width: 272px;
  margin: 0;
  padding: 22px 24px;
  border: 1.25px solid color-mix(in srgb, var(--text) 20%, var(--line));
  border-radius: 32px;
  background: color-mix(in srgb, var(--surface-solid) 99%, transparent);
  box-shadow: 0 20px 48px rgba(36, 24, 12, .10);
  backdrop-filter: blur(14px);
  font: italic .98rem/1.62 var(--serif);
  text-align: left;
  z-index: 5;
  transform: none;
}
.hero-quote::before {
  content: none;
}
.hero-quote::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 42%, transparent);
  border-radius: 24px;
  pointer-events: none;
}
.hero-quote span {
  position: relative;
  z-index: 1;
  display: block;
}

.hero-thought-trail {
  position: absolute;
  top: 248px;
  right: 86px;
  width: 168px;
  height: 116px;
  z-index: 6;
  pointer-events: none;
}
.thought-dot {
  position: absolute;
  display: block;
  border: 1.25px solid color-mix(in srgb, var(--text) 22%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-solid) 99%, transparent);
  box-shadow: 0 9px 20px rgba(36, 24, 12, .08);
}
.thought-dot-1 {
  left: 8px;
  bottom: 6px;
  width: 11px;
  height: 11px;
}
.thought-dot-2 {
  left: 44px;
  bottom: 28px;
  width: 18px;
  height: 18px;
}
.thought-dot-3 {
  left: 92px;
  bottom: 62px;
  width: 28px;
  height: 28px;
}

@media (min-width: 821px) {
  .hero-portrait {
    transform: translate(-46px, 38px) rotate(-1.5deg);
  }
}

/* Featured */

.featured-section {
  padding-block: 92px;
  border-top: 1px solid var(--line);
}

.mini-heading { margin-bottom: 32px; }

.featured-grid {
  display: grid;
  grid-template-columns: 1.35fr .825fr .825fr;
  gap: 14px;
}

.featured-card {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}
.featured-card:first-child { min-height: 520px; }

.featured-card a {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  text-decoration: none;
}
.featured-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.2,.8,.2,1);
}
.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(15, 12, 10, .82) 100%);
  pointer-events: none;
}
.featured-card:hover img { transform: scale(1.035); }
.featured-card-copy {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 3vw, 36px);
  color: #fff;
}
.featured-card-copy .post-meta { color: rgba(255,255,255,.72); }
.featured-card-copy .post-category { color: #fff2e9; }
.featured-card h3 {
  margin: 8px 0 0;
  max-width: 630px;
  font: 500 clamp(2rem, 4vw, 4.1rem)/.98 var(--serif);
  letter-spacing: -.04em;
}

/* Library */

.publications-section {
  padding-block: 110px;
  border-top: 1px solid var(--line);
}

.text-heading { align-items: flex-start; }

.library-controls {
  position: sticky;
  top: 89px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px color-mix(in srgb, var(--text) 6%, transparent);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: .73rem;
  cursor: pointer;
}
.filter-chip:hover { color: var(--text); background: var(--surface-solid); }
.filter-chip.is-active {
  background: var(--text);
  color: var(--bg);
}

.archive-search {
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
}
.search-icon { color: var(--text-soft); }
.archive-search input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: .78rem;
}
.archive-search input::placeholder { color: var(--text-faint); }

.library-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 2px 34px;
  color: var(--text-soft);
  font-size: .72rem;
}
.library-meta p { margin: 0; }

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 750;
  font-size: .74rem;
  cursor: pointer;
}

.post-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.index-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  padding: 30px 30px 30px 0;
  border-bottom: 1px solid var(--line);
}

.index-card:nth-child(odd) {
  padding-right: 32px;
  border-right: 1px solid var(--line);
}
.index-card:nth-child(even) { padding-left: 32px; }

.index-figure-link {
  display: block;
  align-self: start;
  text-decoration: none;
}
.index-figure {
  margin: 0;
  width: 100%;
  aspect-ratio: 1.03;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-solid);
}
.index-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease, filter 280ms ease;
}
.index-card:hover .index-image { transform: scale(1.025); }

.index-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.post-category { color: var(--accent); }

.index-title {
  margin: 10px 0 0;
  font: 500 clamp(1.65rem, 2.8vw, 2.6rem)/1.02 var(--serif);
  letter-spacing: -.035em;
}
.index-title a { text-decoration: none; }
.index-title a:hover { color: var(--accent); }

.index-excerpt {
  margin: 14px 0 0;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: .94rem;
  line-height: 1.62;
}

.index-provenance {
  margin: 14px 0 0;
  color: var(--text-faint);
  font-size: .66rem;
  line-height: 1.45;
}
.index-provenance a { text-underline-offset: 3px; }

.index-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 18px;
}

.read-link,
.text-link {
  color: var(--accent);
  font-size: .74rem;
  font-weight: 800;
  text-decoration: none;
}
.read-link:hover,
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.reading-time {
  color: var(--text-faint);
  font-size: .66rem;
}

.empty-state {
  margin: 60px 0 0;
  padding: 42px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--text-soft);
  text-align: center;
}

/* Works */

.works-section {
  padding-block: 110px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid) 34%, transparent);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.work-card {
  grid-column: span 2;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-soft);
}

button.work-card {
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
button.work-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: var(--shadow);
}

.work-card-large { grid-column: span 3; min-height: 330px; }

.work-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.work-kicker { margin-bottom: 26px; }

.work-status {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.work-card h3 {
  margin: auto 0 0;
  font: 500 clamp(2rem, 3.3vw, 3.25rem)/.98 var(--serif);
  letter-spacing: -.045em;
}
.work-card p:not(.work-kicker) {
  margin: 15px 0 0;
  color: var(--text-soft);
  font-size: .82rem;
  line-height: 1.6;
}
.work-read {
  display: inline-block;
  margin-top: 22px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
}
.work-read-muted { color: var(--text-faint); }

.series-banner {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 32px;
  align-items: end;
  margin: 26px 0 2px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 65%, transparent), transparent 62%),
    var(--surface);
}
.series-banner h3 {
  margin: 0;
  max-width: 500px;
  font: 500 clamp(2rem, 3vw, 3rem)/1 var(--serif);
}
.series-banner p:last-child {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.7;
}

/* Author */

.author-section { padding-block: 110px; }

.author-card {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: clamp(44px, 8vw, 110px);
  align-items: center;
  padding: clamp(28px, 5vw, 66px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.author-portrait {
  margin: 0;
  overflow: hidden;
  border-radius: 48% 52% 42% 58% / 45% 38% 62% 55%;
  background: #fff;
}
.author-portrait img {
  width: 100%;
  aspect-ratio: .82;
  object-fit: cover;
  object-position: 50% 24%;
}
.author-copy h2 { margin-bottom: 28px; }
.intro-prose { max-width: 690px; }

/* CV */

.cv-section {
  padding-block: 110px;
  border-top: 1px solid var(--line);
}

.cv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cv-card {
  position: relative;
  min-height: 265px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.cv-number {
  position: absolute;
  top: 10px;
  right: 16px;
  color: color-mix(in srgb, var(--text) 8%, transparent);
  font: 500 5.5rem/1 var(--serif);
}
.cv-card h3 {
  position: relative;
  margin: 0;
  font: 500 1.75rem/1.08 var(--serif);
}
.cv-card p:last-child {
  position: relative;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: .84rem;
}

/* Archives */

.archives-section {
  padding-block: 110px;
  border-top: 1px solid var(--line);
}

.archives-inner {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(36px, 8vw, 110px);
  align-items: start;
}

.archive-links { display: grid; gap: 10px; }
.archive-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
}
.archive-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-solid);
}
.archive-number {
  color: var(--accent);
  font: 500 1.35rem/1 var(--serif);
}
.archive-card strong,
.archive-card small { display: block; }
.archive-card strong { font: 500 1.14rem/1.25 var(--serif); }
.archive-card small { margin-top: 4px; color: var(--text-soft); font-size: .7rem; }

/* Dialog */

.synopsis-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0,0,0,.34);
}
.synopsis-dialog::backdrop {
  background: rgba(19, 15, 12, .55);
  backdrop-filter: blur(8px);
}
.synopsis-dialog-inner {
  position: relative;
  padding: clamp(30px, 6vw, 62px);
  overflow: auto;
}
.synopsis-close {
  position: sticky;
  top: 0;
  float: right;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}
.synopsis-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.synopsis-dialog h2 {
  margin: 0 48px 8px 0;
  font: 500 clamp(2.5rem, 6vw, 4.8rem)/.96 var(--serif);
  letter-spacing: -.045em;
}
.synopsis-meta {
  margin: 14px 0 30px;
  color: var(--text-soft);
  font-size: .8rem;
}
.synopsis-section-title {
  margin: 32px 0 12px;
  font: 600 1.35rem/1.25 var(--serif);
}
.synopsis-separator {
  height: 1px;
  margin: 34px 0;
  background: var(--line);
}

/* Footer */

.site-footer {
  padding-block: 34px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-soft);
  font-size: .72rem;
}
.footer-inner div strong,
.footer-inner div span { display: block; }
.footer-inner div strong { color: var(--text); font-family: var(--serif); font-size: .94rem; }
.footer-inner p { margin: 0; }

/* =========================================================
   ARTICLE
   ========================================================= */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: 3px;
  background: transparent;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.article-page { padding-bottom: 90px; }

.article-shell {
  width: min(1100px, calc(100vw - 44px));
  margin-inline: auto;
  padding-top: 44px;
}

.article-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 70px;
}

.back-link {
  color: var(--text-soft);
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }

.reading-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.reading-tools button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: .68rem;
  cursor: pointer;
}
.reading-tools button:hover,
.reading-tools button[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-solid);
}

.article-header {
  width: min(900px, 100%);
  margin: 0 auto 46px;
  text-align: center;
}

.article-header .post-meta { justify-content: center; }

.article-header h1 {
  margin: 18px auto 0;
  max-width: 880px;
  font: 500 clamp(3.6rem, 8vw, 7.6rem)/.91 var(--serif);
  letter-spacing: -.062em;
}

.article-deck {
  max-width: 680px;
  margin: 24px auto 0;
  color: var(--text-soft);
  font: 400 1.12rem/1.65 var(--serif);
}

.article-figure {
  width: min(980px, 100%);
  margin: 0 auto 64px;
}
.article-figure img {
  width: 100%;
  max-height: 720px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.article-image-credit {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: .66rem;
  text-align: right;
}
.article-image-credit a { text-underline-offset: 3px; }

.article-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, var(--reading));
  gap: 56px;
  justify-content: center;
  align-items: start;
}

.article-rail {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 9px;
}
.rail-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.rail-card span,
.rail-card strong { display: block; }
.rail-card span {
  color: var(--text-faint);
  font-size: .61rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rail-card strong {
  margin-top: 4px;
  font: 600 .75rem/1.35 var(--sans);
}

.article-main { min-width: 0; }

.article-body {
  font-size: var(--reading-size);
}
.article-body p:first-child::first-letter {
  float: left;
  margin: .07em .08em 0 0;
  color: var(--accent);
  font-size: 4.6em;
  line-height: .72;
  font-family: var(--serif);
}
.article-body .poem:first-child::first-letter { float: none; margin: 0; font-size: inherit; color: inherit; }

.poem {
  white-space: pre-wrap;
  font-family: var(--serif);
  font-size: calc(var(--reading-size) + .035rem);
  line-height: 1.96;
}

.article-inline-figure {
  margin: 2.5em 0;
}
.article-inline-figure img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.article-inline-figure figcaption {
  margin-top: 9px;
  color: var(--text-faint);
  font-family: var(--sans);
  font-size: .66rem;
  line-height: 1.5;
}

.article-media-note,
.archive-notice {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: .78rem;
}

.article-signature {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-family: var(--serif);
  font-style: italic;
}

.article-publication-notes {
  margin-top: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.article-publication-notes h2 {
  margin: 0 0 14px;
  font: 600 .74rem/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.publication-note {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: .74rem;
  line-height: 1.55;
}
.publication-note a { color: var(--text); text-underline-offset: 3px; }

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.like-button,
.share-toggle,
.comments-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: .76rem;
  cursor: pointer;
}
.like-button:hover,
.share-toggle:hover,
.comments-toggle:hover { color: var(--text); }
.like-button.is-liked { color: var(--accent); }
.heart { font-size: 1.2rem; }
.like-count,
.comments-count {
  min-width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: .65rem;
}

.share { position: relative; }
.share-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}
.share-menu a,
.share-menu button {
  width: 100%;
  display: block;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font-size: .72rem;
  cursor: pointer;
}
.share-menu a:hover,
.share-menu button:hover { background: var(--accent-soft); }

.comments { margin-top: 18px; }
.comments-toggle { padding: 6px 0; }
.comments-panel {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.comments-list { display: grid; gap: 12px; margin-bottom: 20px; }
.comment { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment strong { display: block; font-size: .76rem; }
.comment p { margin: 4px 0 0; color: var(--text-soft); font: .95rem/1.6 var(--serif); white-space: pre-wrap; }
.comment time { display: block; margin-top: 5px; color: var(--text-faint); font-size: .62rem; }
.empty-comments { color: var(--text-soft); font-size: .76rem; }
.form-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; }
.comment-form label { display: grid; gap: 6px; color: var(--text-soft); font-size: .68rem; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--text);
  resize: vertical;
}
.button-small { min-height: 38px; margin-top: 12px; }
.form-help { margin: 9px 0 0; color: var(--text-faint); font-size: .64rem; }

.related-section {
  margin-top: 100px;
  padding-top: 46px;
  border-top: 1px solid var(--line);
}
.related-heading { margin-bottom: 26px; }
.related-heading h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.related-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}
.related-card a { display: block; text-decoration: none; }
.related-card img { width: 100%; aspect-ratio: 1.4; object-fit: cover; }
.related-card-copy { padding: 18px; }
.related-card-copy span { color: var(--accent); font-size: .63rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.related-card-copy h3 { margin: 8px 0 0; font: 500 1.35rem/1.05 var(--serif); }

.article-pagination {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 56px;
}
.article-pagination a {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
}
.article-pagination a:last-child { text-align: right; }
.article-pagination span { color: var(--text-faint); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.article-pagination strong { margin-top: 7px; font: 500 1.3rem/1.15 var(--serif); }

.not-found { padding-block: 120px; }
.not-found h1 { font: 500 4rem/1 var(--serif); margin: 0 0 18px; }

/* Focus mode */

body.focus-reading .article-site-header,
body.focus-reading .site-footer,
body.focus-reading .article-topbar .back-link,
body.focus-reading .article-rail,
body.focus-reading .related-section,
body.focus-reading .article-pagination {
  opacity: 0;
  pointer-events: none;
}
body.focus-reading .article-site-header { display: none; }
body.focus-reading .article-layout { grid-template-columns: minmax(0, var(--reading)); }
body.focus-reading .article-shell { padding-top: 24px; }

/* Responsive */

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr .72fr; }
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .featured-card:first-child { grid-column: 1 / -1; }
  .post-index { grid-template-columns: 1fr; }
  .index-card,
  .index-card:nth-child(odd),
  .index-card:nth-child(even) {
    padding: 26px 0;
    border-right: 0;
  }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card,
  .work-card-large { grid-column: span 1; }
  .series-banner { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 130px minmax(0, var(--reading)); gap: 34px; }
}

@media (max-width: 820px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .main-nav { display: none; }
  .menu-toggle { display: grid; }
  .header-inner { min-height: 70px; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 76px 72px;
  }
  .hero h1 { font-size: clamp(4.5rem, 16vw, 7.3rem); }
  .hero-art { min-height: 460px; }
  .hero-portrait { width: min(360px, 76vw); }
  .hero-quote {
    top: 70px;
    right: 0;
    bottom: auto;
    width: min(252px, 56vw);
    padding: 20px 22px;
  }
  .library-controls {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }
  .archive-search { min-width: 0; }
  .works-grid { grid-template-columns: 1fr; }
  .work-card,
  .work-card-large { grid-column: auto; min-height: 260px; }
  .author-card { grid-template-columns: 1fr; }
  .author-portrait { max-width: 420px; margin-inline: auto; }
  .cv-grid { grid-template-columns: 1fr; }
  .archives-inner { grid-template-columns: 1fr; }

  .article-shell { width: min(100% - 28px, 1100px); }
  .article-topbar { margin-bottom: 48px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-rail { display: none; }
  .article-header { text-align: left; }
  .article-header .post-meta { justify-content: flex-start; }
  .article-header h1 { margin-left: 0; font-size: clamp(3.5rem, 12vw, 6.4rem); }
  .article-deck { margin-left: 0; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .brand-copy small { display: none; }
  .brand-avatar { width: 38px; height: 38px; }
  .hero h1 { font-size: clamp(4rem, 20vw, 6.1rem); }
  .hero-copy { font-size: 1.05rem; }
  .hero-stats { gap: 20px; }
  .hero-stats div { min-width: 92px; }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card,
  .featured-card:first-child { min-height: 380px; grid-column: auto; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .filter-chip { flex: 0 0 auto; }
  .index-card { grid-template-columns: 112px 1fr; gap: 16px; }
  .index-title { font-size: 1.55rem; }
  .index-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .index-provenance { display: none !important; }
  .reading-tools button { padding-inline: 9px; }
  .focus-mode-toggle { max-width: 110px; }
  .article-header h1 { font-size: clamp(3.15rem, 15vw, 5.2rem); }
  .article-figure { margin-bottom: 40px; }
  .article-figure img { border-radius: 18px; }
  .article-body { --reading-size: 1.06rem; }
  .form-row { grid-template-columns: 1fr; }
  .article-pagination { grid-template-columns: 1fr; }
  .article-pagination a:last-child { text-align: left; }
  .footer-inner { flex-direction: column; }
}

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


/* Media presentation for smaller archival visuals */
.index-figure-link.is-contained .index-figure,
.featured-card.is-contained {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent-soft) 60%, transparent), transparent 62%),
    var(--surface-solid);
}
.index-figure-link.is-contained .index-image {
  object-fit: contain;
  padding: 10px;
}
.featured-card.is-contained img {
  object-fit: contain;
  padding: 22px;
}
.featured-card.is-contained::after {
  background: linear-gradient(180deg, transparent 20%, rgba(15, 12, 10, .84) 100%);
}
.article-figure.is-contained {
  display: grid;
  justify-items: center;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent-soft) 50%, transparent), transparent 58%),
    var(--surface);
}
.article-figure.is-contained img {
  width: auto;
  max-width: min(100%, 760px);
  height: auto;
  max-height: 680px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}
.article-figure.is-contained .article-image-credit {
  width: 100%;
}


/* =========================================================
   V12 - Expérience vivante + atelier auteur
   ========================================================= */
.hero-stats span small {
  display: block;
  margin-top: 3px;
  color: var(--text-faint);
  font-size: .58rem;
  letter-spacing: .04em;
  text-transform: none;
}

.resume-section { padding-top: 10px; padding-bottom: 34px; }
.resume-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}
.resume-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.resume-icon { width: 38px; height: 38px; display:grid; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent); }
.resume-card small { display:block; color:var(--text-faint); font-size:.64rem; text-transform:uppercase; letter-spacing:.1em; }
.resume-card strong { display:block; margin-top:2px; font:500 1.12rem/1.2 var(--serif); }
.resume-action { color:var(--accent); font-size:.74rem; font-weight:800; }

.doors-lede { max-width: 700px; margin-top: 10px; }
.featured-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.featured-card:first-child { min-height: 460px; }
.door-card { min-height: 460px; }
.door-card a, .door-book-button { position:absolute; inset:0; width:100%; height:100%; border:0; padding:0; display:flex; align-items:end; text-align:left; background:transparent; color:inherit; cursor:pointer; text-decoration:none; }
.door-type { display:inline-flex; margin-bottom:10px; padding:6px 9px; border:1px solid rgba(255,255,255,.35); border-radius:999px; color:#fff; font:750 .62rem/1 var(--sans); letter-spacing:.11em; text-transform:uppercase; backdrop-filter:blur(8px); }
.door-action { display:block; margin-top:16px; color:rgba(255,255,255,.82); font:750 .72rem/1 var(--sans); }
.door-book { background:#171411; }
.door-book::after { background:linear-gradient(180deg, transparent 14%, rgba(15,12,10,.88) 100%); }
.door-book-art { position:absolute; inset:0; background:
  radial-gradient(circle at 70% 25%, rgba(180,95,68,.68), transparent 22%),
  radial-gradient(circle at 30% 68%, rgba(245,231,209,.16), transparent 24%),
  repeating-linear-gradient(118deg, transparent 0 22px, rgba(255,255,255,.045) 23px 24px),
  linear-gradient(135deg,#211b17 0%,#543327 55%,#15110f 100%); transition:transform 500ms cubic-bezier(.2,.8,.2,1); }
.door-book:hover .door-book-art { transform: scale(1.035); }

.year-explorer { display:flex; align-items:center; gap:14px; margin: -2px 0 8px; overflow:hidden; }
.year-label { flex:0 0 auto; color:var(--text-faint); font-size:.64rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.year-strip { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; padding:4px 1px; }
.year-strip::-webkit-scrollbar { display:none; }
.year-chip { flex:0 0 auto; min-height:32px; padding:0 11px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--text-soft); font-size:.68rem; cursor:pointer; }
.year-chip:hover, .year-chip.is-active { background:var(--accent-soft); border-color:color-mix(in srgb,var(--accent) 26%,var(--line)); color:var(--text); }

.reveal-on-scroll, .index-card, .cv-card, .archive-card { opacity:0; transform:translateY(14px); transition:opacity 520ms ease, transform 520ms cubic-bezier(.2,.8,.2,1); }
.reveal-on-scroll.is-visible, .index-card.is-visible, .cv-card.is-visible, .archive-card.is-visible { opacity:1; transform:none; }

.studio-link { margin-left:8px; color:var(--text-faint); text-underline-offset:3px; }
.studio-link:hover { color:var(--text); }

/* Atelier */
.studio-page { min-height:100vh; }
.studio-header { min-height:88px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); }
.studio-main { padding-block:70px 110px; }
.studio-intro { max-width:850px; }
.studio-intro h1 { margin:0; font:500 clamp(3rem,7vw,6.5rem)/.92 var(--serif); letter-spacing:-.05em; }
.studio-intro > p:last-of-type { max-width:720px; color:var(--text-soft); font:1.08rem/1.7 var(--serif); }
.studio-steps { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; }
.studio-steps span { padding:7px 11px; border:1px solid var(--line); border-radius:999px; color:var(--text-soft); font-size:.69rem; }
.studio-tabs { display:flex; gap:8px; margin:54px 0 24px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.studio-tab { min-height:40px; padding:0 14px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--text-soft); cursor:pointer; }
.studio-tab.is-active { background:var(--text); color:var(--bg); border-color:var(--text); }
.studio-panel { padding:30px; border:1px solid var(--line); border-radius:24px; background:color-mix(in srgb,var(--surface-solid) 82%,transparent); box-shadow:var(--shadow-soft); }
.studio-form { max-width:980px; }
.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.field-grid label { display:grid; gap:7px; color:var(--text-soft); font-size:.72rem; font-weight:700; }
.field-grid label.wide { grid-column:1/-1; }
.field-grid input, .field-grid select, .field-grid textarea { width:100%; border:1px solid var(--line); border-radius:12px; background:var(--bg); color:var(--text); padding:12px 13px; outline:none; }
.field-grid textarea { resize:vertical; font-family:var(--serif); font-size:1rem; line-height:1.65; }
.field-grid input:focus, .field-grid select:focus, .field-grid textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 12%,transparent); }
.check-label { display:flex !important; grid-template-columns:auto 1fr !important; align-items:center; align-self:end; min-height:48px; }
.check-label input { width:auto; }
.studio-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-top:20px; }
.studio-note, .studio-help { color:var(--text-faint); font-size:.7rem; line-height:1.5; }
.studio-manage-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.studio-manage-head h2 { margin:0; font:500 2.4rem/1 var(--serif); }
.custom-list { display:grid; gap:8px; }
.custom-item { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 16px; border:1px solid var(--line); border-radius:14px; }
.custom-item small, .custom-item strong, .custom-item span { display:block; }
.custom-item small { color:var(--accent); font-size:.6rem; text-transform:uppercase; letter-spacing:.1em; }
.custom-item strong { margin-top:3px; font:500 1.08rem/1.2 var(--serif); }
.custom-item span { margin-top:3px; color:var(--text-faint); font-size:.68rem; }
.studio-empty { padding:30px; border:1px dashed var(--line); border-radius:14px; color:var(--text-soft); text-align:center; }
.studio-toast { position:fixed; right:22px; bottom:22px; z-index:100; max-width:min(420px,calc(100vw - 44px)); padding:13px 16px; border-radius:12px; background:var(--text); color:var(--bg); box-shadow:var(--shadow); opacity:0; transform:translateY(12px); pointer-events:none; transition:.2s ease; }
.studio-toast.is-visible { opacity:1; transform:none; }

@media (max-width: 900px) {
  .featured-grid { grid-template-columns:1fr; }
  .door-card, .featured-card:first-child { min-height:420px; }
  .field-grid { grid-template-columns:1fr; }
  .field-grid label.wide { grid-column:auto; }
}
@media (max-width: 640px) {
  .resume-card { grid-template-columns:auto 1fr; }
  .resume-action { grid-column:2; }
  .year-explorer { align-items:flex-start; flex-direction:column; gap:5px; }
  .studio-panel { padding:20px 16px; }
  .studio-manage-head { align-items:flex-start; flex-direction:column; }
  .studio-header .brand-copy small { display:none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll, .index-card, .cv-card, .archive-card { opacity:1; transform:none; }
}
.studio-preview { margin-top:24px; max-width:720px; padding:26px; border:1px solid var(--line); border-radius:18px; background:var(--bg); }
.studio-preview small { color:var(--accent); font-size:.62rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.studio-preview h3 { margin:8px 0 0; font:500 2rem/1.05 var(--serif); }
.studio-preview p { margin:14px 0 0; color:var(--text-soft); font:1rem/1.65 var(--serif); }

/* Studio access gate */
.studio-gate { min-height:100vh; display:grid; place-items:center; padding-block:40px; }
.studio-gate-card { width:min(100%, 520px); padding:34px 28px; border:1px solid var(--line); border-radius:24px; background:color-mix(in srgb,var(--surface-solid) 88%,transparent); box-shadow:var(--shadow-soft); }
.studio-gate-card h1 { margin:0 0 12px; font:500 clamp(2.5rem,6vw,4.5rem)/.95 var(--serif); letter-spacing:-.05em; }
.studio-gate-card > p { color:var(--text-soft); }
.studio-gate-form { display:grid; gap:14px; margin:24px 0 10px; }
.studio-gate-form label { display:grid; gap:8px; }
.studio-gate-form input { min-height:52px; padding:0 16px; border:1px solid var(--line); border-radius:14px; background:var(--bg); color:var(--text); font:inherit; }
.studio-gate-error { color:#b42318; font-size:.9rem; }
[data-theme="dark"] .studio-gate-error { color:#ff8a80; }

/* =========================================================
   V17 - Passe visuelle globale + pages légales
   ========================================================= */

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: auto 0 -10vh 0;
  height: 52vh;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 75%, color-mix(in srgb, var(--accent-soft) 62%, transparent) 0, transparent 42%),
    radial-gradient(circle at 85% 88%, color-mix(in srgb, var(--surface-solid) 84%, transparent) 0, transparent 44%);
  opacity: .7;
  z-index: -1;
}

.hero,
.publications-section,
.works-section,
.author-section,
.cv-section,
.archives-section,
.legal-main,
.studio-main {
  position: relative;
}

.hero::after,
.works-section::after,
.archives-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--surface-solid) 24%, transparent) 100%);
  opacity: .45;
}

.hero > *,
.works-section > *,
.archives-section > * {
  position: relative;
  z-index: 1;
}

.section-heading,
.mini-heading {
  position: relative;
}

.section-heading::after,
.mini-heading::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin-top: 18px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero-portrait,
.author-portrait,
.archive-card,
.cv-card,
.work-card,
.index-card,
.synopsis-dialog,
.legal-card {
  box-shadow: 0 22px 60px rgba(36, 24, 12, .07);
}

.author-card,
.archive-card,
.cv-card,
.work-card,
.index-card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.author-card:hover,
.archive-card:hover,
.cv-card:hover,
.work-card:hover,
.index-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: 0 28px 70px rgba(36, 24, 12, .11);
}

.post-index {
  gap: 18px 18px;
  border-top: none;
}

.index-card {
  margin-top: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-solid) 85%, transparent);
}

.index-card:nth-child(odd),
.index-card:nth-child(even) {
  padding: 26px;
  border-right: 1px solid var(--line);
}

.index-figure {
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.site-footer {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-solid) 55%, transparent), color-mix(in srgb, var(--surface-solid) 85%, transparent));
}

.footer-stack {
  display: grid;
  gap: 12px;
}

.footer-inner {
  align-items: center;
}

.footer-brand-block {
  max-width: 220px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.footer-nav a,
.footer-inner p a {
  color: var(--text-soft);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-inner p a:hover,
.footer-nav a:focus-visible,
.footer-inner p a:focus-visible {
  color: var(--accent);
}

.footer-note {
  margin: 0;
  color: var(--text-faint);
  font-size: .72rem;
  line-height: 1.6;
}

.legal-main {
  padding-block: 72px 110px;
}

.legal-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
}

.legal-lede {
  max-width: 720px;
  margin: 10px 0 30px;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.75;
}

.legal-alert {
  margin: 0 0 28px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent-soft) 74%, transparent);
}

.legal-alert strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.studio-footer {
  margin-top: 36px;
}

.studio-legal-links {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: .8rem;
}

@media (max-width: 1040px) {
  .post-index {
    gap: 12px;
  }

  .index-card:nth-child(odd),
  .index-card:nth-child(even) {
    border-right: none;
  }
}

@media (max-width: 720px) {
  .legal-main {
    padding-block: 42px 80px;
  }

  .footer-nav {
    gap: 8px 12px;
  }

  .index-card {
    border-radius: 18px;
  }
}

/* =========================================================
   V18 - Mise en page des manuscrits
   ========================================================= */

.works-grid {
  align-items: stretch;
}

.work-card-primary {
  grid-column: span 3;
  min-height: 285px;
}

.work-card-es {
  grid-column: span 2;
  min-height: 275px;
}

.work-card-progress-wide {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 90px);
  align-items: end;
}

.work-card-progress-wide h3 {
  margin: 14px 0 0;
}

.work-progress-meta {
  align-self: center;
  max-width: 560px;
}

.work-progress-meta p {
  margin-top: 0 !important;
  font-family: var(--serif);
  font-size: 1rem !important;
  line-height: 1.65 !important;
}

.work-progress-meta .work-read {
  margin-top: 12px;
}

@media (max-width: 1040px) {
  .work-card-primary,
  .work-card-es {
    grid-column: span 3;
  }
}

@media (max-width: 760px) {
  .work-card-primary,
  .work-card-es,
  .work-card-progress-wide {
    grid-column: 1 / -1;
  }

  .work-card-progress-wide {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 250px;
  }
}

/* V20 - atelier unlock robuste */
body.studio-locked { overflow: hidden; }
.studio-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--accent-soft) 58%, transparent), transparent 38%),
    color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(22px) saturate(120%);
}
.studio-gate-overlay .studio-gate-card { width: min(100%, 520px); }


@media (max-width: 560px) {
  .hero-art {
    min-height: 575px;
    padding-top: 138px;
  }
  .hero-portrait {
    width: min(330px, 78vw);
    transform: translateX(-30px) rotate(-1.5deg);
  }
  .hero-quote {
    top: 46px;
    right: -2px;
    width: min(216px, 62vw);
    padding: 16px 18px 14px;
    font-size: .84rem;
  }
  .hero-thought-trail {
    top: 214px;
    right: 70px;
    width: 118px;
    height: 92px;
  }
  .thought-dot-1 { left: 6px; bottom: 2px; width: 8px; height: 8px; }
  .thought-dot-2 { left: 34px; bottom: 18px; width: 12px; height: 12px; }
  .thought-dot-3 { left: 66px; bottom: 42px; width: 18px; height: 18px; }
}
