/* ==========================================================================
   Club du Congo — feuille de style unique
   Identite brique et terre cuite, typographie Nunito.
   La valeur de --brick est echantillonnee sur le fond du logo
   (images/logo-clubducongo.png) afin que la marque se fonde dans le bandeau.
   ========================================================================== */

:root {
  --brick: #8C2618;
  --brick-deep: #6E2018;
  --terracotta: #B5563F;
  --sand: #F2E7E0;
  --paper: #FBF8F6;
  --ink: #241310;
  --ink-soft: #5A4540;
  --white: #FFFFFF;
  --rule: #E4D3CA;

  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step-hero: clamp(2.1rem, 5.4vw, 3.4rem);
  --step-title: clamp(1.6rem, 3.4vw, 2rem);
  --step-sub: clamp(1.2rem, 2.2vw, 1.4rem);
  --step-body: 1.0625rem;

  --measure: 68ch;
  --shell: 1180px;
  --gutter: 24px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.22;
  color: var(--brick-deep);
  letter-spacing: -0.012em;
  margin: 0;
}

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--brick); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

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

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* --- En-tete colle en haut ------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brick);
}

/* Ombre progressive au defilement — animation pilotee par le scroll, sans JS. */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-lift linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 110px;
  }
  @keyframes header-lift {
    from { box-shadow: 0 0 0 0 rgba(36, 19, 16, 0); }
    to   { box-shadow: 0 6px 20px -4px rgba(36, 19, 16, 0.38); }
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo { display: block; flex: 0 0 auto; }
.logo img { height: 46px; width: auto; }
.logo:hover, .logo:focus-visible { text-decoration: none; }

.nav { display: flex; flex-wrap: wrap; gap: 4px; }

.nav a {
  display: block;
  padding: 8px 14px;
  font-size: 0.975rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid transparent;
}

.nav a:hover, .nav a:focus-visible {
  color: var(--white);
  border-bottom-color: var(--terracotta);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--terracotta);
}

/* --- Hero photographique -------------------------------------------------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--brick);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(36, 19, 16, 0.18) 0%, rgba(36, 19, 16, 0) 38%),
    linear-gradient(90deg,
      rgba(140, 38, 24, 0.82) 0%,
      rgba(140, 38, 24, 0.68) 42%,
      rgba(140, 38, 24, 0.45) 100%);
}

.hero__content {
  position: relative;
  padding-top: 96px;
  padding-bottom: 76px;
  color: var(--white);
}

.hero h1 {
  font-size: var(--step-hero);
  color: var(--white);
  line-height: 1.1;
  margin: 0;
}

.hero__line {
  margin: 20px 0 0;
  max-width: 34ch;
  font-size: var(--step-sub);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.93);
}

/* --- En-tete de page (sans photo) ----------------------------------------- */

.pagehead {
  background: var(--brick);
  color: var(--white);
  padding: 62px 0 54px;
}

.pagehead h1 { font-size: var(--step-title); color: var(--white); }

.pagehead__lead {
  margin: 14px 0 0;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.88);
}

.jumplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.jumplinks a {
  padding: 7px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 2px;
}

.jumplinks a:hover, .jumplinks a:focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: var(--brick);
  text-decoration: none;
}

/* --- Sections ------------------------------------------------------------- */

.section { padding: 84px 0; }
.section--sand { background: var(--sand); }
.section--paper { background: var(--paper); }

.section__head { margin-bottom: 34px; }

.section h2 {
  font-size: var(--step-title);
}

.section h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 16px;
  background: var(--terracotta);
  border-radius: 2px;
}

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 0; }

/* --- Bande a deux colonnes ------------------------------------------------ */

.duo {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 68px;
  align-items: center;
}

.duo__text h2 { margin-bottom: 26px; }

/* Cadre : filet terre cuite decale derriere la photographie. */
.framed { position: relative; }

.framed::before {
  content: "";
  position: absolute;
  inset: 20px -20px -20px 20px;
  border: 1px solid var(--terracotta);
  border-radius: 2px;
}

.framed img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

/* --- Cartes photographiques ----------------------------------------------- */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 38px;
}

.figure { margin: 0; }

.figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
}

.figure figcaption {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--terracotta);
  font-weight: 600;
  color: var(--brick-deep);
}

/* --- Bandeau brique sobre ------------------------------------------------- */

.band {
  background: var(--brick);
  color: var(--white);
  padding: 56px 0;
}

.band p {
  max-width: 60ch;
  margin: 0;
  font-size: var(--step-sub);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
}

/* --- Bandeau photographique pleine largeur (21:9) ------------------------- */

.bandphoto { display: block; background: var(--brick); }

.bandphoto img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 52%;
}

/* --- Cartes de gouvernance ------------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 34px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--terracotta);
  border-radius: 2px;
  padding: 34px 32px;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.card__kicker {
  margin: 0 0 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--terracotta);
}

/* Le pied de carte est pousse en bas : les filets des deux cartes s'alignent
   meme lorsque l'une porte la marque SIF-CdC et l'autre non. */
.card__foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.card__mark { margin: 0 0 14px; }

.card__mark img {
  height: 28px;
  width: auto;
  border-radius: 2px;
}

.card__meta {
  margin: 0;
  font-size: 0.975rem;
  color: var(--ink-soft);
}

.card__meta strong { color: var(--brick-deep); font-weight: 800; }

.linking {
  max-width: 62ch;
  margin: 0;
  padding: 24px 28px;
  background: var(--white);
  border-left: 3px solid var(--terracotta);
  border-radius: 2px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brick-deep);
}

/* --- Frise chronologique -------------------------------------------------- */

.timeline {
  position: relative;
  max-width: 62ch;
  margin: 0;
  padding: 4px 0 4px 44px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 14px; bottom: 14px; left: 9px;
  width: 2px;
  background: var(--terracotta);
  opacity: 0.45;
}

.timeline li { position: relative; padding-bottom: 38px; }
.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  top: 9px; left: -44px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 4px var(--paper);
}

.timeline__date {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brick-deep);
  line-height: 1.3;
}

.timeline__text { margin: 6px 0 0; color: var(--ink-soft); }

/* --- Contact -------------------------------------------------------------- */

.contact { text-align: center; }
.contact .prose { margin-left: auto; margin-right: auto; }
.contact h2::after { margin-left: auto; margin-right: auto; }
.contact p { margin-left: auto; margin-right: auto; }

.contact__mail {
  margin: 26px 0 8px;
  font-size: var(--step-sub);
  font-weight: 800;
}

.contact__mail a { color: var(--brick); border-bottom: 2px solid var(--terracotta); }
.contact__mail a:hover, .contact__mail a:focus-visible { text-decoration: none; color: var(--brick-deep); }

.contact__place { color: var(--ink-soft); }

/* --- Mentions legales ----------------------------------------------------- */

.legal { max-width: var(--measure); }
.legal h3 { font-size: 1.15rem; margin: 34px 0 8px; }
.legal dl { margin: 0; }
.legal dt { margin-top: 18px; font-weight: 800; color: var(--terracotta); font-size: 0.95rem; }
.legal dd { margin: 2px 0 0; }

/* --- Pied de page --------------------------------------------------------- */

.site-footer {
  background: var(--brick-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 58px 0 32px;
  font-size: 1rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
  align-items: start;
}

.site-footer p { max-width: 42ch; margin: 0; }

.site-footer h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 14px;
}

.site-footer__mark img {
  height: 44px;
  width: auto;
  border-radius: 2px;
}

.site-footer a { color: rgba(255, 255, 255, 0.92); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--white); }

.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 8px; }

.site-footer__base {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* --- Adaptations mobiles -------------------------------------------------- */

@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; gap: 44px; }
  .framed::before { inset: 14px -14px -14px 14px; }
}

@media (max-width: 680px) {
  :root { --gutter: 20px; }

  html { scroll-padding-top: 122px; }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .logo img { height: 40px; }
  .nav { margin-left: -14px; }
  .nav a { padding: 6px 14px; font-size: 0.95rem; }

  .hero { min-height: 72vh; }
  .hero__content { padding-top: 70px; padding-bottom: 54px; }
  .hero__veil {
    background:
      linear-gradient(180deg, rgba(36, 19, 16, 0.28) 0%, rgba(36, 19, 16, 0.1) 40%),
      linear-gradient(90deg, rgba(140, 38, 24, 0.84) 0%, rgba(140, 38, 24, 0.66) 100%);
  }

  .section { padding: 58px 0; }
  .pagehead { padding: 46px 0 40px; }
  .band { padding: 44px 0; }
  .bandphoto img { aspect-ratio: 16 / 9; }
  .card { padding: 28px 24px; }
  .linking { padding: 22px 22px; font-size: 1.05rem; }
  .timeline { padding-left: 38px; }
  .timeline li::before { left: -38px; width: 17px; height: 17px; }
  .site-footer { padding-top: 46px; }
}

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