:root {
  --bg: #ffffff;
  --ink: #000000;
  --rule: #e6e6e6;
  --serif: "Marcellus", Georgia, serif;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; border-radius: 0 !important; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #000; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
html { scrollbar-width: thin; scrollbar-color: #000 transparent; scroll-behavior: smooth; }

html, body {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><line x1='4' y1='18' x2='18' y2='4' stroke='black' stroke-width='1.2' stroke-linecap='round'/></svg>") 18 4, auto;
}
a, button {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><line x1='4' y1='24' x2='24' y2='4' stroke='black' stroke-width='1.4' stroke-linecap='round'/></svg>") 24 4, pointer;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.5; }

body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
}
nav a {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
nav .logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

.piece {
  max-width: 760px;
  margin: 4rem auto 6rem;
  padding: 0 3rem;
}
.piece .meta {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.piece h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
}
.piece .lede {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.45;
  margin-bottom: 3rem;
  font-weight: 400;
}
.piece .body p {
  margin-bottom: 1.4rem;
  font-size: 1rem;
  line-height: 1.75;
}
.piece .body ul {
  list-style: none;
  margin: 2rem 0 2.5rem;
  padding: 0;
}
.piece .body ul li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.75;
}
.piece .body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 1.5rem;
  border-top: 1px solid var(--ink);
}
.piece .body ul + p {
  margin-top: 0.5rem;
}
.piece .body blockquote {
  margin: 2.5rem 0;
  padding-left: 2rem;
  border-left: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 300;
}
.piece .body blockquote p { margin-bottom: 1rem; font-size: 1.05rem; line-height: 1.65; }

/* Sous-titre d'un article (titre original sous le h1 générique) */
.piece .article-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 400;
  margin-top: -1.2rem;
  margin-bottom: 2rem;
  color: var(--ink);
}

/* Lien vers article source (en bas de chaque article dans une compilation) */
.piece .body .article-source {
  margin-top: 1.8rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.piece .body .article-source a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
}
.piece .body .article-source a:hover {
  border-bottom-color: var(--ink);
}

/* Labels et sous-titres pour les extraits */
.piece .body .extract-label {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
  margin: 2.5rem 0 1rem;
  color: var(--ink);
}
.piece .body .extract-subhead {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  margin: 1.8rem 0 0.6rem;
  color: var(--ink);
  font-weight: 400;
}
.piece .body .extract-subsubhead {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin: 1.2rem 0 0.4rem;
  color: var(--ink);
  font-weight: 400;
  opacity: 0.75;
}
.piece .body .extract-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin: 2.5rem 0 1.2rem;
  color: var(--ink);
}

/* Stat avec source au survol */
.piece .body .stat {
  position: relative;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
  cursor: help;
}
.piece .body .stat .src {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 0.4rem;
  background: #000;
  color: #fff;
  padding: 0.7rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.45;
  max-width: 340px;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease 0.08s;
  z-index: 10;
}
.piece .body .stat .src a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.piece .body .stat:hover .src,
.piece .body .stat:focus-within .src {
  opacity: 1;
  pointer-events: auto;
}
.piece h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin: 3rem 0 1.5rem;
}

/* Sections repliables */
.piece details {
  border-top: 1px solid var(--rule);
  padding-top: 1.8rem;
  margin-top: 1.8rem;
}
.piece details:first-of-type {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
}
.piece details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  transition: opacity 0.2s ease;
}
.piece details[open] > summary {
  padding-bottom: 1rem;
}
.piece details > summary:hover { opacity: 0.65; }
.piece details > summary::-webkit-details-marker { display: none; }
.piece details > summary::after {
  content: '+';
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 300;
  margin-left: 1.5rem;
  transition: transform 0.3s ease;
  line-height: 1;
}
.piece details[open] > summary::after {
  transform: rotate(45deg);
}
.piece details > *:not(summary) {
  margin-top: 1.2rem;
}
.piece details[open] {
  padding-bottom: 1.5rem;
}
/* Divider de fin quand un dropdown est suivi d'un contenu non-dropdown */
.piece details:has(+ :not(details)) {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.8rem;
  margin-bottom: 2.5rem;
}
.piece .source {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.piece .source a { color: var(--ink); }

footer.contact {
  text-align: center;
  padding: 4rem 3rem;
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
}
footer.contact .footer-email {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: #000;
  text-decoration: none;
  margin-bottom: 2.5rem;
}
footer.contact .footer-email:hover { opacity: 0.6; }
footer.contact .footer-motif {
  display: block;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
}
footer.contact .footer-motif .squares rect {
  fill: none;
  stroke: #000;
  stroke-width: 0.04;
  opacity: 0.3;
}
footer.contact .footer-motif .spiral {
  fill: none;
  stroke: #000;
  stroke-width: 0.08;
  stroke-linecap: round;
  stroke-linejoin: round;
}
footer.contact .citation {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: #000;
  max-width: 400px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
footer.contact .citation-source {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  color: #000;
}
footer.contact .place {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 1.2rem;
  font-weight: 300;
}
footer.contact .contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 300;
}
footer.contact .contact-links a {
  color: #999;
  text-decoration: none;
}
footer.contact .contact-links a:hover { opacity: 0.6; }
footer.contact .credit {
  margin-top: 3rem;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #bbb;
  font-weight: 300;
}

@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .piece { padding: 0 1.5rem; margin: 2rem auto 4rem; }
}
