/* Agenda "Bouge ton école" — frise de cartes */
.agenda-bte {
  --bte-noir: #1f1d24;
  --bte-texte: #4a4752;
  --bte-fond-carte: #ffffff;
  --bte-ligne: #ece7df;
  --bte-orange: #f29400;
  --bte-vert: #2fa84f;
  --bte-violet: #8e3c9e;
  --accent: var(--bte-orange);
  --accent-doux: #fff3e0;

  max-width: 820px;
  margin-inline: auto;
}

/* Titre de page */
.agenda-bte h1,
.agenda-bte > h1 {
  font-family: 'Gochi Hand', 'Comic Sans MS', cursive;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 400;
  text-align: center;
  color: var(--bte-noir);
  margin: 0.5em 0 1.2em;
}

/* Frise */
.agenda-liste {
  position: relative;
  display: grid;
  gap: 1.5rem;
  padding-left: 0;
}
.agenda-liste::before {
  content: '';
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 44px;
  width: 3px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    to bottom,
    var(--bte-ligne) 0 10px,
    transparent 10px 18px
  );
}

/* Carte */
.agenda-carte {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.25rem;
  align-items: start;
}
.agenda-carte--vert   { --accent: var(--bte-vert);   --accent-doux: #e7f6eb; }
.agenda-carte--violet { --accent: var(--bte-violet); --accent-doux: #f4e9f6; }

/* Pastille calendrier */
.agenda-pastille {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
  overflow: hidden;
  background: var(--bte-fond-carte);
  border: 2px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 4px 0 var(--accent);
  text-align: center;
  line-height: 1;
}
.agenda-pastille__mois {
  width: 100%;
  padding: 6px 0 5px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.agenda-pastille__jour {
  padding: 8px 0 4px;
  font-family: 'Gochi Hand', 'Comic Sans MS', cursive;
  font-size: 2.4rem;
  color: var(--bte-noir);
}
.agenda-pastille__fin {
  padding: 0 4px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}
.agenda-pastille__icone {
  padding: 10px 0;
  font-size: 2rem;
}
.agenda-pastille__jour + .agenda-pastille__fin { margin-top: -2px; }
.agenda-pastille:not(:has(.agenda-pastille__fin)) .agenda-pastille__jour { padding-bottom: 10px; }

/* Corps de la carte */
.agenda-corps {
  position: relative;
  background: var(--bte-fond-carte);
  border: 1px solid var(--bte-ligne);
  border-top: 5px solid var(--accent);
  border-radius: 18px;
  padding: 1.25rem 1.5rem 1.35rem;
  box-shadow: 0 10px 30px -18px rgba(31, 29, 36, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.agenda-carte:hover .agenda-corps {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -18px rgba(31, 29, 36, 0.45);
}

.agenda-bte .agenda-date {
  margin: 0 0 0.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.agenda-bte .agenda-titre {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin: 0 0 0.6rem;
  font-family: 'Gochi Hand', 'Comic Sans MS', cursive;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--bte-noir);
}
.agenda-titre__icone { font-size: 0.9em; flex-shrink: 0; }

.agenda-details {
  color: var(--bte-texte);
  line-height: 1.6;
}
.agenda-details p { margin: 0 0 0.55rem; }
.agenda-details p:last-child { margin-bottom: 0; }
/* Horaires en début de paragraphe ("21h00 : ...") mis en valeur */
.agenda-details strong,
.agenda-details b { color: var(--bte-noir); }

/* Étiquettes */
.agenda-etiquette {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.agenda-etiquette--passe {
  background: #e4e1dc;
  color: #6b6772;
}

/* Prochain rendez-vous */
.agenda-carte.is-prochain .agenda-corps {
  background: linear-gradient(135deg, var(--accent-doux), var(--bte-fond-carte) 60%);
  border-color: var(--accent);
  border-top-width: 5px;
}
.agenda-carte.is-prochain .agenda-pastille {
  animation: agenda-pulse 2.4s ease-in-out infinite;
}
@keyframes agenda-pulse {
  0%, 100% { transform: scale(1) rotate(0); }
  50%      { transform: scale(1.06) rotate(-3deg); }
}

/* Événements passés */
.agenda-carte.is-passe { opacity: 0.55; filter: grayscale(0.8); }
.agenda-carte.is-passe:hover { opacity: 0.85; filter: none; }

/* Apparition au défilement */
.agenda-carte.is-anime {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.agenda-carte.is-anime.is-visible { opacity: 1; transform: none; }
.agenda-carte.is-anime.is-visible.is-passe { opacity: 0.55; }

/* Mobile */
@media (max-width: 600px) {
  .agenda-liste::before { left: 31px; }
  .agenda-carte { grid-template-columns: 64px 1fr; gap: 0.8rem; }
  .agenda-pastille { width: 64px; border-radius: 12px; }
  .agenda-pastille__jour { font-size: 1.9rem; }
  .agenda-pastille__fin { font-size: 0.62rem; }
  .agenda-pastille__icone { font-size: 1.6rem; }
  .agenda-corps { padding: 1rem 1.1rem 1.1rem; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .agenda-carte.is-prochain .agenda-pastille { animation: none; }
  .agenda-corps { transition: none; }
}
