/* ============================================================
   AES — Alliance des États du Sahel
   Design tokens
   ============================================================ */
.aes-page {
  /* Core palette */
  --green-950: #061e16;
  --green-900: #0a3628;
  --green-800: #0e4933;
  --green-700: #145c40;
  --green-600: #1c7350;

  --gold-700: #a97a24;
  --gold-500: #cf9b3d;
  --gold-300: #e8cb8a;

  --sahel-orange: #e05206;
  --sahel-red: #ce1126;

  --paper: #faf6ec;
  --white: #ffffff;
  --ink: #14201a;
  --ink-soft: #4d5850;
  --ink-faint: #8b968d;
  --line: rgba(20, 32, 26, 0.12);
  --line-on-dark: rgba(255, 255, 255, 0.16);

  /* Flag-accurate colors */
  --mali-green: #14b53a;
  --mali-gold: #fcd116;
  --mali-red: #ce1126;

  --burkina-red: #ef3340;
  --burkina-green: #009e49;
  --burkina-gold: #fcd116;

  --niger-orange: #e05206;
  --niger-white: #ffffff;
  --niger-green: #0db02b;

  /* Type */
  --font-display: "Fraunces", "Zilla Slab", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-soft: 0 20px 50px -20px rgba(6, 30, 22, 0.35);
  --shadow-card: 0 8px 24px -12px rgba(20, 32, 26, 0.18);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.aes-page * { box-sizing: border-box; }
.aes-page { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  .aes-page { scroll-behavior: auto; }
  .aes-page * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.aes-page {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.aes-page h1,
.aes-page h2,
.aes-page h3,
.aes-page h4 { font-family: var(--font-display); margin: 0; font-weight: 600; }
.aes-page p { margin: 0; }
.aes-page a { color: inherit; text-decoration: none; }
.aes-page ul,
.aes-page ol,
.aes-page dl { margin: 0; padding: 0; list-style: none; }
.aes-page button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.aes-page img { max-width: 100%; display: block; }

.aes-page .eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin: 0 0 14px;
}
.aes-page .eyebrow-dark { color: var(--gold-700); }

.aes-page .tri-mark { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.aes-page .tri-mark::after {
  content: "";
  width: 46px;
  height: 1px;
  background: var(--line);
  margin-left: 4px;
}
.aes-page .tri-dot { width: 7px; height: 7px; border-radius: 50%; display: block; }
.aes-page .tri-mali { background: var(--mali-green); }
.aes-page .tri-burkina { background: var(--burkina-red); }
.aes-page .tri-niger { background: var(--niger-orange); }

/* ============================================================
   NAV
   ============================================================ */
.aes-page .site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 30, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-on-dark);
}
.aes-page .nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.aes-page .nav-brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.aes-page .brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.aes-page .brand-full {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.72);
  border-left: 1px solid var(--line-on-dark);
  padding-left: 12px;
}
.aes-page .nav-links { display: flex; gap: 32px; }
.aes-page .nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.aes-page .nav-links a:hover { color: var(--gold-300); }
.aes-page .nav-toggle { display: none; flex-direction: column; gap: 5px; width: 26px; }
.aes-page .nav-toggle span { display: block; height: 2px; background: var(--white); border-radius: 2px; }

/* ============================================================
   HERO — full-bleed, no vertical whitespace: text sits to the
   left, the union animation plays to the right, and once the
   three nations lock into place the "A.E.S" reveal fades in
   beside the text, tying the two sides together.
   ============================================================ */
.aes-page .hero {
  position: relative;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0px clamp(24px, 5vw, 64px) 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
}

.aes-page .hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 76px);
}

.aes-page .hero-text {
  flex: 1 1 380px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  opacity: 0;
  transform: translateY(14px);
  animation: heroTextIn 0.9s var(--ease) 0.15s forwards;
}
@keyframes heroTextIn {
  to { opacity: 1; transform: translateY(0); }
}
.aes-page .hero-title {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.14;
  font-weight: 600;
  color: var(--green-900);
  letter-spacing: -0.01em;
}
.aes-page .hero-sub {
  margin-top: 14px;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38ch;
}

/* ---- Divider — grows between text and map once the union lands ---- */
.aes-page .hero-divider {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  margin: 28px 0;
  background: linear-gradient(180deg, transparent, var(--gold-500) 50%, transparent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 1s var(--ease);
}
.aes-page .hero-divider.is-in { transform: scaleY(1); }

/* ---- Stage (where the maps come together) ---- */
.aes-page .stage {
  position: relative;
  flex: 1 1 480px;
  max-width: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aes-page .stage::before {
  content: "";
  position: absolute;
  inset: -40px;
  background-image: radial-gradient(rgba(20,32,26,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 82% at 50% 46%, black 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 82% at 50% 46%, black 20%, transparent 78%);
  pointer-events: none;
}

/* ---- Flag intro — three stages in the same footprint as the stage:
   1) the three flags sit side by side
   2) each one flips in place to reveal that nation's own silhouette
   3) the row then hands off to the real map assembly (fades as the
      big union map's pieces fly into their true positions) ---- */
.aes-page .flag-intro {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px) scale(0.92);
  transition: opacity 0.55s var(--ease), transform 0.6s var(--ease);
}
.aes-page .flag-intro.is-in { opacity: 1; transform: translateY(0) scale(1); }
.aes-page .flag-intro.is-out {
  opacity: 0;
  transform: scale(1.2);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.aes-page .flag-flip {
  width: clamp(58px, 9vw, 92px);
  height: clamp(39px, 6vw, 61px);
  perspective: 900px;
}
.aes-page .flag-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.5, 0.1, 0.2, 1);
}
.aes-page .flag-intro.is-flipped .flag-flip-inner { transform: rotateY(180deg); }
.aes-page .flag-intro.is-flipped #flipMali .flag-flip-inner { transition-delay: 0s; }
.aes-page .flag-intro.is-flipped #flipBurkina .flag-flip-inner { transition-delay: 0.12s; }
.aes-page .flag-intro.is-flipped #flipNiger .flag-flip-inner { transition-delay: 0.24s; }

.aes-page .flag-face {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 24px -10px rgba(6, 30, 22, 0.4), 0 0 0 1px rgba(255,255,255,0.55) inset;
}
.aes-page .flag-face--back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250, 246, 236, 0.5);
}
.aes-page .flag-face--back svg { width: 82%; height: 82%; overflow: visible; filter: drop-shadow(0 3px 6px rgba(6,30,22,0.3)); }

.aes-page .flag-card--mali { background: linear-gradient(90deg, var(--mali-green) 0 33.34%, var(--mali-gold) 33.34% 66.67%, var(--mali-red) 66.67% 100%); }
.aes-page .flag-card--burkina { background: linear-gradient(180deg, var(--burkina-red) 0 50%, var(--burkina-green) 50% 100%); }
.aes-page .flag-card--niger { background: linear-gradient(180deg, var(--niger-orange) 0 33.34%, var(--niger-white) 33.34% 66.67%, var(--niger-green) 66.67% 100%); }
.aes-page .flag-emblem {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: var(--burkina-gold);
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1;
}
.aes-page .flag-emblem--niger {
  width: clamp(10px, 1.6vw, 14px);
  height: clamp(10px, 1.6vw, 14px);
  border-radius: 50%;
  background: var(--niger-orange);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}

.aes-page .flag-plus {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--gold-700);
  transition: opacity 0.4s ease;
}
.aes-page .flag-intro.is-flipped .flag-plus { opacity: 0.35; }

.aes-page .union-glow {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: min(58vh, 92%, 700px);
  height: min(58vh, 92%, 700px);
  transform: translate(-50%, -50%) scale(0.7);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,203,138,0.55) 0%, rgba(232,203,138,0) 70%);
  opacity: 0;
  pointer-events: none;
}
.aes-page .union-glow.is-in { animation: glowLife 4.2s var(--ease) 0s infinite; }
@keyframes glowLife {
  0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.68); }
  16%  { opacity: 1;    transform: translate(-50%, -50%) scale(1.02); }
  45%  { opacity: 0.82; transform: translate(-50%, -50%) scale(0.97); }
  75%  { opacity: 1;    transform: translate(-50%, -50%) scale(1.02); }
  100% { opacity: 0.88; transform: translate(-50%, -50%) scale(1);    }
}

.aes-page .impact-ring {
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 2.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.5);
  pointer-events: none;
}
.aes-page .impact-ring.is-in { animation: ringBurst 1s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes ringBurst {
  0%   { opacity: 0.95; transform: scale(0.55); }
  100% { opacity: 0;    transform: scale(1.35); }
}

.aes-page .union-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 560 / 460;
  max-width: 560px;
  overflow: visible;
  filter: drop-shadow(0 20px 38px rgba(6, 30, 22, 0.3));
}
.aes-page .union-map.settled { animation: floatMap 6.5s ease-in-out 0.3s infinite; }
@keyframes floatMap {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* Each country piece flies in from its real-world direction and snaps into
   its true geographic position with a confident, springy motion, so the
   three borders meet exactly and form a single unified territory — each
   nation rendered in the colors of its own national flag, not one flat tone. */
.aes-page .landmass {
  stroke: var(--paper);
  stroke-width: 1.6;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 1.05s cubic-bezier(0.22, 1.4, 0.36, 1);
  transform-box: fill-box;
  transform-origin: center;
}
.aes-page .landmass--mali { transform: translate(-420px, 10px) rotate(-8deg) scale(0.94); }
.aes-page .landmass--burkina { transform: translate(-20px, 320px) rotate(10deg) scale(0.9); transition-delay: 0.22s; }
.aes-page .landmass--niger { transform: translate(420px, -20px) rotate(8deg) scale(0.94); transition-delay: 0.44s; }
.aes-page .landmass.is-in { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }

/* Flag charges (Burkina Faso's star, Niger's sun) travel with their piece.
   NOTE: these must stay class-only selectors (no #id) so that the .is-in
   final-state rule — which also uses two classes — has equal-or-higher
   specificity and reliably overrides the entrance transform. */
.aes-page .flag-charge {
  opacity: 0;
  filter: drop-shadow(0 1px 2px rgba(6,30,22,0.4));
  transition: opacity 0.7s var(--ease), transform 1.05s cubic-bezier(0.22, 1.4, 0.36, 1);
  transform-box: fill-box;
  transform-origin: center;
}
.aes-page .flag-charge--burkina { fill: #fcd116; transform: translate(-20px, 320px) rotate(10deg) scale(0.9); transition-delay: 0.22s; }
.aes-page .flag-charge--niger { fill: #e05206; stroke: var(--paper); stroke-width: 1.5; transform: translate(420px, -20px) rotate(8deg) scale(0.94); transition-delay: 0.44s; }
.aes-page .flag-charge.is-in { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }

.aes-page .badge-group .badge-inner {
  opacity: 0;
  transform: translateY(-10px) scale(0.5);
  transition: opacity 0.5s var(--ease), transform 0.55s cubic-bezier(0.34, 1.7, 0.64, 1);
  transform-box: fill-box;
  transform-origin: center;
}
.aes-page .badge-group.is-in .badge:nth-child(1) .badge-inner { transition-delay: 0.05s; }
.aes-page .badge-group.is-in .badge:nth-child(2) .badge-inner { transition-delay: 0.18s; }
.aes-page .badge-group.is-in .badge:nth-child(3) .badge-inner { transition-delay: 0.31s; }
.aes-page .badge-group.is-in .badge-inner { opacity: 1; transform: translateY(0) scale(1); }

.aes-page .badge-label {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--paper);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(6, 30, 22, 0.65);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.aes-page .aes-result {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  width: 100%;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.aes-page .aes-result.is-in { opacity: 1; transform: translateX(0); }

.aes-page .aes-label { text-align: left; }
.aes-page .aes-word {
  margin: 0;
  display: flex;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  color: var(--green-900);
  letter-spacing: 0.02em;
  line-height: 1;
}
.aes-page .aes-word .letter,
.aes-page .aes-word .dot {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.6s var(--ease), text-shadow 0.7s ease;
  transition-delay: calc(0.05s + var(--i) * 0.09s);
}
.aes-page .aes-word .dot { color: var(--gold-500); }
.aes-page .aes-result.is-in .aes-word .letter,
.aes-page .aes-result.is-in .aes-word .dot { opacity: 1; transform: translateY(0); }
.aes-page .aes-result.is-in .aes-word .letter { animation: aesLetterGlow 1.5s ease 0.5s 1; }
@keyframes aesLetterGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(232, 203, 138, 0); }
  45% { text-shadow: 0 0 16px rgba(232, 203, 138, 0.9); }
}

.aes-page .aes-caption-wrap {
  overflow: hidden;
  margin-top: 6px;
}
.aes-page .aes-caption {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-700);
}
.aes-page .aes-caption.reveal-clip {
  transform: translateX(-108%);
  transition: transform 0.75s var(--ease);
  transition-delay: 0.5s;
}
.aes-page .aes-result.is-in .aes-caption.reveal-clip { transform: translateX(0); }

.aes-page .aes-nations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.aes-page .aes-nations li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-800);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(0.85s + var(--i) * 0.13s);
}
.aes-page .aes-result.is-in .aes-nations li { opacity: 1; transform: translateX(0); }
.aes-page .nation-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(20,32,26,0.1); }
.aes-page .dot-mali { background: linear-gradient(135deg, var(--mali-green), var(--mali-gold)); }
.aes-page .dot-burkina { background: linear-gradient(135deg, var(--burkina-red), var(--burkina-green)); }
.aes-page .dot-niger { background: linear-gradient(135deg, var(--niger-orange), var(--niger-green)); }

/* ---- Scroll cue — pinned low, doesn't add height to the layout ---- */
.aes-page .scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 4px;
}
.aes-page .scroll-cue-text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.aes-page .scroll-cue-icon { animation: scrollBounce 1.8s ease-in-out infinite; }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (max-width: 900px) {
  .aes-page .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-950);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .aes-page .nav-links a { padding: 16px 32px; border-top: 1px solid var(--line-on-dark); }
  .aes-page .nav-open .nav-links { max-height: 320px; }
  .aes-page .nav-toggle { display: flex; }
  .aes-page .brand-full { display: none; }
}

@media (max-width: 980px) {
  .aes-page .hero { padding: 24px 20px 48px; min-height: auto; }
  .aes-page .hero-inner { flex-direction: column; }
  .aes-page .hero-text {
    flex: 0 0 auto;
    width: 100%;
    align-items: center;
    text-align: center;
    max-width: 520px;
  }
  .aes-page .hero-sub { max-width: 46ch; }
  .aes-page .aes-result { align-items: center; text-align: center; border-top: none; margin-top: 18px; padding-top: 0; }
  .aes-page .aes-label { text-align: center; }
  .aes-page .hero-divider {
    width: 140px;
    height: 1px;
    align-self: center;
    margin: 4px 0;
    background: linear-gradient(90deg, transparent, var(--gold-500) 50%, transparent);
    transform: scaleX(0);
  }
  .aes-page .hero-divider.is-in { transform: scaleX(1); }
  .aes-page .stage { flex: 0 0 auto; width: 100%; max-width: 480px; }
  .aes-page .scroll-cue { display: none; }
  .aes-page .flag-flip { width: clamp(52px, 16vw, 78px); height: clamp(35px, 11vw, 52px); }
  .aes-page .flag-intro { gap: 12px; }
}
@media (max-width: 560px) {
  .aes-page .hero { padding: 20px 16px 32px; }
  .aes-page .badge-label { font-size: 12px; }
  .aes-page .aes-word { font-size: 2rem; }
}
@media (min-width: 981px) and (max-height: 760px) {
  .aes-page .hero-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
  .aes-page .hero-sub { margin-top: 8px; font-size: 0.94rem; }
  .aes-page .aes-result { margin-top: 16px; padding-top: 14px; }
  .aes-page .aes-word { font-size: clamp(1.7rem, 3vw, 2.2rem); }
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.aes-page .section { padding: 100px 32px; position: relative; }
.aes-page .section-inner { max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
.aes-page .history,
.aes-page .presidents,
.aes-page .nations {
  background-image: radial-gradient(rgba(20,32,26,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -8px -8px;
}
.aes-page .presidents { background-color: var(--white); }
.aes-page .section-title {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  color: var(--green-900);
  max-width: 18ch;
  margin-bottom: 18px;
}
.aes-page .section-lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 62ch;
  line-height: 1.65;
  margin-bottom: 56px;
}

/* Séparateur ornemental entre sections institutionnelles */
.aes-page .history::after,
.aes-page .presidents::after,
.aes-page .nations::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translate(-50%, 50%) rotate(45deg);
  width: 9px;
  height: 9px;
  background: var(--gold-500);
  z-index: 2;
}
.aes-page .history::before,
.aes-page .presidents::before,
.aes-page .nations::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 140px;
  height: 1px;
  background: var(--line);
  z-index: 1;
}

/* ============================================================
   TIMELINE (Histoire) — frise institutionnelle alternée avec
   colonne vertébrale centrale, chapitres numérotés et icônes.
   ============================================================ */
.aes-page .history { background: var(--paper); position: relative; }

.aes-page .timeline-v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* central spine, desktop */
.aes-page .timeline-v2::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 6%, var(--line) 94%, transparent);
  transform: translateX(-50%);
}

.aes-page .tl-row {
  position: relative;
  width: 100%;
  display: flex;
  padding: 30px 0;
}
.aes-page .tl-row:first-child { padding-top: 0; }

.aes-page .tl-node {
  position: absolute;
  left: 50%;
  top: 34px;
  width: 11px;
  height: 11px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold-500);
  z-index: 2;
}
.aes-page .tl-node--major {
  width: 15px;
  height: 15px;
  background: var(--gold-500);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--gold-500);
}

.aes-page .tl-card {
  position: relative;
  width: calc(50% - 44px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 28px 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.aes-page .tl-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px rgba(20,32,26,0.24); }

/* odd rows (1st, 3rd...) → card on the left; even rows → card on the right */
.aes-page .tl-row:nth-child(odd) { justify-content: flex-start; }
.aes-page .tl-row:nth-child(even) { justify-content: flex-end; }

.aes-page .tl-row--major .tl-card { border-color: var(--gold-500); box-shadow: 0 10px 30px -14px rgba(169,122,36,0.35); }

.aes-page .tl-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.aes-page .tl-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-900);
  color: var(--gold-300);
}
.aes-page .tl-row--major .tl-icon { background: linear-gradient(150deg, var(--gold-500), var(--gold-700)); color: var(--white); }
.aes-page .tl-icon svg { width: 19px; height: 19px; }
.aes-page .tl-chapter {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-faint);
}
.aes-page .tl-date {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 8px;
}
.aes-page .tl-card h3 { font-size: 1.18rem; color: var(--green-900); margin-bottom: 8px; line-height: 1.3; }
.aes-page .tl-card p { color: var(--ink-soft); line-height: 1.62; font-size: 0.96rem; }

@media (max-width: 860px) {
  .aes-page .timeline-v2::before { left: 15px; }
  .aes-page .tl-row,
.aes-page .tl-row:nth-child(odd),
.aes-page .tl-row:nth-child(even) { justify-content: flex-start; padding-left: 40px; }
  .aes-page .tl-card { width: 100%; }
  .aes-page .tl-node { left: 15px; }
}

/* ============================================================
   PRESIDENTS — portraits officiels grand format
   ============================================================ */
.aes-page .presidents { background: var(--white); position: relative; }
.aes-page .pres-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.aes-page .pres-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 20px 30px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(20,32,26,0.06), 0 14px 30px -20px rgba(20,32,26,0.28);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.aes-page .pres-card:hover { transform: translateY(-6px); box-shadow: 0 1px 2px rgba(20,32,26,0.08), 0 26px 44px -18px rgba(20,32,26,0.32); }

.aes-page .pres-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 22px;
  box-shadow: 0 0 0 1px var(--line), 0 20px 32px -18px rgba(20,32,26,0.4);
}
.aes-page .pres-photo-frame::before,
.aes-page .pres-photo-frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  z-index: 2;
  pointer-events: none;
  border: 2px solid rgba(255,255,255,0.85);
}
.aes-page .pres-photo-frame::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.aes-page .pres-photo-frame::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.aes-page .pres-photo { transition: transform 0.6s var(--ease); }
.aes-page .pres-card:hover .pres-photo { transform: scale(1.045); }
.aes-page .pres-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Quand une vraie photo est ajoutée : <img class="pres-photo-img"> remplit le cadre. */
.aes-page .pres-photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.aes-page .pres-initials {
  font-family: var(--font-display);
  font-size: 4.4rem;
  font-weight: 700;
  color: rgba(255,255,255,0.94);
  letter-spacing: 0.02em;
}
.aes-page .pp-mali { background: linear-gradient(150deg, var(--mali-green), var(--green-900)); }
.aes-page .pp-burkina { background: linear-gradient(150deg, var(--burkina-red), var(--green-900)); }
.aes-page .pp-niger { background: linear-gradient(150deg, var(--niger-orange), var(--green-900)); }

.aes-page .pres-flag-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 40px;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 4px 10px -4px rgba(0,0,0,0.5);
}
.aes-page .pres-flag-badge svg { display: block; width: 100%; height: 100%; }

.aes-page .pres-index-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green-900);
  background: rgba(255,255,255,0.92);
  padding: 4px 10px;
  border-radius: 100px;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.35);
}

.aes-page .pres-body { padding: 0 4px; display: flex; flex-direction: column; flex: 1; }
.aes-page .pres-body h3 { font-size: 1.32rem; color: var(--green-900); margin-bottom: 4px; }
.aes-page .pres-role { font-size: 0.86rem; color: var(--gold-700); font-weight: 600; margin-bottom: 2px; }
.aes-page .pres-country { font-size: 0.8rem; color: var(--ink-faint); font-style: italic; margin-bottom: 16px; }
.aes-page .pres-bio { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.62; text-align: left; }

.aes-page .pres-meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.aes-page .pres-meta-label { font-size: 0.74rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.aes-page .pres-meta-value { font-family: var(--font-display); font-weight: 600; color: var(--green-900); font-size: 1.05rem; }

/* ============================================================
   NATIONS — fiches pays façon dossier officiel
   ============================================================ */
.aes-page .nations {
  background: var(--paper);
  position: relative;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 24px -24px rgba(6, 30, 22, 0.12) inset;
}
.aes-page .nation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.aes-page .nation-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(20,32,26,0.06), 0 14px 30px -20px rgba(20,32,26,0.26);
  padding: 30px 30px 32px;
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.aes-page .nation-card:hover { transform: translateY(-5px); box-shadow: 0 1px 2px rgba(20,32,26,0.08), 0 26px 44px -18px rgba(20,32,26,0.3); }

.aes-page .nation-card-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 22px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.aes-page .nation-flag-emblem {
  flex: 0 0 auto;
  width: 58px;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(20,32,26,0.14), 0 8px 16px -8px rgba(20,32,26,0.45);
  transition: transform 0.35s var(--ease);
}
.aes-page .nation-card:hover .nation-flag-emblem { transform: scale(1.05); }
.aes-page .nation-head-text { min-width: 0; }
.aes-page .nation-index {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: 4px;
}
.aes-page .nation-head-text h3 { font-size: 1.4rem; color: var(--green-900); margin-bottom: 6px; }
.aes-page .nation-capital {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-style: italic;
}
.aes-page .nation-capital svg { width: 14px; height: 14px; flex: 0 0 auto; }

.aes-page .nation-dossier { display: flex; flex-direction: column; gap: 3px; margin-bottom: 22px; }
.aes-page .nd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.86rem;
}
.aes-page .nd-row:last-child { border-bottom: none; }
.aes-page .nd-row dt { display: flex; align-items: center; gap: 9px; color: var(--ink-faint); }
.aes-page .nd-row dt svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--gold-700); }
.aes-page .nd-row dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

.aes-page .nation-quote {
  position: relative;
  margin: 0;
  padding: 4px 0 0 26px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--green-800);
  flex: 1;
}
.aes-page .nq-mark {
  position: absolute;
  left: -4px;
  top: -10px;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-style: normal;
  color: var(--gold-300);
  line-height: 1;
}

.aes-page .nation-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--green-900);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.aes-page .nation-link svg { width: 13px; height: 13px; flex: 0 0 auto; }
.aes-page .nation-link:hover { background: var(--green-900); border-color: var(--green-900); color: var(--white); }

@media (max-width: 860px) {
  .aes-page .pres-grid,
.aes-page .nation-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.aes-page .site-footer { background: var(--green-950); color: rgba(255,255,255,0.82); }
.aes-page .footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 32px 48px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.aes-page .footer-brand p { margin-top: 12px; font-size: 0.88rem; color: rgba(255,255,255,0.55); line-height: 1.6; }
.aes-page .footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.aes-page .footer-cols h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-300);
  margin-bottom: 16px;
}
.aes-page .footer-cols a,
.aes-page .footer-cols span {
  display: block;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
  margin-bottom: 10px;
}
.aes-page .footer-cols a:hover { color: var(--white); }
.aes-page .footer-bar {
  border-top: 1px solid var(--line-on-dark);
  padding: 20px 32px;
  text-align: center;
}
.aes-page .footer-bar p { font-size: 0.78rem; color: rgba(255,255,255,0.45); }

/* ============================================================
   Utility: SVG gradient defs (injected) target
   ============================================================ */
.aes-page #svgDefs { position: absolute; width: 0; height: 0; overflow: hidden; }