/* Page "L'APE" — même style que l'agenda et le bureau */
.ape-bte {
  --bte-noir: #1f1d24;
  --bte-texte: #4a4752;
  --bte-ligne: #ece7df;
  --bte-orange: #f29400;
  --bte-vert: #2fa84f;
  --bte-violet: #8e3c9e;
  --manuscrite: 'Gochi Hand', 'Comic Sans MS', cursive;

  position: relative;
  left: 50%;
  width: min(1040px, calc(100vw - 32px));
  transform: translateX(-50%);
  color: var(--bte-texte);
  line-height: 1.6;
}
.ape-bte *, .ape-bte *::before { box-sizing: border-box; }

.ape-section { margin-bottom: 4rem; }

.ape-bte .ape-titre {
  margin: 0 0 1.5rem;
  text-align: center;
  font-family: var(--manuscrite);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--bte-noir);
}
.ape-bte .ape-sous-titre {
  margin: 2.2rem 0 1rem;
  font-family: var(--manuscrite);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--bte-noir);
}
.ape-bte .ape-chapo {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  text-align: center;
  font-size: 1.08rem;
}

/* Couleurs */
.ape-carte--orange, .ape-anim--orange, .ape-pastille--orange { --accent: var(--bte-orange); --accent-doux: #fff3e0; }
.ape-carte--vert,   .ape-anim--vert,   .ape-pastille--vert   { --accent: var(--bte-vert);   --accent-doux: #e7f6eb; }
.ape-carte--violet, .ape-anim--violet, .ape-pastille--violet { --accent: var(--bte-violet); --accent-doux: #f4e9f6; }

/* Cartes */
.ape-duo  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.ape-aides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.ape-carte {
  position: relative;
  padding: 1.6rem 1.5rem 1.5rem;
  background: #fff;
  border: 1px solid var(--bte-ligne);
  border-top: 6px solid var(--accent);
  border-radius: 20px;
  box-shadow: 0 10px 30px -18px rgba(31, 29, 36, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ape-carte:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -18px rgba(31, 29, 36, 0.45);
}
.ape-bte .ape-carte h3 {
  margin: 0.8rem 0 0.4rem;
  font-family: var(--manuscrite);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--accent);
}
.ape-carte p { margin: 0; }
.ape-carte__icone {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-doux);
  font-size: 2rem;
  transition: transform 0.3s cubic-bezier(.3, 1.8, .5, 1);
}
.ape-carte:hover .ape-carte__icone { transform: rotate(-10deg) scale(1.1); }
.ape-carte__badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 0.2rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--manuscrite);
  font-size: 2.2rem;
  line-height: 1.3;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--accent) 65%, #000);
}
.ape-carte__badge small { font-size: 1.1rem; }

/* Animations */
.ape-animations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ape-anim {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--accent);
  font-family: var(--manuscrite);
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--bte-noir);
  transition: transform 0.25s cubic-bezier(.3, 1.6, .5, 1);
}
.ape-anim span {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-doux);
  font-size: 1.6rem;
}
.ape-anim:hover { transform: translateY(-4px) rotate(-1.5deg); }
.ape-anim:nth-child(even):hover { transform: translateY(-4px) rotate(1.5deg); }

.ape-lien { margin: 1.4rem 0 0; text-align: center; }
.ape-lien a {
  font-weight: 700;
  color: var(--bte-violet);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}

/* Chiffres */
.ape-chiffres {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ape-chiffre {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  padding: 1.3rem 1.8rem;
  background: #fff;
  border: 2px dashed var(--bte-orange);
  border-radius: 20px;
  text-align: center;
}
.ape-chiffre--total {
  background: var(--bte-orange);
  border: 2px solid var(--bte-orange);
  color: #fff;
  box-shadow: 0 6px 0 #b86f00;
  transform: rotate(-2deg);
}
.ape-chiffre__valeur {
  font-family: var(--manuscrite);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--bte-orange);
}
.ape-chiffre--total .ape-chiffre__valeur { color: #fff; }
.ape-chiffre__legende { font-weight: 700; font-size: 0.95rem; }

/* Projets */
.ape-projets {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ape-projets li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: #fff;
  border: 1px solid var(--bte-ligne);
  border-radius: 16px;
  transition: transform 0.25s ease;
}
.ape-projets li:hover { transform: translateX(6px); }
.ape-projets li > span { font-size: 1.8rem; flex-shrink: 0; }
.ape-projets p { margin: 0; }
.ape-projets strong { color: var(--bte-noir); }

/* D'où vient l'argent */
.ape-sources {
  margin-top: 2.5rem;
  padding: 1.8rem 1.5rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #fff3e0, #f4e9f6 55%, #e7f6eb);
  border-radius: 24px;
}
.ape-bte .ape-sources .ape-sous-titre { margin-top: 0; margin-bottom: 0.3rem; }
.ape-sources > p { margin: 0 0 1rem; }
.ape-sources__liste {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.ape-pastille {
  padding: 0.45rem 1rem;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--bte-noir);
}
.ape-bte .ape-merci {
  margin: 1.3rem 0 0;
  font-family: var(--manuscrite);
  font-size: 1.6rem;
  color: var(--bte-noir);
}

/* Appel à l'action */
.ape-appel {
  margin-top: 2rem;
  text-align: center;
}
.ape-bte .ape-appel p {
  margin: 0 0 0.8rem;
  font-family: var(--manuscrite);
  font-size: 1.7rem;
  color: var(--bte-noir);
}
.ape-bouton {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  background: #e9573f;
  color: #fff !important;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none !important;
  box-shadow: 0 5px 0 #b33d29;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ape-bouton:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #b33d29; }
.ape-bouton:active { transform: translateY(3px); box-shadow: 0 2px 0 #b33d29; }

/* Tablette / mobile */
@media (max-width: 900px) {
  .ape-aides, .ape-animations { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ape-duo, .ape-aides, .ape-animations { grid-template-columns: 1fr; }
  .ape-section { margin-bottom: 3rem; }
  .ape-chiffre { min-width: 0; width: 100%; }
  .ape-chiffre--total { transform: none; }
  .ape-anim { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ape-carte, .ape-anim, .ape-projets li, .ape-carte__icone, .ape-bouton { transition: none; }
}
