/* =========================================================================
   artisanatslave.fr — Magazine des metiers d'art slaves
   Mood board : "Matriochka & carnet d'artisan"
   Palette   : papier ecru + encre sepia + vermillon Khokhloma + mousse Mstera
               + miel ocre + indigo Kazan + bois roussi
   Polices   : Young Serif (display) + Literata (body) + Architects Daughter (accent)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Young+Serif&family=Literata:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Architects+Daughter&display=swap');

/* -------------------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------------------- */

:root {
  /* --- Palette 7 couleurs --- */
  --papier-ecru: #F2E9D8;         /* fond principal (72%) */
  --encre-sepia: #1C1812;         /* texte principal */
  --vermillon: #C73E1D;           /* primaire — rouge laque Khokhloma */
  --mousse: #4A5D3A;              /* secondaire — vert foret Mstera */
  --miel: #C89B3C;                /* accents, filets, numerotations */
  --indigo: #2B3A5C;              /* contraste dramatique — overlays, CTA */
  --bois: #6D3B2A;                /* fond alt, bois sculpte */

  /* --- Derivees opacite sepia --- */
  --sepia-80: rgba(28,24,18,.8);
  --sepia-65: rgba(28,24,18,.65);
  --sepia-40: rgba(28,24,18,.4);
  --sepia-20: rgba(28,24,18,.2);
  --sepia-10: rgba(28,24,18,.1);
  --sepia-06: rgba(28,24,18,.06);

  /* --- Derivees opacite papier --- */
  --papier-95: rgba(242,233,216,.95);
  --papier-85: rgba(242,233,216,.85);
  --papier-75: rgba(242,233,216,.75);
  --papier-40: rgba(242,233,216,.4);

  /* --- Derivees vermillon / indigo / mousse --- */
  --vermillon-10: rgba(199,62,29,.1);
  --vermillon-20: rgba(199,62,29,.2);
  --indigo-75: rgba(43,58,92,.75);
  --indigo-90: rgba(43,58,92,.9);
  --mousse-20: rgba(74,93,58,.2);
  --miel-20: rgba(200,155,60,.2);

  /* --- Polices --- */
  --ff-display: 'Young Serif', Georgia, serif;
  --ff-body: 'Literata', 'Iowan Old Style', Georgia, serif;
  --ff-accent: 'Architects Daughter', 'Caveat', cursive;

  /* --- Mesures --- */
  --measure-article: 680px;
  --measure-wide: 1280px;
  --measure-hero: 1440px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* --- Transitions --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 300ms;
  --dur: 500ms;
  --dur-slow: 700ms;

  /* --- Ombres --- */
  --shadow-sm: 0 2px 6px var(--sepia-10);
  --shadow-md: 0 8px 24px var(--sepia-20);
  --shadow-lg: 0 16px 48px var(--sepia-20);

  /* --- Ornements SVG inline (encoded) --- */
  --paper-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .11   0 0 0 0 .09   0 0 0 0 .07   0 0 0 .08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* -------------------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--ff-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--encre-sepia);
  background-color: var(--papier-ecru);
  background-image: var(--paper-grain);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Mobile menu lock */
body.nav-open { overflow: hidden; }

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

a {
  color: var(--vermillon);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--bois); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--encre-sepia);
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
h4 { font-size: 1.2rem; font-weight: 500; }

p { margin: 0 0 1.1em; }

::selection {
  background-color: var(--vermillon);
  color: var(--papier-ecru);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--encre-sepia);
  color: var(--papier-ecru);
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus { left: 1rem; top: 1rem; }

/* -------------------------------------------------------------------------
   3. LAYOUT CONTAINERS
   ------------------------------------------------------------------------- */

.container {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: var(--measure-article);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { display: block; min-height: 60vh; }

/* Section */
section { padding: clamp(3rem, 8vw, 6rem) 0; }

/* -------------------------------------------------------------------------
   4. HEADER + NAV
   ------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--papier-95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.site-header.scrolled {
  background-color: var(--papier-ecru);
  border-bottom-color: var(--sepia-10);
  box-shadow: var(--shadow-sm);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--encre-sepia);
  letter-spacing: -0.015em;
}

.nav-brand:hover { color: var(--vermillon); }

.nav-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background-color: var(--vermillon);
  color: var(--papier-ecru);
  border-radius: 50%;
  font-family: var(--ff-accent);
  font-size: 1.3rem;
  line-height: 1;
  transform: rotate(-8deg);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu > li { position: relative; }

.nav-link {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--encre-sepia);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--vermillon);
  border-bottom-color: var(--vermillon);
}

.nav-dropdown-toggle { cursor: pointer; background: none; border: 0; font: inherit; color: inherit; padding: 0.35rem 0; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: -1rem;
  min-width: 220px;
  background-color: var(--papier-ecru);
  border: 1px solid var(--sepia-10);
  box-shadow: var(--shadow-md);
  padding: 0.6rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--dur-fast) var(--ease);
}

.nav-menu > li:hover .nav-dropdown,
.nav-menu > li:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown li { list-style: none; }

.nav-dropdown a {
  display: block;
  padding: 0.45rem 1rem;
  color: var(--encre-sepia);
  font-size: 0.92rem;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.nav-dropdown a:hover {
  background-color: var(--vermillon-10);
  color: var(--vermillon);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 38px;
  height: 38px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background-color: var(--encre-sepia);
  margin: 6px auto;
  width: 24px;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-menu {
    position: fixed;
    inset: 60px 0 0 0;
    flex-direction: column;
    align-items: flex-start;
    background-color: var(--papier-ecru);
    padding: 2rem var(--gutter) 4rem;
    gap: 1rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }

  body.nav-open .nav-menu {
    opacity: 1;
    visibility: visible;
  }

  .nav-menu > li { width: 100%; border-bottom: 1px dashed var(--sepia-10); padding-bottom: 0.8rem; }

  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 0.3rem 0 0.3rem 1rem;
    background: transparent;
  }

  .nav-dropdown a { padding: 0.3rem 0; }
}

/* -------------------------------------------------------------------------
   5. FOOTER
   ------------------------------------------------------------------------- */

.site-footer {
  background-color: var(--encre-sepia);
  color: var(--papier-75);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  position: relative;
}

.site-footer::before {
  content: "";
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 12px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--vermillon) 0 18px,
    transparent 18px 28px,
    var(--miel) 28px 46px,
    transparent 46px 56px
  );
  opacity: .8;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  color: var(--papier-ecru);
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }

.footer-col li { margin-bottom: 0.4rem; }

.footer-col a {
  color: var(--papier-75);
  font-size: 0.92rem;
  transition: color var(--dur-fast) var(--ease);
}

.footer-col a:hover { color: var(--miel); }

.footer-brand-text {
  font-family: var(--ff-accent);
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--papier-ecru);
  margin: 0.5rem 0 1rem;
}

.footer-heritage {
  font-size: 0.82rem;
  opacity: 0.65;
  font-style: italic;
  max-width: 560px;
  margin: 2rem auto 0;
  text-align: center;
  line-height: 1.55;
}

.footer-bottom {
  border-top: 1px solid var(--papier-40);
  padding-top: 1.2rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.55;
  letter-spacing: 0.02em;
}

/* -------------------------------------------------------------------------
   6. HERO
   ------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 68vh;
  max-height: 820px;
  display: flex;
  align-items: center;
  padding: 5rem 0 4rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-home {
  min-height: 78vh;
  max-height: 880px;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(43,58,92,.55) 0%, rgba(28,24,18,.78) 100%),
    var(--paper-grain);
}

.hero-inner {
  position: relative;
  max-width: var(--measure-hero);
  margin: 0 auto;
  padding: 0 var(--gutter);
  color: var(--papier-ecru);
  width: 100%;
}

.hero-home .hero-inner { max-width: 860px; }

.hero-kicker {
  display: inline-block;
  font-family: var(--ff-accent);
  font-size: 1.15rem;
  color: var(--miel);
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}

.hero-title {
  font-family: var(--ff-display);
  color: var(--papier-ecru);
  margin-bottom: 1rem;
  text-shadow: 0 2px 18px rgba(0,0,0,.4);
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--papier-85);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-home .hero-lead { margin: 0 auto 2rem; }
.hero:not(.hero-home) .hero-lead { margin: 0 0 2rem; max-width: 640px; }

.hero-cta {
  display: inline-flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-accent);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--miel);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.hero-scroll::after {
  content: "";
  width: 2px;
  height: 40px;
  background-color: var(--miel);
  animation: pulse-scroll 1.8s ease-in-out infinite;
}

@keyframes pulse-scroll {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%      { transform: scaleY(1.1); opacity: 1; }
}

.hero-meta {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  font-family: var(--ff-accent);
  font-size: 0.98rem;
  color: var(--papier-85);
  margin-bottom: 1rem;
}

.hero-meta span::before {
  content: "· ";
  color: var(--miel);
  margin-right: 0.2em;
}

.hero-meta span:first-child::before { content: ""; margin: 0; }

/* -------------------------------------------------------------------------
   7. BREADCRUMB TIMBRE-POSTE
   ------------------------------------------------------------------------- */

.breadcrumb {
  font-family: var(--ff-accent);
  font-size: 0.95rem;
  color: var(--papier-85);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.8rem;
  background-color: rgba(242,233,216,.08);
  border: 1px dashed var(--papier-40);
  border-radius: 2px;
  position: relative;
}

.breadcrumb::before,
.breadcrumb::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background-image: radial-gradient(circle, var(--papier-ecru) 2px, transparent 2px);
  background-size: 10px 10px;
  transform: translateY(-50%);
  opacity: 0.3;
}

.breadcrumb::before { left: -14px; }
.breadcrumb::after { right: -14px; }

.breadcrumb a {
  color: var(--miel);
  transition: color var(--dur-fast) var(--ease);
}

.breadcrumb a:hover { color: var(--papier-ecru); }

.breadcrumb-sep { margin: 0 0.3rem; opacity: 0.5; }

.breadcrumb-flag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vermillon);
  background-color: var(--papier-ecru);
  padding: 0 0.35rem;
  margin-right: 0.3rem;
  letter-spacing: 0.05em;
}

/* -------------------------------------------------------------------------
   8. BUTTONS
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--ff-body);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--vermillon);
  color: var(--papier-ecru);
  border-color: var(--vermillon);
}

.btn-primary:hover {
  background-color: var(--bois);
  border-color: var(--bois);
  color: var(--papier-ecru);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--papier-ecru);
  border-color: var(--papier-ecru);
}

.btn-secondary:hover {
  background-color: var(--papier-ecru);
  color: var(--encre-sepia);
}

.btn-ghost {
  background-color: transparent;
  color: var(--vermillon);
  border-color: var(--vermillon);
}

.btn-ghost:hover {
  background-color: var(--vermillon);
  color: var(--papier-ecru);
}

/* -------------------------------------------------------------------------
   9. ARTICLE LAYOUT (guides + blog)
   ------------------------------------------------------------------------- */

.article-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin: 3rem auto;
  max-width: var(--measure-wide);
  padding: 0 var(--gutter);
}

@media (min-width: 960px) {
  .article-wrap {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 3.5rem;
  }
}

/* -------- TOC sticky -------- */
.toc-sticky {
  position: sticky;
  top: 100px;
  align-self: start;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.toc-title {
  font-family: var(--ff-accent);
  font-size: 1.05rem;
  color: var(--vermillon);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--sepia-20);
}

.toc-sticky ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc-sticky li {
  counter-increment: toc;
  margin-bottom: 0.6rem;
  position: relative;
  padding-left: 1.8rem;
}

.toc-sticky li::before {
  content: counter(toc, decimal-leading-zero) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--ff-display);
  color: var(--indigo);
  font-size: 0.85rem;
}

.toc-sticky a {
  color: var(--sepia-80);
  border-bottom: 1px dashed transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.toc-sticky a:hover,
.toc-sticky a:focus {
  color: var(--vermillon);
  border-bottom-color: var(--vermillon);
}

@media (max-width: 959px) {
  .toc-sticky {
    position: static;
    max-height: none;
    padding: 1.2rem;
    background-color: var(--sepia-06);
    border-left: 3px solid var(--vermillon);
  }
}

/* -------- article-summary (chapeau italique) -------- */
.article-summary {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--sepia-80);
  padding: 1.2rem 1.6rem;
  margin: 0 0 2rem;
  background-color: rgba(200,155,60,.08);
  border-left: 4px solid var(--miel);
}

/* -------- article-body -------- */
.article-body {
  font-family: var(--ff-body);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--encre-sepia);
  max-width: var(--measure-article);
}

.article-body > *:first-child { margin-top: 0; }

.article-body h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 3rem 0 1rem;
  padding-bottom: 0.5rem;
  position: relative;
}

.article-body h2::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 8'><path d='M2 4 Q 10 -2 18 4 T 34 4 T 50 4 T 66 4' fill='none' stroke='%23C73E1D' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  transform-origin: left;
  animation: vrille-reveal 1.2s var(--ease) both;
}

@keyframes vrille-reveal {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.article-body h3 {
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  margin: 2rem 0 0.8rem;
  color: var(--bois);
}

.article-body p { margin: 0 0 1.2em; }

/* Lettrine linogravure */
.article-body > p:first-of-type::first-letter {
  font-family: var(--ff-display);
  font-size: 4.5em;
  float: left;
  line-height: 0.85;
  padding: 0.1em 0.1em 0 0;
  color: var(--vermillon);
  text-shadow: 2px 2px 0 var(--miel-20);
  font-style: italic;
}

.article-body ul, .article-body ol { padding-left: 1.6rem; margin-bottom: 1.3em; }
.article-body li { margin-bottom: 0.5em; }

.article-body ul li::marker { color: var(--vermillon); }
.article-body ol { counter-reset: list; padding-left: 0; list-style: none; }
.article-body ol > li {
  counter-increment: list;
  position: relative;
  padding-left: 2.6rem;
}
.article-body ol > li::before {
  content: counter(list, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0.1em;
  font-family: var(--ff-display);
  font-size: 1.1em;
  color: var(--indigo);
}

.article-body blockquote {
  position: relative;
  margin: 2.2rem 0;
  padding: 1.5rem 1.8rem;
  background-color: var(--papier-ecru);
  border: 1px solid var(--sepia-10);
  box-shadow: var(--shadow-sm);
  font-family: var(--ff-accent);
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--encre-sepia);
  transform: rotate(-0.8deg);
}

.article-body blockquote::before {
  content: "";
  position: absolute;
  top: -10px; left: 26px;
  width: 18px; height: 18px;
  background: radial-gradient(circle at 40% 40%, #8B2E18 0, #5B1F10 60%, #2E0F08 100%);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,.4);
}

.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body img {
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.article-body strong { color: var(--indigo); font-weight: 600; }
.article-body em { font-style: italic; color: var(--bois); }

.article-body a {
  color: var(--vermillon);
  border-bottom: 1px solid var(--vermillon-20);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.article-body a:hover {
  background-color: var(--vermillon-10);
  border-bottom-color: var(--vermillon);
}

/* code inline */
.article-body code {
  font-family: 'Courier New', monospace;
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  background-color: var(--sepia-06);
  border: 1px solid var(--sepia-10);
}

/* tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95em;
  background-color: rgba(242,233,216,0.5);
}

.article-body th,
.article-body td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--sepia-10);
}

.article-body th {
  background-color: var(--indigo);
  color: var(--papier-ecru);
  font-family: var(--ff-display);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.article-body tr:last-child td { border-bottom: 0; }
.article-body tbody tr:hover { background-color: var(--miel-20); }

/* divider couture */
.article-body hr {
  border: 0;
  text-align: center;
  margin: 3rem 0;
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'><line x1='0' y1='10' x2='80' y2='10' stroke='%236D3B2A' stroke-width='1' stroke-dasharray='3 4'/><circle cx='100' cy='10' r='3' fill='none' stroke='%23C73E1D' stroke-width='1.5'/><line x1='120' y1='10' x2='200' y2='10' stroke='%236D3B2A' stroke-width='1' stroke-dasharray='3 4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}

/* -------------------------------------------------------------------------
   10. FAQ — volets papier
   ------------------------------------------------------------------------- */

.faq-section {
  margin: 3rem 0 2rem;
  max-width: var(--measure-article);
}

.faq-title {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--vermillon);
}

.faq-item {
  border: 1px solid var(--sepia-10);
  margin-bottom: 0.6rem;
  background-color: var(--papier-ecru);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 3rem 1rem 1.2rem;
  font-family: var(--ff-display);
  font-size: 1.12rem;
  color: var(--encre-sepia);
  background-color: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  transition: background-color var(--dur-fast) var(--ease);
}

.faq-question:hover { background-color: var(--vermillon-10); }

.faq-question::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%) rotate(0deg);
  transition: transform var(--dur-fast) var(--ease);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'><circle cx='11' cy='11' r='10' fill='none' stroke='%23C73E1D' stroke-width='1.5'/><path d='M11 6 L11 16 M6 11 L16 11' stroke='%23C73E1D' stroke-width='1.5' stroke-linecap='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}

.faq-item.open .faq-question::after { transform: translateY(-50%) rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur) var(--ease), padding var(--dur) var(--ease);
  padding: 0 1.2rem;
  font-family: var(--ff-body);
  color: var(--sepia-80);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 800px;
  padding: 0.5rem 1.2rem 1.3rem;
  border-top: 1px dashed var(--sepia-10);
}

/* ruban vermillon lateral */
.faq-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: transparent;
  transition: background-color var(--dur-fast) var(--ease);
}

.faq-item { position: relative; }
.faq-item.open::before { background-color: var(--vermillon); }

/* -------------------------------------------------------------------------
   11. RELATED GRID + CARDS
   ------------------------------------------------------------------------- */

.related-section {
  margin: 4rem 0;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--sepia-10);
}

.related-title {
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 2.8vw, 1.8rem);
  margin-bottom: 0.5rem;
}

.related-kicker {
  display: inline-block;
  font-family: var(--ff-accent);
  font-size: 1rem;
  color: var(--vermillon);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.related-card {
  display: block;
  background-color: var(--papier-ecru);
  border: 1px solid var(--sepia-10);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  color: var(--encre-sepia);
  position: relative;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--encre-sepia);
}

.related-card-img {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}

.related-card:hover .related-card-img img { transform: scale(1.05); }

.related-card-body {
  padding: 1.2rem 1.2rem 1.4rem;
}

.related-card-kicker {
  font-family: var(--ff-accent);
  font-size: 0.88rem;
  color: var(--vermillon);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.related-card-title {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--encre-sepia);
  margin: 0 0 0.5rem;
}

.related-card-desc {
  font-size: 0.92rem;
  color: var(--sepia-80);
  line-height: 1.5;
  margin: 0;
}

/* -------------------------------------------------------------------------
   12. HOMEPAGE SECTIONS
   ------------------------------------------------------------------------- */

.intro-editorial {
  padding: 5rem 0;
  text-align: center;
}

.intro-editorial .container-narrow { max-width: 720px; }

.intro-kicker {
  display: inline-block;
  font-family: var(--ff-accent);
  font-size: 1.2rem;
  color: var(--vermillon);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.intro-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 1rem;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--sepia-80);
}

/* -------- Techniques grid asymetrique -------- */

.techniques-section {
  padding: 4rem 0 6rem;
  background-color: rgba(255,255,255,0.3);
}

.techniques-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.techniques-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
}

.tech-card {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--encre-sepia);
  color: var(--papier-ecru);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-height: 260px;
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--papier-ecru);
}

.tech-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease), filter var(--dur-slow) var(--ease);
  filter: brightness(0.72) contrast(1.05);
}

.tech-card:hover img { transform: scale(1.06); filter: brightness(0.55) contrast(1.1); }

.tech-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--indigo-90) 100%);
  pointer-events: none;
}

.tech-card-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.2rem 1.4rem;
  z-index: 2;
}

.tech-card-n {
  font-family: var(--ff-display);
  font-size: 0.9rem;
  color: var(--miel);
  opacity: 0.9;
  margin-bottom: 0.2rem;
}

.tech-card-title {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  color: var(--papier-ecru);
  margin: 0;
  line-height: 1.2;
}

.tech-card-sub {
  font-family: var(--ff-accent);
  font-size: 0.88rem;
  color: var(--papier-85);
  margin-top: 0.2rem;
}

/* asymetrique : pattern 4-3-1-2 (sur 12 colonnes) */
.tech-card-sq { grid-column: span 3; min-height: 240px; }
.tech-card-po { grid-column: span 4; min-height: 320px; }
.tech-card-feature { grid-column: span 8; min-height: 360px; }

@media (max-width: 900px) {
  .tech-card-sq,
  .tech-card-po,
  .tech-card-feature { grid-column: span 12; min-height: 220px; }
}

/* -------- Blog teaser homepage -------- */

.blog-teaser-section { padding: 5rem 0; }

.blog-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

/* -------- Section immersive (carte CTA) -------- */

.immersive-section {
  position: relative;
  padding: 6rem 0;
  background-color: var(--bois);
  color: var(--papier-ecru);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.immersive-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.55;
}

.immersive-bg img { width: 100%; height: 100%; object-fit: cover; }

.immersive-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(28,24,18,.8) 100%);
}

.immersive-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--papier-ecru);
  margin-bottom: 1rem;
}

.immersive-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--papier-85);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* -------------------------------------------------------------------------
   13. THEMES + CARTE
   ------------------------------------------------------------------------- */

.theme-hub {
  padding: 4rem 0;
}

.theme-hub h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
}

/* Leaflet container */
#map-villages {
  height: 520px;
  border: 1px solid var(--sepia-20);
  box-shadow: var(--shadow-md);
  margin: 2rem 0;
  background-color: var(--sepia-06);
}

.leaflet-popup-content-wrapper {
  background-color: var(--papier-ecru) !important;
  color: var(--encre-sepia) !important;
  font-family: var(--ff-body) !important;
}

.leaflet-popup-content {
  margin: 12px 14px !important;
  font-size: 0.95rem !important;
}

.leaflet-popup-content h4 {
  font-family: var(--ff-display);
  color: var(--vermillon);
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

/* Glossaire */
.glossaire-search {
  width: 100%;
  max-width: 560px;
  padding: 0.85rem 1.2rem;
  font-family: var(--ff-body);
  font-size: 1rem;
  border: 2px solid var(--sepia-20);
  background-color: var(--papier-ecru);
  color: var(--encre-sepia);
  margin: 1.5rem auto;
  display: block;
}

.glossaire-search:focus {
  outline: 0;
  border-color: var(--vermillon);
}

.glossaire-count {
  text-align: center;
  font-family: var(--ff-accent);
  color: var(--sepia-65);
  margin-bottom: 2rem;
}

.glossaire-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.glossaire-entry {
  background-color: var(--papier-ecru);
  border: 1px solid var(--sepia-10);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.glossaire-cyr {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  color: var(--vermillon);
  margin: 0;
}

.glossaire-translit {
  font-family: var(--ff-accent);
  font-size: 0.9rem;
  color: var(--indigo);
  margin: 0.15rem 0 0.3rem;
}

.glossaire-fr {
  font-family: var(--ff-body);
  font-weight: 600;
  color: var(--encre-sepia);
  margin: 0 0 0.4rem;
}

.glossaire-def {
  font-size: 0.9rem;
  color: var(--sepia-80);
  line-height: 1.5;
  margin: 0;
}

.glossaire-cat {
  display: inline-block;
  font-family: var(--ff-accent);
  font-size: 0.78rem;
  color: var(--mousse);
  background-color: var(--mousse-20);
  padding: 0.1rem 0.4rem;
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   14. CONTACT + PAGES STATIQUES
   ------------------------------------------------------------------------- */

.contact-email {
  max-width: 560px;
  margin: 2rem auto;
  text-align: center;
  padding: 2rem;
  background-color: rgba(255,255,255,0.5);
  border: 1px dashed var(--sepia-20);
}

.contact-email p { margin: 0.5rem 0; }

.static-page { padding: 3rem 0 5rem; }

.static-page h1,
.static-page h2,
.static-page h3 { color: var(--encre-sepia); }

.static-page .container-narrow > p,
.static-page .container-narrow > ul { color: var(--sepia-80); line-height: 1.7; }

/* -------------------------------------------------------------------------
   15. 404
   ------------------------------------------------------------------------- */

.page-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem var(--gutter);
  background-color: var(--bois);
  color: var(--papier-ecru);
}

.page-404 h1 {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--miel);
  margin-bottom: 0.5rem;
}

.page-404 p {
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  color: var(--papier-85);
}

.page-404 .cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   16. ANIMATIONS REVEAL
   ------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* -------------------------------------------------------------------------
   17. PLAN DU SITE
   ------------------------------------------------------------------------- */

.plan-list h2 {
  font-family: var(--ff-display);
  color: var(--vermillon);
  margin-top: 2.5rem;
}

.plan-list ul {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 700px) {
  .plan-list ul { columns: 1; }
}

.plan-list li {
  margin-bottom: 0.3rem;
  break-inside: avoid;
}

/* -------------------------------------------------------------------------
   18. ACCESSIBILITE
   ------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px dashed var(--vermillon);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------------------
   19. PRINT
   ------------------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .hero-scroll, .nav-toggle { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}

/* -------------------------------------------------------------------------
   20. REDUCED MOTION
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-scroll::after { animation: none; }
}
