/* ==========================================================================
   WUDEMEN — refonte 2026
   Palette pourpre taoïste (sceau #990081), typographie lettrée EB Garamond
   ========================================================================== */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --pourpre: #990081;
  --pourpre-fonce: #6b0359;
  --pourpre-pale: #f6ecf3;
  --encre: #2b2430;
  --encre-douce: #6b5f70;
  --papier: #faf7f3;
  --papier-doux: #f2ebe9;
  --filet: #e4d8de;
  --serif: "EB Garamond", "Noto Serif SC", "Songti SC", Georgia, serif;
  --cjk: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pourpre: #d466bd;
    --pourpre-fonce: #e79cd6;
    --pourpre-pale: #2c1c29;
    --encre: #e9e1e6;
    --encre-douce: #ab9daa;
    --papier: #1a121c;
    --papier-doux: #241a26;
    --filet: #3a2c3a;
  }
}

* { box-sizing: border-box; }

html { font-size: 112.5%; /* 18px */ scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  background: var(--papier);
  color: var(--encre);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cjk { font-family: var(--cjk); }

/* ---------- header / nav ------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--filet);
  background: var(--papier);
}
.header-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--encre);
  margin-right: auto;
}
.brand img { height: 44px; width: auto; }
.brand-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.brand-name .cjk {
  font-weight: 400;
  color: var(--encre-douce);
  margin-left: 0.35rem;
  font-size: 1.1rem;
}

.nav-check, .nav-burger { display: none; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.35rem;
  margin: 0; padding: 0;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--encre);
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover { color: var(--pourpre); }
.site-nav a[aria-current="page"] {
  color: var(--pourpre);
  border-bottom-color: var(--pourpre);
}
.nav-lang {
  font-size: 0.9rem !important;
  color: var(--encre-douce) !important;
  border: 1px solid var(--filet) !important;
  border-radius: 3px;
  padding: 0.1rem 0.45rem !important;
}
.nav-lang:hover { border-color: var(--pourpre) !important; }

@media (max-width: 800px) {
  .nav-burger {
    display: block;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    color: var(--pourpre);
    user-select: none;
  }
  .site-nav { display: none; width: 100%; }
  .nav-check:checked ~ .site-nav { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.4rem 0 0.8rem;
  }
  .site-nav li { width: 100%; border-top: 1px solid var(--filet); }
  .site-nav a { display: block; padding: 0.55rem 0.2rem; border-bottom: none; }
  .nav-lang { display: inline-block; margin-top: 0.4rem; border: none !important; padding-left: 0.2rem !important; }
}

/* ---------- structure --------------------------------------------------- */

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2.2rem 1.2rem 3.5rem;
}
.lecture { max-width: 42rem; margin-left: auto; margin-right: auto; }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--encre);
}
h1 { font-size: 2rem; margin: 0 0 1.2rem; }
h2 {
  font-size: 1.45rem;
  margin: 2.4rem 0 0.9rem;
  color: var(--pourpre-fonce);
}
h3 { font-size: 1.15rem; margin: 1.8rem 0 0.6rem; }

h1::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 3px;
  margin-top: 0.7rem;
  background: var(--pourpre);
}
.centre h1::after { margin-left: auto; margin-right: auto; }

p { margin: 0 0 1.1rem; }
li { margin-bottom: 0.35rem; }
a { color: var(--pourpre); }
a:hover { color: var(--pourpre-fonce); }
blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid var(--pourpre);
  color: var(--encre-douce);
  font-style: italic;
}
hr {
  border: none;
  border-top: 1px solid var(--filet);
  margin: 2.5rem auto;
  width: 60%;
}
img { max-width: 100%; height: auto; }
figure { margin: 1.8rem 0; text-align: center; }
figcaption {
  font-size: 0.85rem;
  color: var(--encre-douce);
  font-style: italic;
  margin-top: 0.5rem;
}

.chapo {
  font-style: italic;
  font-size: 1.12rem;
  color: var(--encre-douce);
  margin-bottom: 2rem;
}

/* ---------- hero (accueil) ---------------------------------------------- */

.hero {
  text-align: center;
  padding: 3rem 1rem 2.2rem;
}
.hero img.sceau {
  width: 200px;
  max-width: 55vw;
  margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: 2.6rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.hero h1::after { display: none; }
.hero .hero-cjk {
  font-family: var(--cjk);
  font-size: 1.7rem;
  color: var(--pourpre);
  letter-spacing: 0.35em;
  margin: 0.2rem 0 1rem;
}
.hero .tagline {
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}
.hero .tagline-en {
  font-style: italic;
  color: var(--encre-douce);
  margin-bottom: 0;
}

.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin: 2.6rem 0 1rem;
}
.carte {
  display: block;
  text-decoration: none;
  color: var(--encre);
  background: var(--papier-doux);
  border: 1px solid var(--filet);
  border-top: 3px solid var(--pourpre);
  border-radius: 4px;
  padding: 1.3rem 1.2rem 1.1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.carte:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(80, 0, 66, 0.12);
  color: var(--encre);
}
.carte h3 { margin: 0 0 0.4rem; color: var(--pourpre-fonce); }
.carte p { margin: 0; font-size: 0.95rem; color: var(--encre-douce); }

/* ---------- listes de carnets ------------------------------------------- */

.carnet-liste { list-style: none; padding: 0; margin: 2rem 0 0; }
.carnet-liste li {
  border-top: 1px solid var(--filet);
  padding: 1.1rem 0.2rem;
  margin: 0;
}
.carnet-liste li:last-child { border-bottom: 1px solid var(--filet); }
.carnet-titre {
  font-size: 1.18rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--encre);
  display: block;
}
.carnet-titre:hover { color: var(--pourpre); }
.carnet-desc {
  margin: 0.25rem 0 0;
  font-style: italic;
  color: var(--encre-douce);
  font-size: 0.98rem;
}
.carnet-desc .tag {
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--pourpre);
  border: 1px solid var(--pourpre);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.5rem;
  vertical-align: 1px;
  white-space: nowrap;
}

/* ---------- article ----------------------------------------------------- */

.article-head { margin-bottom: 2.2rem; }
.article-head .surtitre {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pourpre);
  margin-bottom: 0.6rem;
}
.article-retour {
  display: inline-block;
  margin-top: 2.8rem;
  font-size: 0.95rem;
}
.sceau-fin {
  display: block;
  width: 74px;
  margin: 2.8rem auto 0;
  opacity: 0.85;
}

/* ---------- figures flottantes ------------------------------------------ */

.fig-droite {
  float: right;
  width: min(260px, 45%);
  margin: 0.3rem 0 1rem 1.4rem;
}
.fig-gauche {
  float: left;
  width: min(260px, 45%);
  margin: 0.3rem 1.4rem 1rem 0;
}
.clear { clear: both; }
@media (max-width: 560px) {
  .fig-droite, .fig-gauche { float: none; width: 100%; margin: 1.2rem 0; }
}

/* ---------- encadrés ---------------------------------------------------- */

.encadre {
  background: var(--pourpre-pale);
  border-left: 3px solid var(--pourpre);
  border-radius: 0 4px 4px 0;
  padding: 1rem 1.2rem;
  margin: 1.8rem 0;
}
.encadre p:last-child { margin-bottom: 0; }

.note-discrete {
  font-size: 0.9rem;
  color: var(--encre-douce);
  font-style: italic;
}

/* ---------- bibliographie ------------------------------------------------ */

.biblio { list-style: none; padding: 0; margin: 1.8rem 0; }
.biblio li {
  margin: 0 0 0.9rem;
  padding-left: 1.4rem;
  text-indent: -1.4rem;
}

/* ---------- bouton ------------------------------------------------------- */

.bouton {
  display: inline-block;
  background: var(--pourpre);
  color: var(--papier) !important;
  padding: 0.55rem 1.3rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.bouton:hover { background: var(--pourpre-fonce); }

/* ---------- footer ------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--filet);
  background: var(--papier-doux);
  margin-top: 2rem;
}
.footer-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.6rem 1.2rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--encre-douce);
}
.footer-inner a { color: var(--encre-douce); }
.footer-inner a:hover { color: var(--pourpre); }
.footer-bloc p { margin: 0 0 0.25rem; }
.footer-sceau { height: 56px; opacity: 0.75; }

/* ---------- impression -------------------------------------------------- */

@media print {
  .site-header, .site-footer, .article-retour { display: none; }
  body { background: #fff; color: #000; }
  main { max-width: 100%; padding: 0; }
}
