/* Elite Bénin : la page d'accueil. Effets inspirés de composants de 21st.dev, réécrits sans bibliothèque :
   Scroll Expansion Hero (@arunachalam), Text Rotate (@danielpetho), Interactive Image Accordion (@minhxthanh),
   Aurora Background (@manuarora700, dans eb-site.css), Motion Footer (@jahed, dans eb-site.css),
   un défilé de photos et des chiffres qui comptent. Tout s'arrête si le visiteur réduit les animations. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--eb-nav); }
body { margin: 0; background: var(--eb-bg); color: var(--eb-ink); font: 17px/1.6 var(--eb-text); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--eb-display); font-weight: 500; margin: 0; letter-spacing: -0.025em; }
h2 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.04; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 3px solid #4fbf74; outline-offset: 3px; }
.section { padding: clamp(88px, 11vw, 150px) 0; }
.section--tight { padding-top: 0; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(36px, 5vw, 60px); }
.head p { max-width: 52ch; color: var(--eb-muted); font-size: 18px; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; max-width: 58ch; }

/* 1. la grande image qui s'ouvre au défilement */
.xp { position: relative; height: 270vh; background: var(--eb-night); }
.xp__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; --ix: 30vw; --it: 25vh; --ir: 28px; --is: 1.12; --tx: 0px; --to: 1; --ao: 0; --p: 0; }
.xp__bg { position: absolute; inset: 0; background: center / cover no-repeat; transform: scale(1.06); }
.xp__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 18, 12, .62), rgba(8, 18, 12, .8)); }
.xp__media { position: absolute; inset: 0; clip-path: inset(var(--it) var(--ix) var(--it) var(--ix) round var(--ir)); will-change: clip-path; }
.xp__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--is)); }
.xp__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 18, 12, .35) 0%, rgba(8, 18, 12, .1) 35%, rgba(8, 18, 12, .82) 100%); opacity: calc(.35 + var(--ao) * .65); }
.xp__title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .08em;
             color: #fff; font-size: clamp(38px, 7.2vw, 108px); line-height: .98; letter-spacing: -0.04em; text-align: center; pointer-events: none;
             opacity: var(--to); text-shadow: 0 2px 30px rgba(0, 0, 0, .25); padding: 0 12px; }
.xp__title span { display: block; will-change: transform; }
.xp__title span:first-child { transform: translateX(calc(var(--tx) * -1)); }
.xp__title span:last-child { transform: translateX(var(--tx)); }
.xp__hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); color: rgba(255, 255, 255, .85); font-size: 14px;
            display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: calc(1 - var(--p) * 5); }
.xp__hint i { width: 1.5px; height: 34px; background: linear-gradient(#fff, transparent); animation: hint 1.8s var(--eb-ease) infinite; }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.xp__after { position: absolute; inset: auto 0 0; padding-bottom: clamp(36px, 8vh, 84px); color: #fff; opacity: var(--ao); transform: translateY(calc((1 - var(--ao)) * 28px)); visibility: hidden; }
.xp__after.is-on { visibility: visible; }
.devise { font: 500 clamp(36px, 6vw, 84px)/1.02 var(--eb-display); letter-spacing: -0.035em; margin-bottom: 22px; }
.rot { display: inline-grid; overflow: hidden; vertical-align: bottom; color: var(--eb-mint); padding-bottom: .06em; }
.rot__w { grid-area: 1 / 1; display: inline-flex; white-space: nowrap; }
.rot__c { display: inline-block; animation: cIn .6s var(--eb-ease) both; }
.rot__w.out .rot__c { animation: cOut .45s var(--eb-ease) both; }
@keyframes cIn { from { transform: translateY(105%); } to { transform: none; } }
@keyframes cOut { from { transform: none; } to { transform: translateY(-105%); } }
.xp__after .lead { margin-bottom: 30px; color: rgba(255, 255, 255, .92); }

/* 2. accès rapides */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: 22px; background: var(--eb-surface); text-decoration: none;
        border: 1.5px solid transparent; transition: transform .35s var(--eb-ease), border-color .35s, background-color .35s; }
.tile:hover { transform: translateY(-4px); border-color: var(--eb-green); background: #fff; }
.tile .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--eb-green); margin-bottom: 8px; transition: background-color .35s, color .35s; }
.tile:hover .ic { background: var(--eb-green); color: #fff; }
.tile .ic svg { width: 24px; height: 24px; }
.tile p { color: var(--eb-muted); font-size: 16px; }
.tile > svg { position: absolute; top: 28px; right: 28px; width: 20px; height: 20px; color: var(--eb-green); transition: transform .35s var(--eb-ease); }
.tile:hover > svg { transform: translate(3px, -3px) rotate(-45deg); }
@media (max-width: 899px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* 3. qui sommes-nous, et les chiffres */
.about { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about__text { display: grid; gap: 22px; }
.about__img { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--eb-surface); }
.about__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 1.4s var(--eb-ease); }
.about__img.seen img { transform: none; }
.facts { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; gap: 10px; }
.facts li { display: flex; gap: 12px; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--eb-green); transform: translateY(-2px); }
.stats { margin-top: clamp(64px, 8vw, 110px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--eb-line); }
.stat { padding: 30px 24px 0 0; display: grid; gap: 6px; align-content: start; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--eb-line); }
.stat b { font: 500 clamp(40px, 5vw, 68px)/1 var(--eb-display); letter-spacing: -0.04em; color: var(--eb-green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat span { color: var(--eb-muted); font-size: 15.5px; max-width: 22ch; }
@media (max-width: 899px) { .about { grid-template-columns: 1fr; } .about__img { aspect-ratio: 4 / 3; } .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; } .stat:nth-child(3) { border-left: 0; padding-left: 0; } }

/* 4. actualités */
.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { display: grid; gap: 18px; align-content: start; text-decoration: none; }
.card__img { border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--eb-surface); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--eb-ease); }
.card:hover .card__img img { transform: scale(1.045); }
.card__meta { display: flex; gap: 12px; color: var(--eb-muted); font-size: 14.5px; }
.card__meta span:first-child { color: var(--eb-green); font-weight: 600; }
.card p { color: var(--eb-muted); }
@media (max-width: 799px) { .news { grid-template-columns: 1fr; } }

/* 5. objectifs */
.goals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.goal { padding: 26px 22px 28px; border-radius: 22px; border: 1px solid var(--eb-line); display: grid; gap: 12px; align-content: start; background: #fff;
        transition: transform .35s var(--eb-ease), box-shadow .35s; }
.goal:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(13, 26, 18, .08); }
.goal svg { width: 30px; height: 30px; color: var(--eb-green); }
.goal p { color: var(--eb-muted); font-size: 15.5px; }
.goal .n { font: 500 14px/1 var(--eb-display); color: var(--eb-muted); }
@media (max-width: 1099px) { .goals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699px) { .goals { grid-template-columns: minmax(0, 1fr); } }

/* 6. rejoignez-nous et le défilé de photos */
.join { background: var(--eb-surface); overflow: hidden; }
.join__top { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: end; margin-bottom: 48px; }
.join__top .lead { margin-top: 18px; }
.mq { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.mq__track { display: flex; gap: 16px; width: max-content; animation: mq 60s linear infinite; }
.mq.paused .mq__track, .mq:hover .mq__track { animation-play-state: paused; }
.mq__track img { width: clamp(220px, 22vw, 300px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: 22px; background: #dfe9e2; }
@keyframes mq { to { transform: translateX(calc(-50% - 8px)); } }
.mq__ctl { margin-top: 22px; display: flex; justify-content: center; }
.pause { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--eb-line); background: #fff; cursor: pointer; font-size: 15px; }
.pause svg { width: 16px; height: 16px; }
@media (max-width: 799px) { .join__top { grid-template-columns: 1fr; } }

/* 7. nos actions : l'accordéon d'images */
.acc { display: flex; gap: 12px; height: clamp(440px, 64vh, 620px); }
.acc__it { position: relative; flex: 1 1 0; min-width: 72px; padding: 0; border: 0; border-radius: 24px; overflow: hidden; cursor: pointer; text-align: left;
           background: var(--eb-night); color: #fff; transition: flex-grow .8s var(--eb-ease); }
.acc__it.on { flex-grow: 5; cursor: default; }
.acc__it img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--eb-ease); }
.acc__it.on img { transform: scale(1); }
.acc__it::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 18, 12, .05) 30%, rgba(8, 18, 12, .82)); }
.acc__lab { position: absolute; z-index: 1; left: 50%; bottom: 26px; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl; font: 600 17px/1 var(--eb-display); white-space: nowrap; transition: opacity .3s; }
.acc__it.on .acc__lab { opacity: 0; }
.acc__body { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 32px; display: grid; gap: 8px; max-width: 560px; opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .5s var(--eb-ease); }
.acc__it.on .acc__body { opacity: 1; transform: none; transition-delay: .35s; }
.acc__body strong { font: 500 clamp(24px, 2.4vw, 32px)/1.1 var(--eb-display); letter-spacing: -0.02em; }
.acc__body span { color: rgba(255, 255, 255, .88); }
.acc__more { margin-top: 28px; }
@media (max-width: 799px) {
  .acc { flex-direction: column; height: auto; }
  .acc__it { flex: none; height: 76px; transition: height .7s var(--eb-ease); }
  .acc__it.on { height: 400px; }
  .acc__lab { writing-mode: horizontal-tb; transform: none; left: 24px; bottom: auto; top: 26px; }
  .acc__body { padding: 24px; }
}

/* 8. le programme et le budget */
.prog { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.prog__text { display: grid; gap: 22px; }
.who { border-top: 1px solid var(--eb-line); }
.who div { padding: 18px 0; border-bottom: 1px solid var(--eb-line); display: grid; gap: 4px; }
.who b { font-weight: 600; }
.who span { color: var(--eb-muted); }
.budget { background: var(--eb-surface); border-radius: 28px; padding: clamp(26px, 3.4vw, 44px); }
.budget h3 { margin-bottom: 18px; }
.budget ul { list-style: none; margin: 0; padding: 0; }
.budget li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #d3e2d7; }
.budget li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.budget li.total { border-bottom: 0; font: 500 24px/1.2 var(--eb-display); }
.budget .after { margin-top: 18px; padding: 18px 20px; border-radius: 16px; background: #fff; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.budget .after b { font: 500 34px/1 var(--eb-display); color: var(--eb-green); white-space: nowrap; }
@media (max-width: 899px) { .prog { grid-template-columns: 1fr; } }

/* 9. l'ambition, mot à mot sur la photo */
.amb { position: relative; color: #fff; padding: clamp(120px, 16vw, 200px) 0; overflow: hidden; background: var(--eb-night); }
.amb__bg { position: absolute; inset: -8% 0; background: center / cover no-repeat; opacity: .38; transform: translateY(var(--py, 0px)); }
.amb__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 70% at 30% 50%, rgba(8, 18, 12, .35), rgba(8, 18, 12, .85)); }
.amb .eb-wrap { position: relative; }
.amb__label { font-size: 15px; color: var(--eb-mint); margin-bottom: 22px; }
.amb__text { font: 500 clamp(30px, 4.4vw, 60px)/1.14 var(--eb-display); letter-spacing: -0.03em; max-width: 22ch; }
.amb__text .w { color: rgba(255, 255, 255, .26); transition: color .25s; }
.amb__text .w.on { color: #fff; }
.amb__text .w.hl.on { color: var(--eb-mint); }

/* 10. questions fréquentes */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); }
.faq > div:first-child .lead { margin-top: 18px; color: var(--eb-muted); }
.faq__list details { border-bottom: 1px solid var(--eb-line); }
.faq__list summary { list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 24px 0; cursor: pointer; font: 500 20px/1.3 var(--eb-display); }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary svg { flex: none; width: 22px; height: 22px; color: var(--eb-green); transition: transform .35s var(--eb-ease); }
.faq__list details[open] summary svg { transform: rotate(45deg); }
.faq__list .ans { overflow: hidden; }
.faq__list .ans p { padding: 0 0 24px; color: var(--eb-muted); max-width: 62ch; }
@media (max-width: 899px) { .faq { grid-template-columns: 1fr; } }

/* 11. contact */
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 32px; align-items: start; }
.contact h3 { font: 600 17px/1.3 var(--eb-text); letter-spacing: 0; margin-bottom: 8px; }
.contact p, .contact a { color: var(--eb-muted); }
.contact img { width: 96px; height: 92px; }
@media (max-width: 899px) { .contact { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .contact { grid-template-columns: 1fr; } }

/* quand le visiteur réduit les animations : tout est posé, rien ne bouge */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .xp { height: auto; }
  .xp__sticky { position: relative; height: auto; min-height: 100svh; }
  .xp__title { position: relative; inset: auto; padding: calc(var(--eb-nav) + 64px) var(--eb-gut) 0; align-items: flex-start; text-align: left; opacity: 1; font-size: clamp(36px, 6vw, 80px); }
  .xp__title span { transform: none !important; }
  .xp__after { position: relative; opacity: 1; transform: none; visibility: visible; padding-top: 32px; }
  .xp__hint { display: none; }
  .mq { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .mq__ctl { display: none; }
  .about__img img { transform: none; }
}
