/* ============================================================
   CATHARSIS — layout.css : base, header, sections, footer
   ============================================================ */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--ff-texte);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: 1.62;
  color: var(--encre);
  background: var(--ivoire);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--bordeaux);
  line-height: 1.18;
  margin: 0 0 .6em;
}
h1 { font-size: var(--fs-hero); font-weight: 700; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; }
a { color: var(--bourgogne); text-decoration-color: var(--or); text-underline-offset: 3px; }
a:hover { color: var(--or); }

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s-section); }
.section--bordeaux {
  background: var(--bordeaux);
  color: var(--ivoire-sur-bx);
}
.section--bordeaux h2, .section--bordeaux h3 { color: var(--ivoire); }
.section--papier { background: var(--papier); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ivoire) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--or) 34%, transparent);
}
.site-header__in {
  display: flex; align-items: center; gap: 2rem;
  max-width: var(--maxw); margin-inline: auto;
  padding: .9rem var(--gutter);
}
.logo {
  font-family: var(--ff-display);
  font-size: 1.55rem; font-weight: 700;
  color: var(--bordeaux); text-decoration: none;
  letter-spacing: .02em;
  margin-right: auto;
}
.logo:hover { color: var(--bordeaux); }
.nav { display: flex; gap: 1.7rem; align-items: center; }
.nav a {
  font-family: var(--ff-display);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--encre); text-decoration: none;
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--bordeaux);
  border-bottom-color: var(--or);
}
.nav__toggle { display: none; }

@media (max-width: 900px) {
  .nav__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    background: none; border: 1px solid var(--or); border-radius: 3px;
    color: var(--bordeaux); font-size: 1.2rem; cursor: pointer;
  }
  .nav {
    display: none;
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ivoire);
    border-bottom: 1px solid var(--or);
    padding: .5rem var(--gutter) 1.2rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding-block: .8rem; font-size: .82rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bordeaux);
  color: var(--ivoire-sur-bx);
  padding-block: 4rem 2rem;
  font-size: var(--fs-small);
}
.site-footer a { color: var(--ivoire-sur-bx); text-decoration: none; }
.site-footer a:hover { color: var(--or-clair); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--or) 40%, transparent);
}
.site-footer__brand .logo { color: var(--ivoire); font-size: 1.4rem; }
.site-footer h4 {
  color: var(--or-clair);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
  padding-top: 1.6rem;
  font-size: .95rem;
  color: color-mix(in srgb, var(--ivoire-sur-bx) 75%, transparent);
}
@media (max-width: 820px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}
