.lfihm-agenda {
  --agenda-navy: var(--navy, #071d49);
  --agenda-blue: var(--blue, #0839a8);
  --agenda-cyan: var(--cyan, #23b5c5);
  --agenda-gold: var(--gold, #e2aa4f);
  --agenda-muted: var(--muted, #647087);
  --agenda-line: #dce3ed;
  width: 100%;
  color: #152039;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.lfihm-agenda [hidden] { display: none !important; }
.lfihm-agenda .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.lfihm-agenda__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
  padding: 28px 32px;
  overflow: hidden;
  border: 1px solid rgba(7, 29, 73, .1);
  border-left: 5px solid var(--agenda-gold);
  border-radius: 0 18px 18px 0;
  background: linear-gradient(120deg, #fff 0%, #f6f9fd 100%);
  box-shadow: 0 12px 34px rgba(7, 29, 73, .07);
}

.lfihm-agenda__heading { position: relative; z-index: 1; max-width: 780px; }
.lfihm-agenda__eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--agenda-blue); font-size: .75rem; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.lfihm-agenda__eyebrow span { width: 34px; height: 2px; background: var(--agenda-gold); }
.lfihm-agenda__header h2 { margin: 0; color: var(--agenda-navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.6vw, 3.15rem); font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
.lfihm-agenda__intro { max-width: 680px; margin: 12px 0 0; color: var(--agenda-muted); font-size: 1rem; line-height: 1.65; }

.lfihm-agenda__mark { position: relative; display: grid; width: 92px; height: 92px; flex: 0 0 92px; place-items: center; border: 1px solid rgba(35, 181, 197, .28); border-radius: 50%; background: rgba(35, 181, 197, .07); }
.lfihm-agenda__mark::before,
.lfihm-agenda__mark::after { position: absolute; top: 25px; width: 7px; height: 18px; border-radius: 999px; background: var(--agenda-gold); content: ""; }
.lfihm-agenda__mark::before { left: 28px; }
.lfihm-agenda__mark::after { right: 28px; }
.lfihm-agenda__mark i:first-child { width: 48px; height: 43px; border: 3px solid var(--agenda-blue); border-radius: 7px; }
.lfihm-agenda__mark i:nth-child(2),
.lfihm-agenda__mark i:nth-child(3) { position: absolute; bottom: 31px; width: 7px; height: 7px; border-radius: 50%; background: var(--agenda-cyan); }
.lfihm-agenda__mark i:nth-child(2) { left: 34px; }
.lfihm-agenda__mark i:nth-child(3) { right: 34px; }

.lfihm-agenda--page .lfihm-agenda__header { min-height: 185px; padding: clamp(30px, 5vw, 52px); border: 0; border-left: 6px solid var(--agenda-gold); border-radius: 0 24px 24px 0; background: radial-gradient(circle at 82% 20%, rgba(35, 181, 197, .16), transparent 28%), linear-gradient(125deg, var(--agenda-navy), #0c326f); box-shadow: 0 18px 44px rgba(7, 29, 73, .16); }
.lfihm-agenda--page .lfihm-agenda__eyebrow { color: #8de5ed; }
.lfihm-agenda--page .lfihm-agenda__header h2 { color: #fff; }
.lfihm-agenda--page .lfihm-agenda__intro { color: #dbe7f8; }
.lfihm-agenda--page .lfihm-agenda__mark { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .07); }
.lfihm-agenda--page .lfihm-agenda__mark i:first-child { border-color: #fff; }

.lfihm-agenda__filters { display: flex; flex-wrap: wrap; gap: 9px; width: fit-content; margin: 0 0 28px; padding: 6px; border: 1px solid var(--agenda-line); border-radius: 999px; background: #f5f8fc; }
.lfihm-agenda__filters button { min-height: 44px; padding: 9px 18px; border: 0; border-radius: 999px; background: transparent; color: #42516b; font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.lfihm-agenda__filters button:hover { color: var(--agenda-blue); }
.lfihm-agenda__filters button.is-active { background: var(--agenda-navy); color: #fff; box-shadow: 0 6px 15px rgba(7, 29, 73, .18); }
.lfihm-agenda__filters button:focus-visible,
.lfihm-agenda a:focus-visible { outline: 3px solid var(--agenda-cyan); outline-offset: 3px; }

.lfihm-agenda__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.lfihm-agenda__card { position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid rgba(226, 170, 79, .38); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(7, 29, 73, .075); transition: transform .22s ease, box-shadow .22s ease; }
.lfihm-agenda__card::before { position: absolute; z-index: 2; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--agenda-gold), var(--agenda-cyan), var(--agenda-blue)); content: ""; }
.lfihm-agenda__card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(7, 29, 73, .13); }
.lfihm-agenda__card.is-past { opacity: .78; }

.lfihm-agenda__media { display: block; height: 180px; overflow: hidden; background: #edf2f7; }
.lfihm-agenda__media img { display: block; width: 100%; height: 100%; padding: 6px; object-fit: contain; object-position: center; background: #edf2f7; }
.lfihm-agenda__placeholder { position: relative; display: grid; width: 100%; height: 100%; place-items: center; overflow: hidden; background: linear-gradient(135deg, var(--agenda-navy), #0d3d83); }
.lfihm-agenda__placeholder::before,
.lfihm-agenda__placeholder::after { position: absolute; border: 1px solid rgba(141, 229, 237, .28); border-radius: 50%; content: ""; }
.lfihm-agenda__placeholder::before { width: 120px; height: 120px; transform: translate(75px, -40px); }
.lfihm-agenda__placeholder::after { width: 80px; height: 80px; transform: translate(-90px, 55px); }
.lfihm-agenda__placeholder i { position: absolute; width: 50px; height: 50px; border: 2px solid var(--agenda-gold); transform: rotate(45deg); }
.lfihm-agenda__placeholder b { position: relative; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: .82rem; letter-spacing: .18em; }

.lfihm-agenda__card-main { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 18px; flex: 1; padding: 22px; }
.lfihm-agenda__date { display: flex; width: 66px; height: 86px; flex-direction: column; align-items: center; justify-content: center; align-self: start; border: 1px solid rgba(8, 57, 168, .16); border-radius: 13px; background: #f5f8fd; color: var(--agenda-navy); text-align: center; }
.lfihm-agenda__date strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; line-height: 1; }
.lfihm-agenda__date span { margin-top: 5px; color: var(--agenda-blue); font-size: .67rem; font-weight: 900; letter-spacing: .06em; }
.lfihm-agenda__date small { margin-top: 2px; color: var(--agenda-muted); font-size: .68rem; }
.lfihm-agenda__content { display: flex; min-width: 0; flex-direction: column; }
.lfihm-agenda__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.lfihm-agenda__meta span { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; color: #536179; background: #f1f4f8; font-size: .68rem; font-weight: 800; line-height: 1.2; }
.lfihm-agenda__meta .lfihm-agenda__audience--primaire { background: #eafafb; color: #08727c; }
.lfihm-agenda__meta .lfihm-agenda__audience--secondaire { background: #fff5e3; color: #8a5700; }
.lfihm-agenda__meta .lfihm-agenda__audience--parents { background: #eef1ff; color: #343f99; }
.lfihm-agenda__meta .lfihm-agenda__audience--personnels { background: #f1ebff; color: #5b2a86; }
.lfihm-agenda__location::before { margin-right: 5px; color: var(--agenda-gold); content: "◆"; font-size: .55rem; }
.lfihm-agenda__time::before { margin-right: 5px; color: var(--agenda-cyan); content: "●"; font-size: .55rem; }
.lfihm-agenda__long-date { margin: 9px 0 0; color: var(--agenda-muted); font-size: .75rem; line-height: 1.45; }
.lfihm-agenda__content h3 { margin: 8px 0 10px; color: var(--agenda-navy); font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; line-height: 1.2; }
.lfihm-agenda__content h3 a { color: inherit; text-decoration: none; }
.lfihm-agenda__content h3 a:hover { color: var(--agenda-blue); }
.lfihm-agenda__summary { margin: 0; color: var(--agenda-muted); font-size: .91rem; line-height: 1.6; }
.lfihm-agenda__more { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; margin-top: auto; padding-top: 17px; padding-bottom: 3px; border-bottom: 1px solid var(--agenda-gold); color: var(--agenda-blue); font-size: .75rem; font-weight: 850; text-decoration: none; }
.lfihm-agenda__more span,
.lfihm-agenda__footer a span { transition: transform .2s ease; }
.lfihm-agenda__more:hover span,
.lfihm-agenda__footer a:hover span { transform: translateX(3px); }

/* Accueil : cartes volontairement plus courtes que la chronologie complète. */
.lfihm-agenda--compact .lfihm-agenda__grid { gap: 18px; }
.lfihm-agenda--compact .lfihm-agenda__media { height: 140px; }
.lfihm-agenda--compact .lfihm-agenda__card-main { grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 17px; }
.lfihm-agenda--compact .lfihm-agenda__date { width: 58px; height: 76px; border-radius: 12px; }
.lfihm-agenda--compact .lfihm-agenda__date strong { font-size: 1.55rem; }
.lfihm-agenda--compact .lfihm-agenda__date span { margin-top: 4px; font-size: .62rem; }
.lfihm-agenda--compact .lfihm-agenda__date small { font-size: .63rem; }
.lfihm-agenda--compact .lfihm-agenda__long-date { display: none; }
.lfihm-agenda--compact .lfihm-agenda__content h3 {
  display: -webkit-box;
  margin: 8px 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 1.15rem;
  line-height: 1.18;
}
.lfihm-agenda--compact .lfihm-agenda__summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: .84rem;
  line-height: 1.45;
}
.lfihm-agenda--compact .lfihm-agenda__more { margin-top: 13px; padding-top: 0; }

.lfihm-agenda--page .lfihm-agenda__grid { grid-template-columns: 1fr; }
.lfihm-agenda--page .lfihm-agenda__card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 30%); min-height: 240px; }
.lfihm-agenda--page .lfihm-agenda__media { grid-column: 2; grid-row: 1; height: 100%; min-height: 240px; border-left: 1px solid var(--agenda-line); }
.lfihm-agenda--page .lfihm-agenda__card-main { grid-column: 1; grid-row: 1; grid-template-columns: 82px minmax(0, 1fr); gap: 24px; padding: clamp(24px, 4vw, 38px); }
.lfihm-agenda--page .lfihm-agenda__date { width: 82px; height: 105px; }
.lfihm-agenda--page .lfihm-agenda__date strong { font-size: 2.25rem; }
.lfihm-agenda--page .lfihm-agenda__content h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.lfihm-agenda--page .lfihm-agenda__summary { max-width: 700px; font-size: .98rem; }

.lfihm-agenda__empty { display: flex; align-items: center; gap: 12px; padding: 24px; border: 1px dashed rgba(8, 57, 168, .28); border-radius: 16px; background: #f5f8fd; color: var(--agenda-muted); }
.lfihm-agenda__empty span { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: var(--agenda-gold); }
.lfihm-agenda__empty p { margin: 0; }
.lfihm-agenda__footer { display: flex; justify-content: flex-end; margin-top: 26px; }
.lfihm-agenda__footer a { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--agenda-navy); color: var(--agenda-navy); font-size: .84rem; font-weight: 850; text-decoration: none; }

@media (max-width: 1020px) {
  .lfihm-agenda__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lfihm-agenda--page .lfihm-agenda__card { grid-template-columns: minmax(0, 1fr) 250px; }
}

@media (max-width: 720px) {
  .lfihm-agenda__header,
  .lfihm-agenda--page .lfihm-agenda__header { min-height: 0; padding: 27px 24px; border-radius: 0 17px 17px 0; }
  .lfihm-agenda__header h2 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .lfihm-agenda__intro { font-size: 1rem; }
  .lfihm-agenda__mark { display: none; }
  .lfihm-agenda__filters { width: 100%; border-radius: 16px; }
  .lfihm-agenda__filters button { flex: 1 1 auto; font-size: .9rem; }
  .lfihm-agenda__grid { grid-template-columns: 1fr; }
  .lfihm-agenda--page .lfihm-agenda__card { display: flex; min-height: 0; }
  .lfihm-agenda--page .lfihm-agenda__media { order: 0; width: 100%; height: 210px; min-height: 0; border: 0; border-bottom: 1px solid var(--agenda-line); }
  .lfihm-agenda--page .lfihm-agenda__card-main { order: 1; grid-template-columns: 70px minmax(0, 1fr); gap: 17px; padding: 22px; }
  .lfihm-agenda--page .lfihm-agenda__date { width: 70px; height: 92px; }
  .lfihm-agenda--page .lfihm-agenda__date strong { font-size: 1.9rem; }
  .lfihm-agenda__media { height: 205px; }
  .lfihm-agenda__card-main { grid-template-columns: 70px minmax(0, 1fr); gap: 17px; padding: 22px; }
  .lfihm-agenda__date { width: 70px; height: 92px; }
  .lfihm-agenda__content h3 { font-size: 1.45rem; }
  .lfihm-agenda__summary { font-size: 1rem; }
  .lfihm-agenda__more { min-height: 44px; align-items: center; font-size: .88rem; }
  .lfihm-agenda--compact .lfihm-agenda__media { height: 155px; }
  .lfihm-agenda--compact .lfihm-agenda__card-main { grid-template-columns: 64px minmax(0, 1fr); gap: 15px; padding: 18px; }
  .lfihm-agenda--compact .lfihm-agenda__date { width: 64px; height: 84px; }
  .lfihm-agenda--compact .lfihm-agenda__content h3 { font-size: 1.35rem; }
  .lfihm-agenda--compact .lfihm-agenda__summary { font-size: .95rem; }
}

@media (max-width: 430px) {
  .lfihm-agenda__card-main,
  .lfihm-agenda--page .lfihm-agenda__card-main { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; padding: 19px 16px; }
  .lfihm-agenda__date,
  .lfihm-agenda--page .lfihm-agenda__date { width: 62px; height: 86px; }
  .lfihm-agenda__date strong,
  .lfihm-agenda--page .lfihm-agenda__date strong { font-size: 1.75rem; }
  .lfihm-agenda__meta { gap: 5px; }
  .lfihm-agenda__meta span { font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lfihm-agenda__card,
  .lfihm-agenda__more span,
  .lfihm-agenda__footer a span { transition: none; }
  .lfihm-agenda__card:hover { transform: none; }
}
