/* =====================================================
   EJOM — Modernisme africain éditorial
   Système de design centré sur la métaphore du tissage
   ===================================================== */

/* ---------- Variables ---------- */
:root {
  /* Les trois fils */
  --terre:        #B8451F;  /* Éducation — terre cuite */
  --terre-dark:   #8A2D0F;
  --terre-light:  #E8997C;
  --terre-soft:   #F5DCC9;

  --feuille:      #2D5F3F;  /* Justice sociale — vert profond */
  --feuille-dark: #1A3D27;
  --feuille-light:#5B8B6E;
  --feuille-soft: #CFE0D5;

  --nuit:         #2A3970;  /* Migrations — indigo */
  --nuit-dark:    #1A2450;
  --nuit-light:   #5066A0;
  --nuit-soft:    #D2D8E8;

  /* Neutres chauds */
  --sable:        #F5EFE6;
  --sable-dark:   #E5DCC9;
  --sable-light:  #FAF7F2;
  --craie:        #FFFCF7;
  --encre:        #1F1A14;
  --encre-soft:   #4A4239;
  --encre-mute:   #8B8275;

  /* Typographie */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Manrope', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Espacements */
  --container:    1280px;
  --container-narrow: 920px;
  --radius-sm:    4px;
  --radius:       8px;
  --radius-lg:    16px;
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--encre);
  background: var(--sable-light);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .7; }

/* ---------- Typographie éditoriale ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.display-xl {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "SOFT" 50;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: .95;
  letter-spacing: -0.04em;
}

.display-lg {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.display-md {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--encre-mute);
}

.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--encre-soft);
}

em.italic-display {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-weight: 400;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container, .container-narrow { padding: 0 2.5rem; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 26, 20, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 36px;
  height: 36px;
}

.brand__name { line-height: 1; }
.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--encre-mute);
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav__link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--encre);
  padding: 0.25rem 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right .3s cubic-bezier(.4,0,.2,1);
}

.nav__link:hover, .nav__link.is-active {
  opacity: 1;
}

.nav__link:hover::after, .nav__link.is-active::after {
  right: 0;
}

@media (max-width: 960px) {
  .nav { display: none; }
}

/* Menu burger mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
}

.menu-toggle__bars {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--encre);
  position: relative;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: currentColor;
}

.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after  { top: 7px; }

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

/* Menu mobile overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--sable);
  z-index: 100;
  padding: 6rem 2rem 2rem;
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.mobile-nav.is-open { display: flex; }

.mobile-nav__link {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.mobile-nav__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  width: 44px;
  height: 44px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.625rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--encre);
  color: var(--craie);
}

.btn--primary:hover {
  background: var(--terre);
  color: var(--craie);
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px rgba(184, 69, 31, 0.5);
}

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

.btn--ghost:hover {
  background: var(--encre);
  color: var(--craie);
  opacity: 1;
}

.btn--terre  { background: var(--terre);   color: var(--craie); }
.btn--feuille{ background: var(--feuille); color: var(--craie); }
.btn--nuit   { background: var(--nuit);    color: var(--craie); }

.btn--terre:hover, .btn--feuille:hover, .btn--nuit:hover {
  filter: brightness(1.15);
  opacity: 1;
  transform: translateY(-1px);
}

.btn__arrow {
  width: 18px;
  height: 18px;
  transition: transform .25s;
}

.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  padding: 4rem 0 6rem;
  overflow: hidden;
  background: var(--sable-light);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__bg svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: 1.15fr 1fr;
    gap: 5rem;
  }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--encre-soft);
}

.hero__eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--terre);
}

.hero__title {
  margin: 0 0 1.5rem;
}

.hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: rise .9s cubic-bezier(.2,.65,.3,1) forwards;
}

.hero__title .word:nth-child(1) { animation-delay: .05s; }
.hero__title .word:nth-child(2) { animation-delay: .15s; }
.hero__title .word:nth-child(3) { animation-delay: .25s; }
.hero__title .word:nth-child(4) { animation-delay: .35s; }
.hero__title .word:nth-child(5) { animation-delay: .45s; }
.hero__title .word:nth-child(6) { animation-delay: .55s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero__lead {
  margin: 0 0 2.5rem;
  max-width: 560px;
  opacity: 0;
  animation: rise .9s cubic-bezier(.2,.65,.3,1) .7s forwards;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: rise .9s cubic-bezier(.2,.65,.3,1) .85s forwards;
}

/* Image hero — composition asymétrique */
.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  opacity: 0;
  animation: rise 1.2s cubic-bezier(.2,.65,.3,1) .5s forwards;
}

.hero__visual::before {
  content: '';
  position: absolute;
  inset: -1.5rem -1.5rem auto auto;
  width: 60%;
  height: 60%;
  background: var(--terre-soft);
  border-radius: var(--radius-lg);
  z-index: 0;
}

.hero__visual::after {
  content: '';
  position: absolute;
  inset: auto auto -1.5rem -1.5rem;
  width: 50%;
  height: 50%;
  background: var(--nuit-soft);
  border-radius: var(--radius-lg);
  z-index: 0;
}

.hero__image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(31, 26, 20, 0.25);
}

/* ---------- Bandeau marquee (slogan défilant) ---------- */
.marquee {
  background: var(--encre);
  color: var(--craie);
  padding: 1.5rem 0;
  overflow: hidden;
  position: relative;
}

.marquee__track {
  display: flex;
  gap: 4rem;
  animation: marquee 32s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.marquee__item {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.marquee__item::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--terre);
  border-radius: 50%;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Section générique ---------- */
.section {
  padding: 6rem 0;
  position: relative;
}

.section--tight  { padding: 4rem 0; }
.section--loose  { padding: 8rem 0; }
.section--sable  { background: var(--sable); }
.section--encre  { background: var(--encre); color: var(--craie); }

.section__head {
  max-width: 720px;
  margin-bottom: 4rem;
}

.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
}

.section__title {
  margin: 0 0 1.5rem;
}

.section__lead {
  margin: 0;
}

/* ---------- Compteurs d'impact ---------- */
.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--encre);
  border-bottom: 1px solid var(--encre);
}

.counter {
  padding: 3rem 1.5rem;
  border-right: 1px solid rgba(31, 26, 20, 0.15);
  position: relative;
}

.counter:last-child { border-right: none; }

.counter__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "SOFT" 60;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
  color: var(--encre);
  display: block;
}

.counter__num--terre   { color: var(--terre); }
.counter__num--feuille { color: var(--feuille); }
.counter__num--nuit    { color: var(--nuit); }

.counter__label {
  font-size: 0.9375rem;
  color: var(--encre-soft);
  line-height: 1.4;
  max-width: 200px;
}

@media (max-width: 720px) {
  .counter { border-right: none; border-bottom: 1px solid rgba(31, 26, 20, 0.15); }
  .counter:last-child { border-bottom: none; }
}

/* ---------- Les trois fils — cartes ---------- */
.fils {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .fils { grid-template-columns: repeat(3, 1fr); }
}

.fil {
  position: relative;
  padding: 2.5rem;
  background: var(--craie);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 26, 20, 0.08);
  transition: all .4s cubic-bezier(.2,.65,.3,1);
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
}

.fil::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: currentColor;
}

.fil--terre   { color: var(--terre); }
.fil--feuille { color: var(--feuille); }
.fil--nuit    { color: var(--nuit); }

.fil:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -20px rgba(31, 26, 20, 0.2);
  opacity: 1;
}

.fil__number {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.fil__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 40;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 2rem 0 0.75rem;
  color: var(--encre);
}

.fil__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: currentColor;
}

.fil__desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--encre-soft);
  margin: 0 0 2rem;
}

.fil__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: currentColor;
}

.fil__arrow {
  width: 18px;
  height: 18px;
  transition: transform .25s;
}

.fil:hover .fil__arrow { transform: translateX(4px); }

.fil__pattern {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  opacity: 0.08;
  transition: opacity .4s;
}

.fil:hover .fil__pattern { opacity: 0.18; }

/* ---------- Citation manifeste ---------- */
.manifesto {
  background: var(--sable);
  position: relative;
  overflow: hidden;
}

.manifesto::before {
  content: '"';
  position: absolute;
  top: -3rem;
  left: -1rem;
  font-family: var(--font-display);
  font-size: 24rem;
  line-height: 1;
  color: var(--terre);
  opacity: 0.08;
  pointer-events: none;
}

.manifesto__quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "SOFT" 50;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 880px;
  margin: 0 0 2rem;
}

.manifesto__quote em {
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--terre);
}

.manifesto__source {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--encre-mute);
}

.manifesto__line {
  width: 40px;
  height: 1px;
  background: currentColor;
}

/* ---------- Histoires / Témoignages ---------- */
.story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .story { grid-template-columns: 1fr 1.2fr; gap: 5rem; }
  .story--reverse { grid-template-columns: 1.2fr 1fr; }
  .story--reverse .story__visual { order: 2; }
}

.story__visual {
  position: relative;
  aspect-ratio: 4 / 5;
}

.story__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.story__tag {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--craie);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
}

.story__quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 50;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
}

.story__quote::before { content: '« '; color: var(--terre); }
.story__quote::after  { content: ' »'; color: var(--terre); }

.story__author {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
}

.story__role {
  font-size: 0.875rem;
  color: var(--encre-mute);
  margin-top: 0.25rem;
}

/* ---------- Programmes — grid magazine ---------- */
.programmes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .programmes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .programmes-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 200px;
  }
  .programme--featured { grid-column: span 4; grid-row: span 2; }
  .programme--tall     { grid-column: span 2; grid-row: span 2; }
  .programme--wide     { grid-column: span 3; grid-row: span 1; }
  .programme--small    { grid-column: span 3; grid-row: span 1; }
}

.programme {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--craie);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: var(--craie);
  text-decoration: none;
  transition: transform .4s cubic-bezier(.2,.65,.3,1);
  isolation: isolate;
}

.programme:hover { transform: translateY(-4px); opacity: 1; }

.programme__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

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

.programme__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31,26,20,0.1) 0%, rgba(31,26,20,0.85) 100%);
}

.programme--solid { color: var(--encre); background: var(--sable-dark); }
.programme--solid .programme__bg::after { display: none; }

.programme__cat {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.programme__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 40;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.programme--featured .programme__title { font-size: clamp(2rem, 3.5vw, 3rem); }

/* ---------- CTA Engagement (banner triple) ---------- */
.engage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .engage { grid-template-columns: repeat(3, 1fr); }
}

.engage__card {
  padding: 3.5rem 2.5rem;
  color: var(--craie);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  transition: padding .4s;
  position: relative;
  overflow: hidden;
}

.engage__card:hover { padding-left: 3rem; opacity: 1; }
.engage__card--terre   { background: var(--terre); }
.engage__card--feuille { background: var(--feuille); }
.engage__card--nuit    { background: var(--nuit); }

.engage__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.engage__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 50;
  font-size: 2.25rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 2rem 0 1rem;
}

.engage__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 100;
}

.engage__desc {
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.9;
  margin: 0 0 2rem;
}

.engage__link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.engage__card:hover .btn__arrow { transform: translateX(4px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--encre);
  color: var(--craie);
  padding: 5rem 0 2.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-size: 1.25rem;
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.footer__col-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 1.25rem;
}

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer__list a {
  font-size: 0.9375rem;
  opacity: 0.8;
}

.footer__bottom {
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 252, 247, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  opacity: 0.6;
}

/* Newsletter inline */
.newsletter {
  display: flex;
  gap: 0.5rem;
  max-width: 320px;
  margin-top: 1rem;
}

.newsletter input {
  flex: 1;
  background: rgba(255, 252, 247, 0.08);
  border: 1px solid rgba(255, 252, 247, 0.2);
  color: var(--craie);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.875rem;
}

.newsletter input::placeholder { color: rgba(255,252,247, 0.4); }

.newsletter button {
  background: var(--terre);
  color: var(--craie);
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ---------- Pages intérieures — entête ---------- */
.page-header {
  padding: 5rem 0 4rem;
  background: var(--sable);
  border-bottom: 1px solid rgba(31, 26, 20, 0.08);
  position: relative;
  overflow: hidden;
}

.page-header__eyebrow { margin-bottom: 1.25rem; display: block; }

.page-header__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-variation-settings: "SOFT" 40;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 0 0 1.5rem;
  max-width: 880px;
}

.page-header__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 100;
}

.page-header__lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--encre-soft);
  max-width: 640px;
  margin: 0;
}

/* ---------- Prose (contenu éditorial) ---------- */
.prose {
  max-width: 720px;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--encre);
}

.prose p { margin: 0 0 1.5em; }

.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 30;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 3rem 0 1rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.375rem;
  margin: 2.5rem 0 0.75rem;
}

.prose ul { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }

.prose blockquote {
  border-left: 3px solid var(--terre);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--encre-soft);
}

/* ---------- Formulaire ---------- */
.form {
  max-width: 600px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form__row { grid-template-columns: 1fr; }
}

.form__group {
  margin-bottom: 1.25rem;
}

.form__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--encre-soft);
  margin-bottom: 0.5rem;
}

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  background: var(--craie);
  border: 1px solid rgba(31, 26, 20, 0.15);
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--encre);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--terre);
  box-shadow: 0 0 0 3px rgba(184, 69, 31, 0.1);
}

.form__textarea { min-height: 140px; resize: vertical; }

.form__alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.form__alert--success {
  background: var(--feuille-soft);
  color: var(--feuille-dark);
  border-left: 3px solid var(--feuille);
}

.form__alert--error {
  background: var(--terre-soft);
  color: var(--terre-dark);
  border-left: 3px solid var(--terre);
}

/* Honeypot anti-spam */
.form__honey {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Utilitaires ---------- */
.text-terre   { color: var(--terre); }
.text-feuille { color: var(--feuille); }
.text-nuit    { color: var(--nuit); }
.text-mute    { color: var(--encre-mute); }

.bg-sable   { background: var(--sable); }
.bg-craie   { background: var(--craie); }
.bg-encre   { background: var(--encre); color: var(--craie); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1);
}

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

/* ---------- Accessibilité ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero__title .word, .hero__lead, .hero__cta, .hero__visual {
    opacity: 1;
    transform: none;
  }
}

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

/* ===========================================
   SLIDESHOW FADE — composant réutilisable
   =========================================== */

.slideshow {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--sable-dark);
    box-shadow: 0 30px 60px -20px rgba(31, 26, 20, 0.18);
}

.slideshow__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    pointer-events: none;
}

.slideshow__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.slideshow__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder slide quand pas encore d'image — gradient + icône + label */
.slideshow__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--encre);
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.slideshow__placeholder--terre   { background: linear-gradient(135deg, var(--terre-soft) 0%, var(--sable-dark) 100%); }
.slideshow__placeholder--feuille { background: linear-gradient(135deg, var(--feuille-soft) 0%, var(--sable-dark) 100%); }
.slideshow__placeholder--nuit    { background: linear-gradient(135deg, var(--nuit-soft) 0%, var(--sable-dark) 100%); }
.slideshow__placeholder--mix     { background: linear-gradient(135deg, var(--terre-soft) 0%, var(--nuit-soft) 100%); }
.slideshow__placeholder--sable   { background: linear-gradient(135deg, var(--sable-dark) 0%, var(--feuille-soft) 100%); }

.slideshow__placeholder__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    pointer-events: none;
}

.slideshow__placeholder__icon {
    width: 56px;
    height: 56px;
    opacity: 0.55;
    margin-bottom: 0.5rem;
}

.slideshow__placeholder__label {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.6;
}

.slideshow__placeholder__sub {
    font-size: 0.875rem;
    font-style: italic;
    opacity: 0.5;
    max-width: 240px;
    line-height: 1.4;
}

/* Indicateurs (dots) */
.slideshow__dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.slideshow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(31, 26, 20, 0.25);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all .35s cubic-bezier(.4,0,.2,1);
}

.slideshow__dot.is-active {
    background: var(--encre);
    width: 22px;
    border-radius: 999px;
}

.slideshow__dot:hover {
    background: var(--encre);
    opacity: 0.7;
}

/* Tag activité (overlay haut-gauche) */
.slideshow__tag {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 3;
    padding: 0.4rem 0.9rem;
    background: var(--encre);
    color: var(--craie);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
}

.slideshow__tag--terre   { background: var(--terre); }
.slideshow__tag--feuille { background: var(--feuille); }
.slideshow__tag--nuit    { background: var(--nuit); }

/* Bloc décoratif derrière le slideshow (comme le hero) */
.slideshow-wrapper {
    position: relative;
}

.slideshow-wrapper::before {
    content: '';
    position: absolute;
    inset: -1.25rem -1.25rem auto auto;
    width: 55%;
    height: 55%;
    border-radius: var(--radius-lg);
    z-index: 0;
}

.slideshow-wrapper::after {
    content: '';
    position: absolute;
    inset: auto auto -1.25rem -1.25rem;
    width: 45%;
    height: 45%;
    border-radius: var(--radius-lg);
    z-index: 0;
}

.slideshow-wrapper--terre::before  { background: var(--terre-soft); }
.slideshow-wrapper--terre::after   { background: var(--nuit-soft); }
.slideshow-wrapper--feuille::before{ background: var(--feuille-soft); }
.slideshow-wrapper--feuille::after { background: var(--terre-soft); }
.slideshow-wrapper--nuit::before   { background: var(--nuit-soft); }
.slideshow-wrapper--nuit::after    { background: var(--feuille-soft); }

.slideshow-wrapper .slideshow {
    position: relative;
    z-index: 1;
}

/* Bloc d'info activité — détails d'un appel à candidature */
.activite-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.activite-meta__item {
    padding: 1rem 1.25rem;
    background: var(--craie);
    border-radius: var(--radius);
    border-left: 3px solid var(--terre);
}

.activite-meta__label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--encre-mute);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.activite-meta__value {
    font-size: 0.9375rem;
    font-weight: 600;
}

@media (max-width: 600px) {
    .activite-meta { grid-template-columns: 1fr; }
}

/* Liste des thématiques de formation */
.activite-topics {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

.activite-topics li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--sable);
    border-radius: var(--radius);
    font-size: 0.9375rem;
}

.activite-topics li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--feuille);
    color: var(--craie);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    .slideshow__slide { transition: none; }
}

/* ===========================================
   SLIDESHOW — Mode défilement horizontal (slide)
   Activé via data-mode="slide" sur le conteneur
   =========================================== */

.slideshow[data-mode="slide"] .slideshow__track {
    position: absolute;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
    will-change: transform;
}

.slideshow[data-mode="slide"] .slideshow__slide {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    opacity: 1;
    pointer-events: auto;
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .slideshow[data-mode="slide"] .slideshow__track {
        transition: none;
    }
}

/* ===========================================
   HERO — Slideshow intégré au visuel d'ouverture
   =========================================== */

.hero__slideshow {
    /* Override le aspect-ratio par défaut de .slideshow :
       le hero__visual définit déjà la zone via son propre aspect-ratio,
       le slideshow doit l'épouser exactement, sinon les blocs décoratifs
       ::before / ::after derrière deviennent visibles */
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    box-shadow: 0 30px 60px -20px rgba(31, 26, 20, 0.25);
    background: var(--sable-dark);
}
.hero__slideshow .slideshow__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Dots du hero : un peu plus discrets et bien centrés */
.hero__slideshow .slideshow__dots {
    bottom: 1.25rem;
}
.hero__slideshow .slideshow__dot {
    background: rgba(255, 252, 247, 0.45);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.hero__slideshow .slideshow__dot.is-active {
    background: var(--craie);
}
