/* farhad.fr: layer for the pages the React app does not draw (agents, journal, articles, 404) and for the pre-rendered fallback. */
.fx-prerender, .fx-doc { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem; }
.fx-prerender h1, .fx-doc h1 { font-family: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', system-ui, sans-serif; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; }
.fx-prerender h2, .fx-doc h2 { margin-top: 2.2rem; }
.fx-prerender ul, .fx-doc ul { padding-left: 1.2rem; }
.fx-doc a { text-decoration: underline; text-underline-offset: 3px; }
.fx-prompt { white-space: pre-wrap; background: #fff; border: 1px solid #b8b2a6; border-radius: 12px; padding: 1rem; font-size: 0.95rem; }
.fx-doc .fx-meta { color: #77736b; }
.fx-doc img { max-width: 100%; height: auto; border-radius: 12px; }

/* Hero portrait: under the name on small screens (in the text flow), on the right from 1024px. The React hero renders <img class="fx-portrait"> right after the h1. */
.fx-portrait {
  display: block; position: relative; z-index: 0; margin-top: 1.75rem;
  width: clamp(150px, 46vw, 300px); aspect-ratio: 1; object-fit: cover; object-position: 50% 20%;
  border-radius: 22px; box-shadow: 0 24px 48px -28px rgb(23 23 21 / 0.45);
  animation: fx-portrait-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}
.fx-portrait-static { width: 160px; height: 160px; object-fit: cover; border-radius: 20px; }
@media (min-width: 1024px) {
  .fx-portrait {
    position: absolute; margin-top: 0; top: 6.5rem; right: 2rem;
    width: clamp(260px, 27vw, 420px); border-radius: 28px; box-shadow: 0 30px 60px -30px rgb(23 23 21 / 0.45);
  }
}
@keyframes fx-portrait-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fx-portrait { animation: none; } }

/* Agents section (home, just before « Votre prochain mouvement »): terminal window like the voilavoila dev demo. */
.fx-ag { max-width: 1400px; margin: 0 auto; padding: 6rem 1.25rem 0; }
@media (min-width: 640px) { .fx-ag { padding: 8rem 2rem 0; } }
.fx-ag-kicker { margin: 0; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--color-faint, #97928a); }
.fx-ag-title { margin: 1.2rem 0 0; font-size: clamp(34px, 5vw, 68px); line-height: 1.02; }
.fx-ag-lead { margin: 1.4rem 0 2.2rem; max-width: 40rem; font-size: 16px; line-height: 1.6; color: var(--color-muted, #66645c); text-wrap: pretty; }
.fx-ag-win { border: 1px solid #30363d; border-radius: 14px; overflow: hidden; background: #0d1117; color: #e6edf3; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; box-shadow: 0 30px 70px -30px rgb(0 0 0 / .55); }
.fx-ag-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #161b22; border-bottom: 1px solid #30363d; }
.fx-ag-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f56; }
.fx-ag-bar i:nth-child(2) { background: #ffbd2e; }
.fx-ag-bar i:nth-child(3) { background: #27c93f; }
.fx-ag-bar span { margin-left: 8px; font-size: .82rem; color: #8b949e; }
.fx-ag-body { display: grid; grid-template-columns: 240px 1fr; }
.fx-ag-side { display: grid; gap: 4px; align-content: start; padding: 16px; border-right: 1px solid #30363d; }
.fx-ag-side p { margin: 0 0 8px; font-size: .72rem; letter-spacing: .14em; color: #8b949e; }
.fx-ag-side a { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: #c9d1d9; }
.fx-ag-side a:hover, .fx-ag-side a:focus-visible { background: #161b22; outline: 1px solid #58a6ff; }
.fx-ag-side b { font-weight: 600; font-size: .9rem; color: #58a6ff; }
.fx-ag-side small { font-size: .75rem; color: #8b949e; }
.fx-ag-main { min-width: 0; padding: clamp(16px, 3vw, 32px); }
.fx-ag-c { margin: 0 0 12px; color: #8b949e; font-size: .85rem; }
.fx-ag-pre { margin: 0; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; background: #161b22; border: 1px solid #30363d; border-radius: 10px; color: #a5d6ff; font: inherit; font-size: .85rem; line-height: 1.7; }
.fx-ag-act { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.fx-ag-btn { display: inline-block; padding: 10px 18px; border: 0; border-radius: 6px; background: #238636; color: #fff; font: inherit; font-weight: 700; font-size: .88rem; text-decoration: none; cursor: pointer; }
.fx-ag-btn:hover { filter: brightness(1.2); }
.fx-ag-o { background: transparent; border: 1px solid #30363d; color: #c9d1d9; }
@media (max-width: 760px) { .fx-ag-body { grid-template-columns: 1fr; } .fx-ag-side { border-right: 0; border-bottom: 1px solid #30363d; } }

/* ===== Interior pages (journal, article, agents, 404): same tokens as the React home ===== */
body.fx-interior { background: var(--color-bg, #f3f1eb); color: var(--color-fg, #131416); font-family: var(--font-sans, 'Inter Variable', system-ui, sans-serif); font-size: 16px; line-height: 1.6; }
.fx-skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--color-fg, #131416); color: var(--color-bg, #f3f1eb); border-radius: 8px; }
.fx-skip:focus { left: 8px; }
.fx-interior :focus-visible { outline: 2px solid var(--color-accent, #c8451f); outline-offset: 3px; }

.fx-wrap { max-width: 1400px; margin: 0 auto; padding: 120px 20px 32px; }
@media (min-width: 640px) { .fx-wrap { padding: 152px 32px 48px; } }
.fx-center { text-align: left; min-height: 50vh; }
.fx-kicker { margin: 0; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--color-faint, #97928a); display: flex; align-items: center; gap: 12px; }
.fx-kicker::before { content: ''; width: 32px; height: 1px; background: var(--color-accent, #c8451f); }
.fx-h1 { margin: 22px 0 0; font-family: var(--font-display); font-weight: 500; letter-spacing: -.035em; line-height: .98; font-size: clamp(44px, 8vw, 112px); max-width: 16ch; text-wrap: balance; }
.fx-lead { margin: 28px 0 0; max-width: 40rem; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.55; color: var(--color-muted, #66645c); text-wrap: pretty; }
.fx-btn { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; margin: 6px 10px 0 0; border-radius: 14px; background: var(--color-fg, #131416); color: var(--color-bg, #f3f1eb) !important; text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background .2s; }
.fx-btn:hover { background: var(--color-accent, #c8451f); }
.fx-btn-o { background: transparent; color: var(--color-fg, #131416) !important; border: 1px solid var(--color-fg, #131416); }
.fx-btn-o:hover { background: var(--color-fg, #131416); color: var(--color-bg, #f3f1eb) !important; }

/* journal list */
.fx-head { padding-bottom: 40px; }
.fx-search { display: flex; gap: 10px; margin-top: 32px; max-width: 30rem; }
.fx-search input[type=search] { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 1px solid var(--color-line, #ddd8cb); border-radius: 14px; background: var(--color-surface, #faf8f3); color: inherit; font: inherit; }
.fx-search button { height: 48px; padding: 0 20px; border: 1px solid var(--color-fg, #131416); border-radius: 14px; background: transparent; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }
.fx-search button:hover { background: var(--color-fg, #131416); color: var(--color-bg, #f3f1eb); }
.fx-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-line, #ddd8cb); }
.fx-list li { border-bottom: 1px solid var(--color-line, #ddd8cb); }
.fx-row { display: grid; grid-template-columns: 1fr; gap: 10px 32px; align-items: center; padding: 30px 0; text-decoration: none; transition: padding .35s cubic-bezier(.22, 1, .36, 1); }
@media (min-width: 760px) { .fx-row { grid-template-columns: 150px 1fr auto; padding: 38px 0; } }
.fx-row:hover { padding-left: 14px; }
.fx-row time { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--color-faint, #97928a); }
.fx-row-main { display: grid; gap: 10px; min-width: 0; }
.fx-row-t { font-family: var(--font-display); font-weight: 500; letter-spacing: -.03em; line-height: 1.02; font-size: clamp(26px, 3.6vw, 48px); text-wrap: balance; transition: color .2s; }
.fx-row:hover .fx-row-t { color: var(--color-accent, #c8451f); }
.fx-row-x { max-width: 46rem; color: var(--color-muted, #66645c); font-size: 15.5px; }
.fx-row-i { width: 120px; height: 90px; object-fit: cover; border-radius: 14px; display: none; }
@media (min-width: 760px) { .fx-row-i { display: block; } }
.fx-row-a { display: none; font-size: 28px; color: var(--color-accent, #c8451f); transition: transform .3s; }
@media (min-width: 760px) { .fx-row-a { display: block; } }
.fx-row:hover .fx-row-a { transform: translateX(6px); }
.fx-empty { padding: 40px 0; color: var(--color-muted, #66645c); }
.fx-pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 36px 0 0; font-size: 14px; color: var(--color-muted, #66645c); }
.fx-pager a { text-decoration: none; border-bottom: 1px solid var(--color-accent, #c8451f); }

/* article */
.fx-article { max-width: 46rem; margin: 0 auto; }
.fx-article .fx-h1 { font-size: clamp(38px, 6.4vw, 78px); max-width: none; }
.fx-back { margin: 0 0 40px; font-size: 14px; }
.fx-back a { text-decoration: none; color: var(--color-muted, #66645c); border-bottom: 1px solid var(--color-line, #ddd8cb); }
.fx-back a:hover { color: var(--color-accent, #c8451f); }
.fx-cover { margin: 44px -0px 0; }
@media (min-width: 1100px) { .fx-cover { margin-left: -6rem; margin-right: -6rem; } }
.fx-cover img { width: 100%; height: auto; border-radius: 22px; display: block; }
.fx-prose { margin-top: 48px; font-size: 18px; line-height: 1.75; }
.fx-prose > * + * { margin-top: 1.25em; }
.fx-prose h2, .fx-prose h3, .fx-prose h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.03em; line-height: 1.08; margin-top: 2.2em; }
.fx-prose h2 { font-size: clamp(28px, 3.6vw, 40px); }
.fx-prose h3 { font-size: clamp(22px, 2.6vw, 28px); }
.fx-prose a { color: var(--color-accent, #c8451f); text-underline-offset: 3px; }
.fx-prose ul, .fx-prose ol { padding-left: 1.3em; }
.fx-prose li + li { margin-top: .4em; }
.fx-prose li::marker { color: var(--color-accent, #c8451f); }
.fx-prose blockquote { margin-left: 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--color-accent, #c8451f); font-family: var(--font-display); font-size: 1.3em; line-height: 1.3; letter-spacing: -.02em; }
.fx-prose img { max-width: 100%; height: auto; border-radius: 16px; }
.fx-prose pre { overflow: auto; padding: 18px; border-radius: 14px; background: #131416; color: #f3f1eb; font: 14px/1.7 var(--font-mono); }
.fx-prose code { font-family: var(--font-mono); font-size: .88em; background: var(--color-surface, #faf8f3); border: 1px solid var(--color-line, #ddd8cb); border-radius: 6px; padding: 1px 6px; }
.fx-prose pre code { background: none; border: 0; padding: 0; }
.fx-prose hr { border: 0; border-top: 1px solid var(--color-line, #ddd8cb); margin: 2.5em 0; }
.fx-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.fx-prose th, .fx-prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-line, #ddd8cb); }
.fx-next { margin-top: 80px; padding: 36px; border-top: 1px solid var(--color-fg, #131416); background: var(--color-surface, #faf8f3); border-radius: 0 0 22px 22px; }
.fx-next-t { margin: 14px 0 22px; font-family: var(--font-display); font-weight: 500; letter-spacing: -.035em; line-height: 1; font-size: clamp(32px, 4.4vw, 54px); }

/* agents page inside the shell */
.fx-interior .fx-doc { max-width: 52rem; padding: 120px 20px 32px; }
@media (min-width: 640px) { .fx-interior .fx-doc { padding: 152px 32px 48px; } }
.fx-interior .fx-doc h1 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.035em; line-height: .98; font-size: clamp(40px, 7vw, 88px); }
.fx-interior .fx-doc h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.03em; font-size: 28px; }
.fx-interior .fx-doc a { color: var(--color-accent, #c8451f); }
.fx-interior .fx-prompt { background: #0d1117; color: #a5d6ff; border: 1px solid #30363d; border-radius: 12px; font-family: var(--font-mono); font-size: .88rem; line-height: 1.7; }

/* Footer: warm ink + theme accent */
.fx-foot { margin-top: 72px; background: #131416; color: #ebe7dc; font-size: 14.5px; overflow: hidden; }
body.fx-home .fx-foot { margin-top: 0; }
html[lang=en] .fx-foot[lang=fr], html:not([lang=en]) .fx-foot[lang=en] { display: none; }
.fx-foot-in { max-width: 1400px; margin: 0 auto; padding: 64px 20px 28px; }
@media (min-width: 640px) { .fx-foot-in { padding: 88px 32px 32px; } }
.fx-foot-top { display: grid; gap: 48px; }
@media (min-width: 900px) { .fx-foot-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 72px; } }
.fx-foot-mark { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 44px; letter-spacing: -.04em; line-height: 1; color: #e8825c; }
.fx-foot-role { margin: 14px 0 26px; max-width: 34ch; color: #9c978c; line-height: 1.6; }
.fx-foot-cta { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 12px; background: var(--color-accent, #c8451f); color: #fff !important; font-weight: 600; text-decoration: none; transition: filter .2s, transform .2s; }
.fx-foot-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }
.fx-foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; }
.fx-foot-cols h2 { margin: 0 0 16px; font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #e8825c; }
.fx-foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.fx-foot a { color: #ebe7dc; text-decoration: none; overflow-wrap: anywhere; transition: color .2s; }
.fx-foot-cols a:hover, .fx-foot-bottom a:hover { color: #e8825c; }
.fx-foot :focus-visible { outline: 2px solid #e8825c; outline-offset: 3px; }
.fx-foot-giant { margin: 56px 0 8px; line-height: .86; text-align: center; user-select: none; white-space: nowrap; }
.fx-foot-giant span { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 12.5vw, 11rem); letter-spacing: -.045em; background: linear-gradient(180deg, rgb(200 69 31 / .6), rgb(200 69 31 / .05)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; border-top: 1px solid rgb(243 241 235 / .14); font-size: 13px; color: #9c978c; }
.fx-foot-bottom p { margin: 0; }
.fx-foot-bottom a { color: #9c978c; }
@media (prefers-reduced-motion: reduce) { .fx-row, .fx-row-a { transition: none; } }
