/* Flow Folio — Méandre éditorial (ff-) */
:root {
  --ff-deep: #0b3d3a;
  --ff-teal: #1a6b64;
  --ff-mist: #d9efe8;
  --ff-foam: #eef8f5;
  --ff-ink: #0f2e2c;
  --ff-muted: #5a7a75;
  --ff-glass: rgba(217, 239, 232, 0.18);
  --ff-line: rgba(11, 61, 58, 0.14);
  --ff-display: "Literata", Georgia, serif;
  --ff-sans: "Figtree", system-ui, sans-serif;
  --ff-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.ff-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ff-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ff-ink);
  background: var(--ff-foam);
  -webkit-font-smoothing: antialiased;
}

body.ff-nav-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.ff-preview {
  background: var(--ff-deep);
  color: var(--ff-mist);
  text-align: center;
  padding: .45rem;
  font-size: .8rem;
}
.ff-preview a { text-decoration: underline; }

/* Header */
.ff-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.35rem;
}

.ff-brand-buoy {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ff-mist);
  text-shadow: 0 1px 12px rgba(11, 61, 58, 0.35);
}

body:not(.ff-body--estuary) .ff-brand-buoy {
  color: var(--ff-deep);
  text-shadow: none;
}

.ff-nav-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(217, 239, 232, 0.35);
  background: rgba(11, 61, 58, 0.25);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}
body:not(.ff-body--estuary) .ff-nav-btn {
  border-color: var(--ff-line);
  background: rgba(255, 255, 255, 0.72);
}
.ff-nav-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ff-mist);
}
body:not(.ff-body--estuary) .ff-nav-btn span { background: var(--ff-ink); }

.ff-drawer {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: linear-gradient(165deg, var(--ff-deep) 0%, #0e5049 55%, var(--ff-teal) 100%);
  color: var(--ff-mist);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
}
.ff-drawer[hidden] { display: none !important; }
.ff-drawer a {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.ff-drawer a.is-active { opacity: 0.65; font-style: italic; }
.ff-search input {
  width: min(300px, 100%);
  border: 0;
  border-bottom: 1px solid rgba(217, 239, 232, 0.35);
  background: transparent;
  color: var(--ff-mist);
  padding: .5rem 0;
  font: inherit;
  outline: none;
}
.ff-search input::placeholder { color: rgba(217, 239, 232, 0.55); }
.ff-admin { font-size: .9rem !important; opacity: .7 !important; }

/* Estuary — first viewport */
.ff-estuary {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 5.5rem 1.25rem 3rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(26, 107, 100, 0.45), transparent 65%),
    radial-gradient(ellipse 55% 40% at 85% 20%, rgba(217, 239, 232, 0.25), transparent 55%),
    linear-gradient(175deg, var(--ff-deep) 0%, #0f524c 42%, var(--ff-teal) 72%, var(--ff-mist) 100%);
  color: var(--ff-mist);
}

.ff-current {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      108deg,
      transparent,
      transparent 60px,
      rgba(217, 239, 232, 0.035) 60px,
      rgba(217, 239, 232, 0.035) 61px
    );
  animation: ff-drift 32s linear infinite;
}

@keyframes ff-drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(-60px, 30px, 0) rotate(0.5deg); }
}

.ff-estuary-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 38rem;
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 1s var(--ff-ease), transform 1s var(--ff-ease);
}
.ff-estuary-inner.is-in {
  opacity: 1;
  transform: translateY(0);
}

.ff-buoy {
  margin: 0 0 2.5rem;
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  animation: ff-buoy 6s ease-in-out infinite;
}

@keyframes ff-buoy {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-8px) rotate(0.4deg); }
}

.ff-plaque {
  padding: 1.75rem 1.5rem 1.5rem;
  background: rgba(11, 61, 58, 0.42);
  border: 1px solid rgba(217, 239, 232, 0.22);
  border-radius: 4px 18px 4px 18px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 24px 48px rgba(11, 61, 58, 0.28),
    inset 0 1px 0 rgba(217, 239, 232, 0.12);
}

.ff-label {
  margin: 0 0 .5rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

.ff-plaque-title {
  margin: 0 0 .65rem;
  font-family: var(--ff-display);
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.ff-plaque-title a {
  transition: opacity .25s;
}
.ff-plaque-title a:hover { opacity: .78; }

.ff-plaque-dek {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  line-height: 1.55;
  opacity: 0.88;
}

.ff-plaque-cta {
  display: inline-block;
  padding: .65rem 1.35rem;
  border: 1px solid rgba(217, 239, 232, 0.45);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background .25s, transform .25s;
}
.ff-plaque-cta:hover {
  background: rgba(217, 239, 232, 0.12);
  transform: translateY(-1px);
}

body:not(.ff-body--estuary) .ff-plaque-cta {
  border-color: var(--ff-teal);
  color: var(--ff-deep);
}
body:not(.ff-body--estuary) .ff-plaque-cta:hover {
  background: rgba(26, 107, 100, 0.08);
}

/* Meander */
.ff-meander-wrap {
  padding: 4rem 0 5rem;
  background:
    linear-gradient(180deg, var(--ff-mist) 0%, var(--ff-foam) 18%, var(--ff-foam) 100%);
}

.ff-meander-head,
.ff-delta-head {
  text-align: center;
  padding: 0 1.25rem 2.5rem;
}
.ff-meander-head h2,
.ff-delta-head h2 {
  margin: 0;
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ff-deep);
}

.ff-meander {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1rem;
}

.ff-river {
  position: absolute;
  left: 50%;
  top: 0;
  width: min(120px, 18vw);
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.ff-river-current {
  animation: ff-flow 18s linear infinite;
}

@keyframes ff-flow {
  to { stroke-dashoffset: -256; }
}

.ff-nodes {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 8vw, 5.5rem);
  padding: 1rem 0 2rem;
}

.ff-meander--flat .ff-nodes,
.ff-meander--flat {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ff-meander--flat .ff-river { display: none; }

/* Nodes */
.ff-node {
  position: relative;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity .85s var(--ff-ease), transform .85s var(--ff-ease);
}
.ff-node.is-in {
  opacity: 1;
  transform: translateY(0);
}

.ff-node-km {
  position: absolute;
  top: -.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--ff-teal);
  background: var(--ff-foam);
  padding: .15rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--ff-line);
  z-index: 2;
}

.ff-meander--flat .ff-node-km { display: none; }

.ff-node-link {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 640px) {
  .ff-node--left .ff-node-link {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    padding-right: calc(50% + 2.5rem);
  }
  .ff-node--right .ff-node-link {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    padding-left: calc(50% + 2.5rem);
  }
  .ff-node--right .ff-node-pebble { order: 2; }
  .ff-node--right .ff-node-body { order: 1; text-align: right; }
  .ff-meander--flat .ff-node--left .ff-node-link,
  .ff-meander--flat .ff-node--right .ff-node-link {
    padding: 0;
    grid-template-columns: 140px 1fr;
  }
  .ff-meander--flat .ff-node--right .ff-node-link {
    grid-template-columns: 1fr 140px;
  }
  .ff-meander--flat .ff-node--right .ff-node-body { text-align: right; }
}

.ff-node-pebble {
  display: block;
  aspect-ratio: 1;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 58% 42% 55% 45% / 48% 52% 44% 56%;
  overflow: hidden;
  background: linear-gradient(145deg, var(--ff-mist), #b8ddd4);
  box-shadow:
    0 16px 36px rgba(11, 61, 58, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  transition: transform .45s var(--ff-ease), box-shadow .45s;
}
.ff-node-pebble--cut {
  border-radius: 42% 58% 38% 62% / 62% 38% 58% 42%;
  clip-path: polygon(8% 0, 100% 6%, 94% 100%, 0 92%);
}
.ff-node-link:hover .ff-node-pebble {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 0 20px 44px rgba(11, 61, 58, 0.2);
}
.ff-node-pebble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ff-node-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 140px;
  font-family: var(--ff-display);
  font-size: 2.5rem;
  font-style: italic;
  color: var(--ff-deep);
  opacity: .5;
}

.ff-node-num {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ff-teal);
  margin-bottom: .35rem;
}

.ff-node-title {
  margin: 0 0 .4rem;
  font-family: var(--ff-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  transition: color .25s;
}
.ff-node-link:hover .ff-node-title { color: var(--ff-teal); }

.ff-node-dek {
  margin: 0;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--ff-muted);
}

/* Delta */
.ff-delta {
  padding: 4rem 0 5rem;
  background:
    linear-gradient(180deg, var(--ff-foam) 0%, var(--ff-mist) 40%, rgba(11, 61, 58, 0.06) 100%);
  overflow: hidden;
}

.ff-delta-streams {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.ff-stream {
  position: relative;
  display: block;
  overflow: hidden;
  padding: .85rem 0;
  border-top: 1px solid var(--ff-line);
  transition: background .3s;
}
.ff-stream:last-child { border-bottom: 1px solid var(--ff-line); }
.ff-stream:hover { background: rgba(26, 107, 100, 0.04); }

.ff-stream-name {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 1.25rem;
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--ff-deep);
}

.ff-stream-flow {
  position: absolute;
  inset: 50% 0 auto;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(26, 107, 100, 0.22);
  animation: ff-stream var(--ff-stream-dur, 28s) linear infinite;
  animation-delay: calc(var(--ff-stream-i, 0) * -3.5s);
}

@keyframes ff-stream {
  from { transform: translateY(-50%) translateX(0); }
  to { transform: translateY(-50%) translateX(-50%); }
}

/* Article */
.ff-piece {
  max-width: 42rem;
  margin: 0 auto;
  padding: 6rem 1.35rem 4rem;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity .8s var(--ff-ease), transform .8s var(--ff-ease);
}
.ff-piece.is-in { opacity: 1; transform: translateY(0); }

.ff-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  font-size: .82rem;
  color: var(--ff-muted);
  margin-bottom: 1.5rem;
}
.ff-crumb a:hover { color: var(--ff-teal); }

.ff-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .25rem .65rem;
  background: var(--ff-deep);
  color: var(--ff-mist);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
}

.ff-piece-title {
  margin: 0 0 .85rem;
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ff-deep);
}

.ff-piece-lede {
  margin: 0 0 1.25rem;
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--ff-muted);
}

.ff-byline {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .85rem;
  color: var(--ff-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ff-line);
}

.ff-piece-cover {
  margin: 0 0 2rem;
  border-radius: 58% 42% 55% 45% / 48% 52% 44% 56%;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(11, 61, 58, 0.12);
}
.ff-piece-cover img { width: 100%; }

.ff-prose {
  font-size: 1.05rem;
  line-height: 1.75;
}
.ff-prose h2, .ff-prose h3 {
  font-family: var(--ff-display);
  color: var(--ff-deep);
  letter-spacing: -0.02em;
}
.ff-prose p { margin: 0 0 1.15rem; }
.ff-prose a {
  color: var(--ff-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ff-prose img { border-radius: 8px; margin: 1.5rem 0; }
.ff-prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--ff-teal);
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--ff-deep);
  background: rgba(217, 239, 232, 0.35);
}

.ff-meander-wrap--related {
  padding-top: 0;
  background: transparent;
}

/* Archive */
.ff-archive {
  max-width: 52rem;
  margin: 0 auto;
  padding: 6rem 1.35rem 4rem;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity .8s var(--ff-ease), transform .8s var(--ff-ease);
}
.ff-archive.is-in { opacity: 1; transform: translateY(0); }

.ff-archive-title {
  margin: 0 0 1rem;
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ff-deep);
}

.ff-empty {
  color: var(--ff-muted);
  font-style: italic;
}

[data-ff-reveal] {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity .85s var(--ff-ease), transform .85s var(--ff-ease);
}
[data-ff-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.ff-footer {
  text-align: center;
  padding: 3rem 1.25rem 2.5rem;
  border-top: 1px solid var(--ff-line);
  background: linear-gradient(180deg, transparent, rgba(217, 239, 232, 0.35));
}
.ff-footer-buoy {
  margin: 0 0 .35rem;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ff-deep);
}
.ff-footer-tag {
  margin: 0 0 1rem;
  font-size: .82rem;
  color: var(--ff-muted);
}
.ff-footer a {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ff-teal);
}
.ff-footer a:hover { text-decoration: underline; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ff-current,
  .ff-buoy,
  .ff-river-current,
  .ff-stream-flow {
    animation: none !important;
  }
  .ff-estuary-inner,
  .ff-node,
  .ff-piece,
  .ff-archive,
  [data-ff-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
/* === ARTICLE READ v2 — Méandre === */
.ff-meander{position:relative;max-width:820px;margin:0 auto;padding:2rem 1.25rem 3rem}
.ff-meander-path{position:absolute;left:0;top:0;bottom:0;width:48px;color:var(--ff-ink,#1a1a1a);opacity:.18;pointer-events:none}
.ff-meander-body{margin-left:3rem;display:grid;gap:1.75rem}
.ff-node--head,.ff-node--stone,.ff-node--prose{position:relative}
.ff-node--head{padding-left:.5rem}
.ff-meander-title{font-size:clamp(2rem,4.5vw,3.2rem);line-height:1.08;letter-spacing:-.03em;margin:.4rem 0 .75rem}
.ff-meander-lede{font-size:1.1rem;line-height:1.5;opacity:.78}
.ff-node--stone{margin:0;border-radius:40% 60% 55% 45%/45% 40% 60% 55%;overflow:hidden;aspect-ratio:16/10;max-width:520px;box-shadow:0 16px 40px rgba(0,0,0,.12)}
.ff-node--stone img{width:100%;height:100%;object-fit:cover}
.ff-node--prose{padding:1.25rem 1.35rem;background:rgba(255,255,255,.55);border-radius:18px;border:1px solid rgba(0,0,0,.06)}
.ff-delta{max-width:900px;margin:0 auto 3rem;padding:0 1.25rem}
@media(max-width:700px){.ff-meander-path{display:none}.ff-meander-body{margin-left:0}}
/* === MEMBER NAV + RELATED FIX === */
.ff-header .member-nav-sep { background: var(--ff-teal,#0d9488); width: 8px; height: 2px; border-radius: 0; opacity: 1; }
.ff-header .member-nav-link {
  font-style: italic;
  font-size: .85rem;
  color: var(--ff-ink,#1a1a1a);
  background: rgba(13,148,136,.08);
  border-radius: 999px;
  padding: .4rem .9rem;
}
.ff-header .member-nav-link--up { background: var(--ff-teal,#0d9488); color: #fff; font-style: normal; }
.ff-delta .ff-node { opacity: 1; transform: none; }
