:root{
  --ink:#111a2b;
  --ink-2:#1b273c;
  --stone:#eeece4;
  --stone-hi:#f6f4ee;
  --line:#d9d5c8;
  --line-dark:#2b3752;
  --brass:#a97c3f;
  --brass-hi:#c79a5c;
  --red:#a53b2e;
  --blue:#2b5878;
  --green:#3c6a4e;
  --teal:#1f7469;
  --ink-soft: rgba(17,26,43,.66);
  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", monospace;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--stone);
  color:var(--ink);
  font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;}
img{max-width:100%;display:block;}

/* ============ TOPBAR (all pages) ============ */
.topbar{
  background:var(--ink);
  color:#f4f1e8;
}
.topbar-inner{
  max-width:1180px;
  margin:0 auto;
  padding:22px 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.wordmark{
  font-family:var(--serif);
  font-weight:600;
  font-size:19px;
  letter-spacing:.02em;
  display:flex;
  align-items:center;
  gap:9px;
  text-decoration:none;
  color:#f4f1e8;
}
.wordmark .mark{
  width:24px;height:24px;
  border:1.5px solid var(--brass-hi);
  border-radius:50%;
  position:relative;
  flex-shrink:0;
}
.wordmark .mark::before{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:50%;
  background:var(--brass-hi);
  opacity:.85;
}
.wordmark .mark::after{
  content:"";
  position:absolute;
  left:50%;top:-4px;
  width:1px;height:7px;
  background:var(--brass-hi);
  transform:translateX(-50%);
}
.topbar-nav{
  display:flex;
  gap:26px;
  font-size:13.5px;
  letter-spacing:.02em;
  color:rgba(244,241,232,.7);
}
.topbar-nav a{text-decoration:none;transition:color .15s;}
.topbar-nav a:hover{color:#f4f1e8;}
@media (max-width:700px){ .topbar-nav{display:none;} }

/* ============ HERO (index only) ============ */
.hero{
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(169,124,63,.16), transparent 60%),
    linear-gradient(180deg, rgba(17,26,43,.94) 0%, rgba(27,39,60,.96) 100%),
    var(--hero-img, none);
  background-size:auto, auto, cover;
  background-position:center, center, center 38%;
  background-blend-mode:normal, normal, luminosity;
  color:#f4f1e8;
  position:relative;
  overflow:hidden;
}
.hero-inner{
  max-width:1180px;
  margin:0 auto;
  padding: 8px 32px 64px;
}
.eyebrow{
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--brass-hi);
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:22px;
}
.eyebrow::before{ content:""; width:28px;height:1px; background:var(--brass-hi); }
.hero h1{
  font-family:var(--serif);
  font-weight:500;
  font-size:clamp(34px, 5.6vw, 62px);
  line-height:1.06;
  letter-spacing:-.01em;
  margin:0 0 24px;
  max-width:820px;
}
.hero h1 em{ font-style:italic; font-weight:400; color:var(--brass-hi); }
.hero-sub{
  font-size:16.5px;
  line-height:1.65;
  color:rgba(244,241,232,.78);
  max-width:560px;
  margin:0 0 36px;
}
.hero-actions{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom:56px; }
.btn{
  font-family:var(--sans);
  font-size:14.5px;
  font-weight:600;
  padding:14px 26px;
  border-radius:2px;
  border:1px solid transparent;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:all .15s ease;
}
.btn-primary{ background:var(--brass-hi); color:var(--ink); }
.btn-primary:hover{ background:#d7ac6f; }
.btn-ghost{ border-color:rgba(244,241,232,.3); color:#f4f1e8; background:transparent; }
.btn-ghost:hover{ border-color:rgba(244,241,232,.7); }

.hero-stats{ display:grid; grid-template-columns:repeat(4,1fr); border-top:1px solid var(--line-dark); }
.hero-stat{ padding:24px 22px 4px 0; border-right:1px solid var(--line-dark); }
.hero-stat:last-child{ border-right:none; padding-right:0; }
.hero-stat .num{ font-family:var(--serif); font-size:34px; font-weight:500; color:var(--brass-hi); line-height:1; margin-bottom:8px; }
.hero-stat .label{ font-size:12.5px; color:rgba(244,241,232,.62); line-height:1.4; }
@media (max-width:760px){
  .hero-stats{ grid-template-columns:repeat(2,1fr); row-gap:22px; }
  .hero-stat:nth-child(2){ border-right:none; }
}

/* ============ TOOLBAR / FILTERS (index) ============ */
.toolbar{
  position:sticky; top:0; z-index:40;
  background:var(--stone-hi);
  border-bottom:1px solid var(--line);
  padding:16px 32px;
}
.toolbar-inner{ max-width:1180px; margin:0 auto; display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.search-wrap{ position:relative; flex:1; min-width:220px; }
.search-wrap input{
  width:100%; font-family:var(--sans); font-size:14.5px;
  padding:11px 14px 11px 38px; border:1px solid var(--line); border-radius:2px; background:#fff; color:var(--ink);
}
.search-wrap input:focus{ outline:2px solid var(--brass); outline-offset:-1px; }
.search-wrap svg{ position:absolute; left:12px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--ink-soft); pointer-events:none; }
.cat-filters{ display:flex; gap:8px; flex-wrap:wrap; }
.cat-pill{
  font-family:var(--mono); font-size:12px; letter-spacing:.02em; padding:9px 14px; border-radius:2px;
  border:1px solid var(--line); background:#fff; cursor:pointer; color:var(--ink-soft); white-space:nowrap; transition:all .12s;
  text-decoration:none; display:inline-flex; align-items:center;
}
.cat-pill:hover{ border-color:var(--ink-soft); }
.cat-pill.active{ background:var(--ink); border-color:var(--ink); color:#f4f1e8; }
.cat-pill .dot{ display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:7px; }

/* ============ CATALOGUE LIST ============ */
.catalogue{ max-width:1180px; margin:0 auto; padding:52px 32px 100px; }
.cat-section{ margin-bottom:56px; }
.cat-section:last-child{ margin-bottom:0; }
.cat-banner{
  height:150px;
  background-size:cover;
  background-position:center;
  position:relative;
  overflow:hidden;
  margin-bottom:22px;
}
.cat-banner::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(100deg, rgba(17,26,43,.82) 0%, rgba(17,26,43,.35) 55%, rgba(17,26,43,.15) 100%);
}
.cat-banner-label{
  position:absolute;
  left:24px; bottom:16px;
  z-index:2;
  font-family:var(--mono);
  font-size:11.5px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#f4f1e8;
  display:flex;
  align-items:center;
  gap:9px;
}
.cat-banner-label .sw{ width:9px;height:9px;border-radius:50%; }
.cat-heading{ display:flex; align-items:baseline; gap:16px; margin-bottom:6px; padding-bottom:14px; border-bottom:2px solid var(--ink); }
.cat-heading h2{ font-family:var(--serif); font-weight:500; font-size:24px; margin:0; }
.cat-heading .count{ font-family:var(--mono); font-size:13px; color:var(--ink-soft); }
.cat-desc{ font-size:14px; color:var(--ink-soft); margin:14px 0 26px; max-width:640px; line-height:1.6; }

.article-list{ display:flex; flex-direction:column; }
.article-row{
  display:grid; grid-template-columns:56px 1fr auto; gap:20px; align-items:start;
  padding:19px 4px; border-bottom:1px solid var(--line); text-decoration:none; color:inherit; transition:background .12s;
}
.article-row:hover{ background:rgba(169,124,63,.07); }
.article-row:hover .art-title{ color:var(--brass); }
.art-num{ font-family:var(--mono); font-size:12px; color:var(--ink-soft); padding-top:3px; }
.art-body .art-title{ font-family:var(--serif); font-size:18.5px; font-weight:500; margin:0 0 8px; transition:color .12s; line-height:1.3; }
.art-meta{ display:flex; gap:16px; flex-wrap:wrap; font-size:13px; color:var(--ink-soft); }
.art-meta span{ display:flex; align-items:center; gap:6px; }
.art-meta svg{ width:13px; height:13px; flex-shrink:0; }
.art-side{ text-align:right; display:flex; flex-direction:column; align-items:flex-end; gap:8px; padding-top:3px; }
.duree-badge{ font-family:var(--mono); font-size:12px; padding:4px 9px; border-radius:2px; white-space:nowrap; }
.arrow{ width:16px; height:16px; color:var(--ink-soft); transition:transform .15s; }
.article-row:hover .arrow{ transform:translateX(3px); color:var(--brass); }
.empty-state{ padding:60px 20px; text-align:center; color:var(--ink-soft); font-size:15px; display:none; }
@media (max-width:640px){ .article-row{ grid-template-columns:28px 1fr; } .art-side{ grid-column:1 / -1; flex-direction:row; justify-content:space-between; align-items:center; padding-top:8px; } }

/* ============ FORMATION DETAIL PAGE ============ */
.breadcrumb{
  max-width:1180px; margin:0 auto; padding:20px 32px 0;
  font-family:var(--mono); font-size:12.5px; color:var(--ink-soft);
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
}
.breadcrumb a{ text-decoration:none; color:var(--ink-soft); }
.breadcrumb a:hover{ color:var(--brass); }

.detail-hero{
  background:
    linear-gradient(160deg, rgba(17,26,43,.93) 10%, var(--cat-tint, rgba(17,26,43,.8)) 100%),
    var(--hero-img, none);
  background-size:auto, cover;
  background-position:center, center 40%;
  background-blend-mode:normal, luminosity;
  color:#f4f1e8;
  margin-top:20px;
}
.detail-hero-inner{ max-width:1180px; margin:0 auto; padding:36px 32px 40px; }
.panel-cat{
  font-family:var(--mono); font-size:11.5px; letter-spacing:.1em; text-transform:uppercase;
  padding:6px 11px; border-radius:2px; display:inline-block; margin-bottom:20px;
}
.detail-hero h1{
  font-family:var(--serif); font-weight:500; font-size:clamp(28px,4vw,42px); line-height:1.15; margin:0 0 28px; max-width:720px;
}
.panel-facts{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px 28px; font-size:13.5px; border-top:1px solid var(--line-dark); padding-top:24px; }
.panel-facts dt{ font-family:var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:rgba(244,241,232,.5); margin-bottom:5px; }
.panel-facts dd{ margin:0; color:rgba(244,241,232,.92); line-height:1.45; }
@media (max-width:760px){ .panel-facts{ grid-template-columns:repeat(2,1fr); } }

.detail-body{ max-width:1180px; margin:0 auto; padding:48px 32px 40px; display:grid; grid-template-columns:1fr 300px; gap:56px; }
@media (max-width:900px){ .detail-body{ grid-template-columns:1fr; } }

.panel-section{ margin-bottom:40px; }
.panel-section:last-child{ margin-bottom:0; }
.panel-section h2{
  font-family:var(--mono); font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--brass);
  margin:0 0 18px; display:flex; align-items:center; gap:10px;
}
.panel-section h2::after{ content:""; flex:1; height:1px; background:var(--line); }
.obj-list{ margin:0; padding:0; list-style:none; }
.obj-list li{ padding:11px 0 11px 26px; border-bottom:1px solid var(--line); position:relative; font-size:15px; line-height:1.55; }
.obj-list li:first-child{ padding-top:0; }
.obj-list li:last-child{ border-bottom:none; }
.obj-list li::before{ content:"✓"; position:absolute; left:0; top:10px; color:var(--brass); font-size:13px; font-weight:700; }

.prog-section{ margin-bottom:24px; }
.prog-section-head{ display:flex; align-items:baseline; gap:12px; margin-bottom:10px; }
.prog-num{ font-family:var(--serif); font-size:21px; font-weight:500; color:var(--brass); min-width:28px; }
.prog-title{ font-family:var(--serif); font-weight:500; font-size:17px; }
.prog-items{ margin:0 0 0 40px; padding:0; list-style:none; }
.prog-items li{ font-size:14.5px; line-height:1.65; color:var(--ink-soft); padding:4px 0 4px 16px; position:relative; }
.prog-items li::before{ content:"—"; position:absolute; left:0; color:var(--line); }

.method-tags{ display:flex; flex-wrap:wrap; gap:10px; }
.method-tag{ font-size:13.5px; padding:9px 14px; background:#fff; border:1px solid var(--line); border-radius:2px; line-height:1.4; }

/* sidebar */
.sidebar{ position:sticky; top:24px; align-self:start; }
.side-card{ background:#fff; border:1px solid var(--line); padding:26px; margin-bottom:20px; }
.side-card h3{ font-family:var(--serif); font-size:16px; font-weight:500; margin:0 0 14px; }
.side-card .cta{ width:100%; text-align:center; justify-content:center; }
.side-fact{ display:flex; justify-content:space-between; font-size:13.5px; padding:9px 0; border-bottom:1px solid var(--line); }
.side-fact:last-child{ border-bottom:none; }
.side-fact span:first-child{ color:var(--ink-soft); }
.related-list{ list-style:none; margin:0; padding:0; }
.related-list li{ border-bottom:1px solid var(--line); }
.related-list li:last-child{ border-bottom:none; }
.related-list a{ display:block; padding:12px 0; text-decoration:none; font-size:14px; line-height:1.4; color:var(--ink); transition:color .12s; }
.related-list a:hover{ color:var(--brass); }

/* ============ FOOTER ============ */
footer{ background:var(--ink); color:rgba(244,241,232,.65); padding:56px 32px 32px; }
.footer-inner{ max-width:1180px; margin:0 auto; }
.footer-top{ display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap; padding-bottom:36px; border-bottom:1px solid var(--line-dark); margin-bottom:24px; }
.footer-brand .wordmark{ color:#f4f1e8; margin-bottom:14px; }
.footer-brand p{ font-size:13.5px; max-width:320px; line-height:1.6; }
.footer-cols{ display:flex; gap:64px; flex-wrap:wrap; }
.footer-col h4{ font-family:var(--mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:rgba(244,241,232,.4); margin:0 0 14px; }
.footer-col div{ font-size:13.5px; line-height:2; }
.footer-col a{ text-decoration:none; color:inherit; }
.footer-col a:hover{ color:#f4f1e8; }
.footer-bottom{ display:flex; justify-content:space-between; font-size:12.5px; color:rgba(244,241,232,.4); flex-wrap:wrap; gap:10px; }

@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }
