/* ==========================================================
   Bulletin de liaison 2025 – feuille de style de la page
   Les couleurs et tailles sont définies UNE fois dans :root
   (variables CSS) puis réutilisées partout avec var(--nom).
   ========================================================== */

:root {
  --green: #2f9d27;
  --green-dark: #1f6f1a;
  --green-soft: #eaf5e8;
  --brown: #612420;          /* couleur des liens du site actuel */
  --ink: #1f1f1c;
  --muted: #5d5d57;
  --bg: #f4f6f1;
  --card: #ffffff;
  --line: #dde2d6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);

  /* une couleur par thème */
  --c-missions: #1f6f1a;
  --c-bourses: #612420;
  --c-francophonie: #1d5f8f;
  --c-partenariats: #8a5a00;
  --c-evenements: #7b2d7b;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Calibri, "Trebuchet MS", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid #1d5f8f; outline-offset: 2px; }
[hidden] { display: none !important; }

.container { width: min(960px, 100% - 2rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- En-tête : bannière + menu ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.banner { width: min(1000px, 100%); margin-inline: auto; }
.menu {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem;
  padding: .5rem 1rem; background: #f0f0ee; border-top: 1px solid var(--line);
}
.menu a {
  text-decoration: none; color: #333; font-weight: 600;
  padding: .4rem .9rem; border-radius: 999px;
}
.menu a:hover { background: #e2e2de; }
.menu a[aria-current="page"] { background: var(--green-dark); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 1rem; }
.hero__eyebrow {
  margin: 0; color: var(--green-dark); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem;
}
.hero h1 {
  margin: .25rem 0 .5rem; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.15;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}
.hero__lede { margin: 0 0 1.5rem; color: var(--muted); max-width: 60ch; }

.stats {
  display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.stat {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--green);
  border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--green-dark); }
.stat span { color: var(--muted); font-size: .95rem; }

.toc { margin-top: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.toc summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; }
.toc ol { margin: 0; padding: 0 1rem 1rem 2.4rem; columns: 2 300px; column-gap: 2rem; }
.toc li { break-inside: avoid; margin: .15rem 0; }

/* ---------- Filtres ---------- */
.filters-bar {
  position: sticky; top: 0; z-index: 20; background: rgba(244,246,241,.94);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); padding: .6rem 0;
}
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.chip {
  font: inherit; font-size: .95rem; cursor: pointer; border: 2px solid var(--line);
  background: #fff; color: var(--ink); border-radius: 999px; padding: .3rem .9rem;
}
.chip:hover { border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.filters__status { margin-left: auto; color: var(--muted); font-size: .9rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 2rem 0; padding: 0 0 0 1.6rem; border-left: 4px solid var(--green); }
.entry { position: relative; margin-bottom: 1.75rem; }
.entry::before {
  content: ""; position: absolute; left: calc(-1.6rem - 11px); top: 1.4rem;
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--green);
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.25rem; box-shadow: var(--shadow);
}
.card__head { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; margin-bottom: .2rem; }
.card__head time { font-weight: 700; color: var(--muted); text-transform: capitalize; }
.card h3 { margin: .1rem 0 .5rem; font-size: 1.35rem; line-height: 1.25; font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
.card h4 { margin: 1.2rem 0 .3rem; font-size: 1.1rem; }
.card p { margin: .5rem 0; }
.card ul { margin: .5rem 0; padding-left: 1.3rem; }

.tag {
  display: inline-block; font-size: .8rem; font-weight: 700; color: #fff;
  padding: .1rem .65rem; border-radius: 999px;
}
.tag--missions { background: var(--c-missions); }
.tag--bourses { background: var(--c-bourses); }
.tag--francophonie { background: var(--c-francophonie); }
.tag--partenariats { background: var(--c-partenariats); }
.tag--evenements { background: var(--c-evenements); }

/* ---------- Galeries de photos ---------- */
.gallery {
  display: grid; gap: .5rem; margin-top: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.gallery--solo { grid-template-columns: minmax(0, 420px); }
.gallery--wall { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.photo { display: block; border-radius: 8px; overflow: hidden; background: #ddd; }
.photo img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease;
}
.gallery--solo .photo img { aspect-ratio: auto; max-height: 360px; object-fit: contain; background: #eee; }
.photo:hover img, .photo:focus-visible img { transform: scale(1.04); }

/* ---------- Détails, tableau ---------- */
details.more { margin-top: .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--green-soft); }
details.more summary { cursor: pointer; padding: .55rem .9rem; font-weight: 700; color: var(--green-dark); }
details.more ul { margin: 0; padding: .2rem 1rem 1rem 2.2rem; columns: 2 280px; column-gap: 2rem; }
details.more li { break-inside: avoid; margin: .2rem 0; }

.table-wrap { overflow-x: auto; margin-top: .8rem; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; }
caption { text-align: left; font-weight: 700; padding-bottom: .4rem; }
th, td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--green-soft); color: var(--green-dark); }
tbody th { font-weight: 600; }

/* ---------- Section « retour en images » ---------- */
.wall { margin: 3rem 0 2rem; }
.wall h2 { font-family: "Trebuchet MS", "Segoe UI", sans-serif; font-size: 1.8rem; margin-bottom: .2rem; }
.wall .card { margin-top: 1rem; }

/* ---------- Appel au soutien + pied de page ---------- */
.cta {
  margin: 2.5rem 0; padding: 1.5rem; border-radius: var(--radius);
  background: var(--green-dark); color: #fff;
}
.cta h2 { margin: 0 0 .3rem; font-size: 1.4rem; }
.cta p { margin: 0 0 1rem; }
.btn {
  display: inline-block; background: #fff; color: var(--green-dark); font-weight: 700;
  text-decoration: none; padding: .6rem 1.2rem; border-radius: 999px;
}
.btn:hover { background: var(--green-soft); color: var(--green-dark); }

.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 1.5rem 0; color: var(--muted); font-size: .95rem; }

/* ---------- Lightbox (<dialog>) ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(0,0,0,.88); }
.lightbox__inner {
  height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 1rem;
}
.lightbox img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lightbox__caption { color: #eee; text-align: center; margin: .6rem 0 0; font-size: .95rem; }
.lightbox button {
  position: fixed; background: rgba(255,255,255,.15); color: #fff; border: 0; cursor: pointer;
  width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; }
.lightbox__next { right: 1rem; top: 50%; }

/* ---------- Petits écrans ---------- */
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .timeline { padding-left: 1.1rem; }
  .entry::before { left: calc(-1.1rem - 11px); }
  .filters__status { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo img { transition: none; }
}

/* ==========================================================
   Page « Bulletins » (liste des bulletins par année)
   ========================================================== */
.hero__eyebrow .back { color: var(--green-dark); text-decoration: none; }
.hero__eyebrow .back:hover { text-decoration: underline; }

.years {
  list-style: none; margin: 1.5rem 0; padding: 0;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.year-card__link {
  display: block; height: 100%; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.year-card__link:hover, .year-card__link:focus-visible {
  transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 10px 24px rgba(0,0,0,.10);
}
.year-card__link img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.year-card__body { display: grid; gap: .25rem; padding: 1rem 1.25rem 1.25rem; }
.year-card__year {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif; font-size: 2.4rem; font-weight: 700;
  line-height: 1; color: var(--green-dark);
}
.year-card__title { font-weight: 700; }
.year-card__meta { color: var(--muted); font-size: .95rem; }
.year-card__cta { margin-top: .5rem; font-weight: 700; color: var(--brown); }
.note { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .year-card__link { transition: none; }
  .year-card__link:hover { transform: none; }
}
