/* aaron-penalba.fr — feuille de style unique */

:root {
  --paper: #f5f3ee;
  --paper-2: #ece9e1;
  --card: #fbfaf7;
  --ink: #15181d;
  --ink-2: #474c55;
  --ink-3: #6f747c;
  --rule: #d8d3c8;
  --rule-strong: #15181d;
  --accent: #1f4a3a;
  --accent-soft: #e3ebe5;
  --mark: #a4512d;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1140px;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111315;
    --paper-2: #181b1e;
    --card: #15181b;
    --ink: #ecebe6;
    --ink-2: #b9bab6;
    --ink-3: #8c8f91;
    --rule: #2c3034;
    --rule-strong: #ecebe6;
    --accent: #8cc2a6;
    --accent-soft: #1b2a23;
    --mark: #e09b74;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--paper); }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* ---------- typographie ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.012em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.32rem; line-height: 1.25; }
p { margin: 0 0 1.1em; }
.lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.38; color: var(--ink); font-weight: 400; }
.muted { color: var(--ink-2); }
.label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.label .sep { margin: 0 .55em; opacity: .5; }
.accent { color: var(--accent); }
em { font-style: italic; }
abbr[title] { text-decoration: none; border-bottom: 1px dotted var(--ink-3); cursor: help; }

/* ---------- en-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 1.28rem; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
.brand-tag { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 1180px) { .brand-tag { display: none; } }
.nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.nav a { font-size: 0.86rem; text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--rule); color: var(--ink); font: 500 0.78rem var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 8px 12px; cursor: pointer; }

@media (max-width: 900px) {
  .brand-tag { display: none; }
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--rule); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
}

/* ---------- héros (page de titre) ---------- */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.hero .label { margin-bottom: 26px; display: block; }
.hero h1 { margin-bottom: 18px; }
.hero .role { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); margin-bottom: 34px; letter-spacing: .01em; }
.hero .lead { margin-bottom: 22px; max-width: 30ch; }
.hero .intro { color: var(--ink-2); max-width: 58ch; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 500 0.88rem var(--sans); padding: 12px 18px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arr { font-family: var(--mono); }

.figure { margin: 0; }
.figure .frame { border: 1px solid var(--rule); background: var(--card); padding: 18px; }
.figure figcaption { font-size: 0.8rem; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.figure figcaption b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); letter-spacing: .02em; }

.fig-svg text { font-family: var(--mono); fill: var(--ink-2); }
.fig-svg .t-strong { fill: var(--ink); font-weight: 500; }
.fig-svg .edge { stroke: var(--ink-3); stroke-width: 1; fill: none; }
.fig-svg .edge-a { stroke: var(--accent); stroke-width: 1.4; fill: none; }
.fig-svg .node { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.fig-svg .node-a { fill: var(--accent); stroke: var(--accent); }
.fig-svg .node-s { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.fig-svg .box { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1; }
.fig-svg .box-a { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.2; }
.fig-svg .t-inv { fill: var(--paper); }

.meta-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); margin-top: 56px; }
.meta-strip div { padding: 16px 16px 0 0; }
.meta-strip dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.meta-strip dd { margin: 4px 0 0; font-family: var(--serif); font-size: 1.1rem; }

@media (max-width: 900px) {
  .hero { padding: 44px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .meta-strip { grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
}

/* ---------- sections ---------- */
.section { padding: 88px 0; border-bottom: 1px solid var(--rule); }
.section.alt { background: var(--paper-2); }
.sec-head { display: grid; grid-template-columns: 200px 1fr; gap: 40px; margin-bottom: 44px; align-items: baseline; }
.sec-num { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); letter-spacing: .06em; padding-top: 10px; border-top: 1px solid var(--rule-strong); }
.sec-num b { color: var(--accent); font-weight: 500; }
.sec-body { display: grid; grid-template-columns: 200px 1fr; gap: 40px; }
.sec-body > .col { grid-column: 2; min-width: 0; }
.hero-grid > * { min-width: 0; }
.prose { max-width: 66ch; }
.prose p { color: var(--ink); }
.prose h2 { margin: 2.2em 0 .6em; font-size: 1.75rem; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose a { text-decoration-color: var(--accent); }

@media (max-width: 900px) {
  .section { padding: 60px 0; }
  .sec-head, .sec-body { grid-template-columns: 1fr; gap: 14px; }
  .sec-body > .col { grid-column: 1; }
  .sec-num { max-width: 200px; }
}

.pull {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.3;
  border-left: 3px solid var(--accent); padding: 4px 0 4px 24px; margin: 40px 0; max-width: 32ch;
}

/* hypothèses */
.hyps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--rule-strong); }
.hyp { padding: 26px 28px 30px 0; border-bottom: 1px solid var(--rule); }
.hyp:nth-child(odd) { border-right: 1px solid var(--rule); }
.hyp:nth-child(even) { padding-left: 28px; padding-right: 0; }
.hyp-id { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.hyp-id b { font-family: var(--serif); font-size: 2rem; font-weight: 400; color: var(--accent); font-style: italic; }
.status { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--mark); border: 1px solid currentColor; padding: 2px 7px; }
.hyp p { margin: 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.45; }
@media (max-width: 760px) {
  .hyps { grid-template-columns: 1fr; }
  .hyp, .hyp:nth-child(even) { padding: 22px 0; border-right: 0 !important; }
}

/* grilles génériques */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 28px; } }

.card { border-top: 1px solid var(--rule-strong); padding-top: 18px; }
.card .label { display: block; margin-bottom: 10px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 0.96rem; }
.card .more { font-size: 0.86rem; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--ink); }
.card .more:hover { border-color: var(--accent); }

/* domaines */
.domains { list-style: none; margin: 0; padding: 0; counter-reset: d; border-top: 1px solid var(--rule-strong); }
.domains li { counter-increment: d; display: grid; grid-template-columns: 64px 1fr; padding: 16px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; }
.domains li::before { content: counter(d, decimal-leading-zero); font-family: var(--mono); font-size: 0.78rem; color: var(--accent); padding-top: 6px; }

/* notes */
.notes-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.note-item { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.note-item .label { line-height: 1.9; }
.note-item h3 { font-size: 1.5rem; margin-bottom: 8px; }
.note-item h3 a { text-decoration: none; }
.note-item h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.note-item p { color: var(--ink-2); margin: 0; max-width: 64ch; }
.note-item .hyp-tag { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); }
@media (max-width: 760px) { .note-item { grid-template-columns: 1fr; gap: 6px; } }

/* tableaux de métadonnées (fiche) */
.fiche { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 0 0 8px; }
.fiche th, .fiche td { text-align: left; vertical-align: top; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.fiche th { width: 190px; font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding-right: 20px; padding-top: 14px; }
.fiche tr:first-child th, .fiche tr:first-child td { border-top: 1px solid var(--rule-strong); }
@media (max-width: 600px) {
  .fiche th, .fiche td { display: block; width: auto; border: 0; padding: 0; }
  .fiche th { padding-top: 14px; }
  .fiche td { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
  .fiche tr:first-child th { border-top: 1px solid var(--rule-strong); }
  .fiche tr:first-child td { border-top: 0; }
}

.abstract { background: var(--card); border: 1px solid var(--rule); padding: 28px 32px; margin: 36px 0; }
.abstract .label { display: block; margin-bottom: 12px; }
.abstract p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.55; margin-bottom: .8em; }
.abstract p:last-child { margin-bottom: 0; }
.kw { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kw li { font-family: var(--mono); font-size: 0.74rem; border: 1px solid var(--rule); padding: 3px 9px; background: var(--paper); }

/* hypothèse détaillée */
.hyp-detail { border-top: 1px solid var(--rule-strong); padding: 24px 0 8px; margin-top: 28px; }
.hyp-detail h3 { display: flex; gap: 16px; align-items: baseline; margin-bottom: 14px; font-size: 1.35rem; }
.hyp-detail h3 b { font-style: italic; font-weight: 400; color: var(--accent); }
.hyp-detail dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 20px; margin: 0; font-size: 0.95rem; }
.hyp-detail dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.hyp-detail dd { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .hyp-detail dl { grid-template-columns: 1fr; gap: 2px; } .hyp-detail dd { margin-bottom: 10px; } }

/* plan */
.plan { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.plan > li { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.plan .p-num { font-family: var(--mono); font-size: 0.76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); padding-top: 5px; }
.plan h3 { margin-bottom: 8px; }
.plan ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 600px) { .plan > li { grid-template-columns: 1fr; gap: 4px; } }

/* équation */
.eq { font-family: var(--serif); font-size: 1.35rem; text-align: center; padding: 26px 16px; margin: 28px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); overflow-x: auto; white-space: nowrap; position: relative; }
.eq i { font-style: italic; }
.eq sub, .eq sup { font-size: 0.65em; }
.eq .eq-n { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); }
@media (max-width: 600px) { .eq .eq-n { position: static; display: block; transform: none; margin-top: 8px; } }

/* références */
.refs { list-style: none; padding: 0; margin: 0; counter-reset: r; font-size: 0.9rem; }
.refs li { counter-increment: r; display: grid; grid-template-columns: 44px 1fr; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); line-height: 1.55; }
.refs li::before { content: "[" counter(r) "]"; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); padding-top: 2px; }
.refs i { color: var(--ink); }
sup.cite { font-family: var(--mono); font-size: 0.68em; color: var(--accent); }
sup.cite a { text-decoration: none; }

/* citation bibtex */
.cite-box { border: 1px solid var(--rule); background: var(--card); margin-top: 24px; }
.cite-box header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.cite-box pre { margin: 0; padding: 16px; font: 0.8rem/1.6 var(--mono); overflow-x: auto; color: var(--ink-2); }
.copy { background: none; border: 1px solid var(--rule); color: var(--ink); font: 500 0.7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; cursor: pointer; }
.copy:hover { border-color: var(--ink); }

/* article (note) */
.article-head { padding: 64px 0 36px; border-bottom: 1px solid var(--rule); }
.article-head .label { display: block; margin-bottom: 22px; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 22ch; margin-bottom: 22px; }
.article-head .lead { max-width: 44ch; color: var(--ink-2); }
.article { padding: 52px 0 80px; }
.article .prose { font-family: var(--serif); font-size: 1.2rem; line-height: 1.62; margin: 0 auto; max-width: 680px; }
.article .prose h2 { font-size: 1.6rem; }
.article .prose ul, .article .prose ol { font-size: 1.12rem; }
.article aside.box { font-family: var(--sans); font-size: 0.95rem; background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--accent); padding: 18px 22px; margin: 32px 0; }
.article aside.box .label { display: block; margin-bottom: 8px; }
.article aside.box p:last-child { margin-bottom: 0; }
.article .refs-wrap { max-width: 680px; margin: 48px auto 0; }
.article .refs-wrap h2 { font-family: var(--mono); font-size: 0.76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.byline { display: flex; gap: 14px; align-items: center; margin-top: 28px; font-size: 0.9rem; color: var(--ink-2); }
.byline .mono { font-family: var(--mono); font-size: 0.78rem; }

.breadcrumb { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 22px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.breadcrumb a { text-decoration: none; }

.page-head { padding: 64px 0 44px; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); max-width: 20ch; margin-bottom: 20px; }
.page-head .lead { max-width: 46ch; color: var(--ink-2); }

/* parcours */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule-strong); }
.timeline li { position: relative; padding: 0 0 34px 30px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 9px; width: 9px; height: 9px; background: var(--paper); border: 1px solid var(--ink); border-radius: 50%; }
.timeline li.now::before { background: var(--accent); border-color: var(--accent); }
.timeline .label { display: block; margin-bottom: 6px; }
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: var(--ink-2); margin: 0; max-width: 60ch; }

/* glossaire */
.gloss { margin: 0; border-top: 1px solid var(--rule-strong); }
.gloss > div { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.gloss dt { font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; }
.gloss dt small { display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); letter-spacing: .05em; margin-top: 6px; }
.gloss dd { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .gloss > div { grid-template-columns: 1fr; gap: 8px; } }

/* contact */
.contact-block { border-top: 1px solid var(--rule-strong); padding-top: 22px; }
.contact-block .big { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 2rem); word-break: break-word; }

/* pied de page */
.site-footer { padding: 56px 0 40px; font-size: 0.88rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 6px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-name { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin-bottom: 8px; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .actions, .copy { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 24px 0; border: 0; }
}
