/* ============================================================================
   Thème Cepoto — feuille principale
   Éditorial sobre et premium : papier ivoire, titres serif, filets fins.
   Aucune ressource externe (CSP stricte).
   ========================================================================== */

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  --paper:      #FBF9F5;
  --paper-warm: #F4F0E8;
  --surface:    #FFFFFF;
  --ink:        #14120E;
  --ink-2:      #3A352C;
  --ink-soft:   #6B6459;
  --ink-faint:  #9A9285;
  --rule:       #E4DDCF;
  --rule-soft:  #EFEADF;
  --accent:     #A8442A;
  --cat:        var(--accent);

  --header-bg:  #FBF9F5;
  --footer-bg:  #14120E;
  --header-height: 76px;
  --header-position: sticky;

  --font-head: var(--font-heading, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif);
  --font-body: var(--font-body-family, var(--font-body, "Iowan Old Style", Georgia, "Times New Roman", serif));
  --font-ui:   var(--font-heading, ui-sans-serif), system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1200px;
  --measure: 68ch;
  --r: 4px;
  --shadow: 0 1px 2px rgba(20,18,14,.04), 0 8px 28px -18px rgba(20,18,14,.30);
  --shadow-lift: 0 2px 6px rgba(20,18,14,.06), 0 18px 44px -22px rgba(20,18,14,.38);
}

/* Les polices auto-hébergées (onglet Polices) surchargent ces variables. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.18; letter-spacing: -.012em; color: var(--ink); margin: 0 0 .5em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem;
  font-family: var(--font-ui); font-size: .9rem; border-radius: var(--r); text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 1rem; }

/* ── En-tête ──────────────────────────────────────────────────────────────── */
.site-header {
  position: var(--header-position); top: 0; z-index: 100;
  background: color-mix(in srgb, var(--header-bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-height); }

.brand { display: flex; align-items: baseline; gap: .7rem; text-decoration: none; flex: 0 0 auto; }
.brand-logo { max-height: 40px; width: auto; }
.brand:has(.brand-logo) .brand-tag { display: none; }
.brand-word {
  font-family: var(--font-head); font-weight: 700; font-size: 1.6rem;
  letter-spacing: -.035em; color: var(--ink); line-height: 1;
}
.brand-dot { color: var(--accent); }
.brand-tag {
  font-family: var(--font-ui); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); white-space: nowrap;
}

.site-nav { margin-left: auto; min-width: 0; }
.site-nav ul { flex-wrap: nowrap; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: .5rem .7rem; white-space: nowrap; text-decoration: none;
  font-family: var(--font-ui); font-size: .875rem; font-weight: 500; letter-spacing: .01em;
  color: var(--ink-2); border-radius: var(--r); transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--paper-warm); color: var(--ink); }
.site-nav li.active > a { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.header-search { display: flex; align-items: center; gap: .25rem; flex: 0 0 auto; }
.header-search input {
  width: 132px; padding: .45rem .7rem; font: inherit; font-family: var(--font-ui); font-size: .85rem;
  color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  transition: width .2s, border-color .15s;
}
.header-search input:focus { width: 200px; outline: none; border-color: var(--accent); }
.header-search button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--ink-soft); }
.header-search button:hover { color: var(--accent); }
.header-search svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; width: 40px; height: 40px; padding: 10px 8px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-scrim { position: fixed; inset: 0; background: rgba(20,18,14,.42); z-index: 90; }

/* ── Fil d'Ariane ─────────────────────────────────────────────────────────── */
.breadcrumb-bar { border-bottom: 1px solid var(--rule-soft); background: var(--paper); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: .8rem 0; font-family: var(--font-ui); font-size: .78rem; color: var(--ink-faint); }
.breadcrumb li + li::before { content: "›"; margin-right: .45rem; color: var(--rule); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--ink-2); }

/* ── Accueil ──────────────────────────────────────────────────────────────── */
.hero { border-bottom: 1px solid var(--rule); background: linear-gradient(180deg, var(--paper-warm), var(--paper)); }
.hero-inner { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); max-width: 46rem; }
.hero-kicker { margin: 0 0 1rem; font-family: var(--font-ui); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.hero-title { font-size: clamp(2.2rem, 5.4vw, 3.7rem); margin: 0 0 1rem; text-wrap: balance; }
.hero-lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); margin: 0 0 2rem; max-width: 38rem; }
.hero-cats { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.hero-cats a {
  display: inline-block; padding: .38rem .85rem; text-decoration: none;
  font-family: var(--font-ui); font-size: .8rem; font-weight: 500;
  color: var(--cat); border: 1px solid color-mix(in srgb, var(--cat) 26%, transparent);
  border-radius: 999px; background: color-mix(in srgb, var(--cat) 5%, var(--surface));
  transition: background .15s, color .15s;
}
.hero-cats a:hover { background: var(--cat); color: #fff; border-color: var(--cat); }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; }
.section:last-of-type { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-title {
  display: flex; align-items: center; gap: 1.25rem;
  font-family: var(--font-ui); font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 2rem;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section-more { margin: 2.25rem 0 0; text-align: center; }

.btn {
  display: inline-block; padding: .7rem 1.6rem; text-decoration: none;
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600; letter-spacing: .03em;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r);
  cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }

/* ── Grilles et cartes ────────────────────────────────────────────────────── */
.grid { display: grid; gap: 2rem 1.75rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-lead { grid-template-columns: 1fr; }
.grid-cats { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.card { display: flex; flex-direction: column; }
.card-media {
  display: block; aspect-ratio: 1200 / 630; overflow: hidden; border-radius: var(--r);
  background: color-mix(in srgb, var(--cat) 8%, var(--paper-warm));
  border: 1px solid var(--rule-soft);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.card:hover .card-media img { transform: scale(1.035); }
.card-media-fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: var(--font-head); font-size: 3rem; color: color-mix(in srgb, var(--cat) 45%, transparent);
}
.card-body { padding-top: 1.1rem; }
.chip {
  display: inline-block; margin-bottom: .6rem; text-decoration: none;
  font-family: var(--font-ui); font-size: .68rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--cat);
}
.chip:hover { text-decoration: underline; }
.card-title { text-wrap: balance; font-size: 1.22rem; line-height: 1.28; margin: 0 0 .55rem; }
.card-title a { text-decoration: none; background-image: linear-gradient(var(--cat), var(--cat)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .3s; }
.card:hover .card-title a { background-size: 100% 1px; }
.card-excerpt { margin: 0 0 .8rem; font-size: .94rem; line-height: 1.6; color: var(--ink-soft); }
.card-meta { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-family: var(--font-ui); font-size: .74rem; color: var(--ink-faint); }

.card-lead { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: center; }
.card-lead .card-media { aspect-ratio: 1200 / 630; }
.card-lead .card-body { padding-top: 0; }
.card-lead .card-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.card-lead .card-excerpt { font-size: 1.02rem; }

.cat-card {
  display: block; padding: 1.6rem 1.5rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  border-top: 3px solid var(--cat);
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.cat-card h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.cat-card p { margin: 0 0 1rem; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.cat-count { font-family: var(--font-ui); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cat); }

.rubriques { margin-top: clamp(3rem, 7vw, 5rem); padding: clamp(3rem, 7vw, 5rem) 0; background: var(--paper-warm); border-block: 1px solid var(--rule); }

/* ── Mise en page article / page ──────────────────────────────────────────── */
.layout-with-side {
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 4rem;
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 7vw, 5rem);
  align-items: start;
}
.col-main { min-width: 0; }

.entry-head { margin-bottom: 2rem; }
.entry-title { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin: 0 0 .7rem; max-width: 24ch; text-wrap: balance; }
.entry-lede { font-size: 1.15rem; line-height: 1.6; color: var(--ink-soft); margin: 0 0 1.2rem; max-width: 50ch; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding-top: 1rem; border-top: 1px solid var(--rule); font-family: var(--font-ui); font-size: .78rem; color: var(--ink-faint); }
.entry-meta .by { color: var(--ink-soft); }
.entry-media { margin: 0 0 2.5rem; }
.entry-media img { width: 100%; border-radius: var(--r); border: 1px solid var(--rule-soft); }

/* ── Corps rédactionnel ───────────────────────────────────────────────────── */
.prose { max-width: var(--measure); font-size: 1.09rem; line-height: 1.78; color: var(--ink-2); }
.prose > * + * { margin-top: 1.3em; }
.prose p { margin: 0; }
.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-top: 2.4em; margin-bottom: .1em;
  padding-top: .9em; border-top: 1px solid var(--rule-soft); color: var(--ink);
}
.prose h2 + * { margin-top: .8em; }
.prose h3 { font-size: 1.28rem; margin-top: 1.9em; margin-bottom: .1em; color: var(--ink); }
.prose h3 + * { margin-top: .6em; }
.prose h4 { font-size: 1.08rem; margin-top: 1.6em; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose em { font-style: italic; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--cat) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.prose a:hover { color: var(--cat); text-decoration-color: var(--cat); }
.prose ul, .prose ol { margin: 1.3em 0; padding-left: 1.35em; }
.prose li + li { margin-top: .55em; }
.prose ul { list-style: none; padding-left: 1.35em; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -1.1em; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--cat); }
.prose .sqcms-toc ul, .prose .sqcms-toc ol { padding-left: 0; margin: 0; }
.prose .sqcms-toc li::before { display: none; }
.prose .sqcms-toc li { position: static; }
.prose ol { list-style: decimal; }
.prose ol > li::marker { font-family: var(--font-ui); font-size: .85em; color: var(--cat); }
.prose blockquote {
  margin: 2em 0; padding: .2em 0 .2em 1.6em; border-left: 2px solid var(--cat);
  font-size: 1.15rem; font-style: italic; color: var(--ink);
}
.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; border-radius: var(--r); border: 1px solid var(--rule-soft); }
.prose figcaption { margin-top: .6em; font-family: var(--font-ui); font-size: .8rem; color: var(--ink-faint); }
.prose table { width: 100%; border-collapse: collapse; margin: 2em 0; font-family: var(--font-ui); font-size: .92rem; }
.prose th, .prose td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.prose thead th { border-bottom: 1.5px solid var(--ink); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.prose tbody tr:hover { background: var(--paper-warm); }
.prose hr { margin: 2.6em 0; border: 0; border-top: 1px solid var(--rule); }
.prose details { margin: 1.3em 0; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.prose summary { font-family: var(--font-ui); font-weight: 600; font-size: .96rem; cursor: pointer; }
.prose summary::marker { color: var(--cat); }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; padding: .12em .38em; background: var(--paper-warm); border-radius: 3px; }
.prose-home { max-width: none; }
.prose-home h2 { border-top: 0; padding-top: 0; }

/* ── Rubrique ─────────────────────────────────────────────────────────────── */
.rubrique-head { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.75rem, 4vw, 2.5rem); background: var(--paper-warm); border-bottom: 1px solid var(--rule); }
.rubrique-kicker { margin: 0 0 .7rem; font-family: var(--font-ui); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cat); }
.rubrique-title { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 .6rem; }
.pg-suffix { font-size: .55em; color: var(--ink-faint); letter-spacing: 0; }
.rubrique-lede { margin: 0; font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.rubrique-intro { max-width: var(--measure); margin-bottom: 2.75rem; padding-bottom: 2.25rem; border-bottom: 1px solid var(--rule); }
.rubrique-outro { max-width: var(--measure); margin-top: 3rem; padding-top: 2.25rem; border-top: 1px solid var(--rule); }
.empty { padding: 3rem 0; color: var(--ink-faint); font-style: italic; }

.related { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
.related .card-title { font-size: 1.05rem; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.pg {
  min-width: 2.4rem; padding: .5rem .7rem; text-align: center; text-decoration: none;
  font-family: var(--font-ui); font-size: .85rem; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  transition: background .15s, color .15s, border-color .15s;
}
.pg:hover { border-color: var(--cat); color: var(--cat); }
.pg-cur { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.pg-gap { border: 0; background: none; color: var(--ink-faint); min-width: 1.5rem; }
.pg-prev, .pg-next { font-weight: 500; }

/* ── Colonne latérale ─────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--header-height) + 1.5rem); display: grid; gap: 1.75rem; }
.sidebar .widget, .sidebar .sidebar-widget {
  padding: 1.4rem 1.35rem; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r);
}
.sidebar .sidebar-widget-title, .sidebar .widget-title {
  margin: 0 0 1rem; font-family: var(--font-ui); font-size: .7rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
  padding-bottom: .7rem; border-bottom: 1px solid var(--rule-soft);
}
.sidebar ul, .sidebar .sidebar-list { list-style: none; margin: 0; padding: 0; }
.sidebar .sidebar-list li + li, .sidebar .widget-list li + li { margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--rule-soft); }
.sidebar .widget-text { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ink-soft); }
.sidebar .widget-cta { margin: .9rem 0 0; }
.sidebar .widget-cta a { display: inline-block; padding: .55rem 1.1rem; font-family: var(--font-ui); font-size: .82rem; font-weight: 600; color: var(--paper); background: var(--ink); border-radius: var(--r); text-decoration: none; }
.sidebar .widget-cta a:hover { background: var(--accent); color: var(--paper); }
.sidebar .sidebar-search { display: flex; gap: .4rem; }
.sidebar .sidebar-search input { flex: 1 1 auto; min-width: 0; }
.sidebar .sidebar-search button { margin-top: 0; flex: 0 0 auto; padding: .55rem .9rem; }
.sidebar li + li { margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--rule-soft); }
.sidebar a { text-decoration: none; font-size: .92rem; line-height: 1.45; color: var(--ink-2); }
.sidebar a:hover { color: var(--accent); }
.sidebar input[type="search"], .sidebar input[type="text"] { width: 100%; padding: .55rem .7rem; font-family: var(--font-ui); font-size: .88rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); color: var(--ink); }
.sidebar button, .sidebar .widget-cta a { display: inline-block; margin-top: .7rem; padding: .55rem 1.1rem; font-family: var(--font-ui); font-size: .82rem; font-weight: 600; color: var(--paper); background: var(--ink); border: 0; border-radius: var(--r); cursor: pointer; text-decoration: none; }
.sidebar button:hover, .sidebar .widget-cta a:hover { background: var(--accent); }

.after-content { padding-bottom: 3rem; }

/* ── Formulaires natifs ───────────────────────────────────────────────────── */
.qcms-form, form.cms-form { margin: 2.5rem 0; padding: 1.9rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
.qcms-form label, form.cms-form label { display: block; margin-bottom: .35rem; font-family: var(--font-ui); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.qcms-form input, .qcms-form select, .qcms-form textarea,
form.cms-form input, form.cms-form select, form.cms-form textarea {
  width: 100%; padding: .65rem .8rem; font-family: var(--font-ui); font-size: .95rem;
  color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r);
}
.qcms-form input:focus, .qcms-form textarea:focus, .qcms-form select:focus,
form.cms-form input:focus, form.cms-form textarea:focus, form.cms-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.qcms-form input[type="checkbox"], form.cms-form input[type="checkbox"] { width: auto; margin-right: .5rem; }
.qcms-form button, form.cms-form button, .qcms-form [type="submit"], form.cms-form [type="submit"] {
  width: auto; padding: .75rem 1.7rem; font-family: var(--font-ui); font-size: .88rem; font-weight: 600;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r); cursor: pointer;
}
.qcms-form button:hover, form.cms-form button:hover { background: var(--accent); border-color: var(--accent); }

/* ── 404 & recherche ──────────────────────────────────────────────────────── */
.error-page { padding: clamp(3rem, 8vw, 6rem) 0 3rem; max-width: 44rem; }
.error-code { margin: 0 0 1rem; font-family: var(--font-head); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: var(--rule); }
.error-search { display: flex; gap: .5rem; margin-top: 2rem; flex-wrap: wrap; }
.error-search input { flex: 1 1 16rem; padding: .75rem .9rem; font-family: var(--font-ui); font-size: .95rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); color: var(--ink); }

/* ── Pied de page ─────────────────────────────────────────────────────────── */
.site-footer { margin-top: clamp(3rem, 8vw, 6rem); background: var(--footer-bg); color: #C9C2B6; }
.site-footer .brand-word { color: #F4F0E8; font-size: 1.45rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding: clamp(3rem, 6vw, 4.5rem) 0 3rem; }
.footer-brand p { margin: 1rem 0 0; font-size: .92rem; line-height: 1.65; color: #9A9285; max-width: 34ch; }
.footer-col h2 { font-family: var(--font-ui); font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #F4F0E8; margin: 0 0 1.1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: .6rem; }
.footer-col a { font-size: .92rem; text-decoration: none; color: #C9C2B6; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding: 1.5rem 0 2.5rem; border-top: 1px solid rgba(244,240,232,.12); font-family: var(--font-ui); font-size: .78rem; color: #857E72; }
.footer-bottom p { margin: 0; }
.footer-bottom .disclaimer { max-width: 52ch; }

/* ── Retour en haut ───────────────────────────────────────────────────────── */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 80;
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 50%;
  cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s, transform .2s; box-shadow: var(--shadow-lift);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1180px) { .header-search { display: none; } }
@media (max-width: 1080px) {
  .layout-with-side { grid-template-columns: minmax(0, 1fr) 17rem; gap: 3rem; }
}
@media (max-width: 960px) {
  .layout-with-side { grid-template-columns: 1fr; gap: 3rem; }
  .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-lead { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  :root { --header-height: 62px; }
  .nav-toggle { display: flex; }
  .brand { margin-right: auto; }
  .brand-tag { display: none; }
  .header-search { display: none; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 20rem); z-index: 95;
    background: var(--surface); border-left: 1px solid var(--rule);
    padding: calc(var(--header-height) + 1.5rem) 1.5rem 2rem;
    transform: translateX(100%); transition: transform .25s cubic-bezier(.3,.8,.3,1);
    overflow-y: auto; margin-left: 0;
  }
  body.nav-open .site-nav { transform: none; }
  body.nav-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: .85rem .5rem; font-size: 1rem; border-bottom: 1px solid var(--rule-soft); border-radius: 0; }
  .site-nav li.active > a { box-shadow: inset 3px 0 0 var(--accent); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
}
@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  .wrap { width: calc(100% - 2rem); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid { gap: 2.25rem; }
  .prose { font-size: 1.04rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .to-top { right: .9rem; bottom: .9rem; }
}

@media print {
  .site-header, .site-footer, .sidebar, .breadcrumb-bar, .to-top, .related, .pagination { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .layout-with-side { display: block; padding: 0; }
  .prose { max-width: none; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .8em; color: #666; }
}


/* ── Extensions QuietCMS : accord visuel avec le thème ────────────────────── */
.sqcms-toc {
  margin: 2.2em 0; padding: 1.35rem 1.5rem;
  background: var(--paper-warm); border: 1px solid var(--rule);
  border-left: 3px solid var(--cat); border-radius: var(--r);
}
.sqcms-toc-title, .sqcms-toc > .sqcms-toc-title {
  font-family: var(--font-ui); font-size: .7rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft);
  margin: 0 0 .9rem;
}
.sqcms-toc-list { list-style: none; margin: 0; padding: 0; }
.sqcms-toc-item { margin: 0; padding-left: calc(var(--d, 0) * 1rem); }
.sqcms-toc-item + .sqcms-toc-item { margin-top: .5rem; }
.sqcms-toc-item a { font-family: var(--font-ui); font-size: .9rem; color: var(--ink-2); text-decoration: none; line-height: 1.45; }
.sqcms-toc-item a:hover { color: var(--cat); text-decoration: underline; }

/* Articles similaires */
.qcms-related, .articles-similaires { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }

/* Bandeau cookies */
.cn-banner, .cn-modal { font-family: var(--font-ui) !important; }
