:root {
  --ink:        #2a241c;
  --navy:       #001b4c;   /* repris du template Joomla Cassiopeia */
  --gold:       #a07a14;
  --gold-soft:  #d8b24a;
  --paper:      #f7f2e7;   /* parchemin */
  --paper-deep: #efe7d4;
  --rule:       #d8cdb2;
  --link:       #7a3a12;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.16rem;
  line-height: 1.7;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 2px solid var(--rule);
  background: var(--paper-deep);
}
.site-header .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding: 1rem 1.5rem;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 150px; width: auto; display: block; max-width: 100%; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.1rem;
  justify-content: flex-start;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active { border-bottom-color: var(--gold); color: var(--navy); }

/* ---------- Sub-nav (documentation) ---------- */
.subnav {
  background: var(--navy);
  color: #e9e2cf;
}
.subnav .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem 1rem;
  padding-top: .55rem;
  padding-bottom: .55rem;
}
.subnav-label {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .7;
}
.subnav a {
  color: #e9e2cf;
  text-decoration: none;
  font-size: .95rem;
  border-bottom: 1px solid transparent;
}
.subnav a:hover, .subnav a.active { border-bottom-color: var(--gold-soft); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}
.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 .5rem;
  color: var(--navy);
}
.hero .lead {
  font-style: italic;
  font-size: 1.2rem;
  color: #5a503c;
  margin: 0 auto;
  max-width: 44ch;
}
.hero--section { padding: 2.4rem 0 1.4rem; }
.hero--section h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.section-intro { color: #5a503c; font-style: italic; }

/* ---------- Content ---------- */
.content { padding: 2.4rem 0 3rem; }
.content--home { padding-top: 2.2rem; }
.content h2, .article-body h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--navy);
  margin: 1.8rem 0 .7rem;
}
.content h3, .article-body h3 {
  font-family: "Cormorant Garamond", serif;
  color: var(--navy);
  font-size: 1.35rem;
  margin: 1.4rem 0 .5rem;
}
.content p, .article-body p { margin: 0 0 1.05rem; }
.content a, .article-body a, .breadcrumb a, .back a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--gold-soft);
}
.article-body img { margin: .6rem 0; border: 1px solid var(--rule); background:#fff; }
.article-body table { border-collapse: collapse; margin: 1rem 0; max-width:100%; }
.article-body td, .article-body th { border: 1px solid var(--rule); padding: .4rem .6rem; }

/* ---------- Article index (section list) ---------- */
.article-index { list-style: none; margin: 2rem 0; padding: 0; }
.article-index li {
  border-bottom: 1px solid var(--rule);
}
.article-link {
  display: block;
  padding: .85rem .4rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: var(--navy);
  text-decoration: none;
}
.article-link::before { content: "❧ "; color: var(--gold); }
.article-link:hover { background: var(--paper-deep); color: var(--link); }
.empty { font-style: italic; color: #8a7d5f; padding: 2rem 0; }

/* ---------- Single article ---------- */
.content--single { padding: 2rem 0 3rem; }
.breadcrumb { font-size: .9rem; margin: 0 0 .3rem; }
.article-heading {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: var(--navy);
  margin: 0 0 1.4rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--rule);
}
.back { margin-top: 2.4rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--rule);
  background: var(--paper-deep);
  padding: 1.6rem 0;
  margin-top: 2rem;
}
.site-footer p { margin: 0; font-size: .9rem; color: #6b6149; text-align: center; }

@media (max-width: 600px) {
  .site-header .wrap { justify-content: center; }
  .site-nav { justify-content: center; }
}

/* ---------- Home tiles ---------- */
.intro-accroche {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--navy);
  text-align: center;
  margin: 0 0 1.4rem;
}
.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.4rem;
  margin: 2.4rem 0 1rem;
}
.home-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--navy);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  transition: transform .12s ease, box-shadow .12s ease;
}
.home-tile:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.home-tile img { width: 100%; height: 150px; object-fit: cover; display: block; }
.home-tile span {
  padding: .7rem .8rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
}

/* ---------- Grand logo en accueil ---------- */
.hero--home { padding-top: 2.6rem; }
.hero-logo {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto 1.2rem;
}
