.Animation { background-color: #D2691E; }
.Stand { background-color: #B22222; }
.Exposition { background-color: #FF8C00; }
.Musique { background-color: #8B4513; }
.Atelier { background-color: #DAA520; }
.Repas, .default { background-color: #999; }
.Logistique { background-color: #6b5b4f; }

.programme-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3.5rem;
}

.programme-wrap h2 {
  font-family: "Amatic SC", cursive;
  font-size: 2.4rem;
  color: #8b0000;
  margin: 0 0 0.4rem;
}

.programme-note {
  background: #f7ecd7;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: #5a4e44;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.badge {
  padding: 3px 6px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: Quicksand, sans-serif;
}

.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.programme-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 1rem;
  margin: 0 0 0.85rem;
}

.programme-search,
.programme-sort {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8b0000;
}

.programme-search {
  flex: 1 1 16rem;
}

.programme-search input,
.programme-sort select {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4a4a4a;
  border: 1px solid rgba(139, 0, 0, 0.22);
  border-radius: 8px;
  padding: 0.48rem 0.7rem;
  background: #fff;
}

.programme-search input {
  width: 100%;
  box-sizing: border-box;
}

.programme-sort select {
  min-width: 12rem;
}

.programme-empty {
  grid-column: 1 / -1;
  margin: 0.5rem 0 1.25rem;
  text-align: center;
  color: #5a4e44;
  font-weight: 600;
}

.filter-badge {
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.filter-badge.selected {
  border-color: #05acd6;
}

.calendar-container {
  width: 100%;
  overflow: visible;
  margin-bottom: 1.5rem;
}

.hour-scale {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  font-size: 0.8rem;
  font-weight: 700;
  color: #8b0000;
  margin: 0 0 4px;
  padding: 0.3rem 1px 0.35rem;
  background: #fff8f0;
  box-shadow: 0 8px 12px -8px rgba(139, 0, 0, 0.22);
  pointer-events: none;
}

.hour-scale span {
  flex: 1 0 0;
}

.schedule {
  position: relative;
  min-height: 8rem;
  box-sizing: border-box;
  border: 1px solid #e0d3c2;
  border-radius: 10px;
  background-color: #fff;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(100% / var(--hours) - 1px),
    #ddd calc(100% / var(--hours) - 1px),
    #ddd calc(100% / var(--hours))
  );
}

.schedule-band {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
  box-sizing: border-box;
  border-bottom: 2px solid rgba(139, 0, 0, 0.4);
}

.schedule-band.is-alt {
  background: rgba(139, 0, 0, 0.045);
}

.schedule-place {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: 1.45rem;
  line-height: 1.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #8b0000;
  padding: 0 0.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(139, 0, 0, 0.12);
  background: linear-gradient(
    90deg,
    rgba(255, 248, 240, 0.92) 0,
    rgba(255, 248, 240, 0.55) 11rem,
    transparent 22rem
  );
}

.calendar-event {
  position: absolute;
  z-index: 2;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.calendar-event strong {
  font-weight: 700;
}

.programme {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 18.75rem));
  gap: 1.25rem;
  justify-content: center;
  align-items: stretch;
}

.activity-card {
  background: #fff;
  border: 1px solid rgba(139, 0, 0, 0.12);
  border-radius: 16px;
  overflow: clip;
  box-shadow: 0 8px 22px rgba(139, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  max-width: 20rem;
  height: 32rem;
  min-height: 0;
  box-sizing: border-box;
}

.activity-card:has(.activity-card-more) {
  cursor: pointer;
}

.activity-card:focus-within,
.activity-card.is-open {
  outline: 2px solid #8b0000;
  outline-offset: 2px;
}

.activity-card-media {
  flex: 0 0 250px;
  width: 100%;
  height: 250px;
  background: #f3e6d2;
  overflow: hidden;
  transition: height 0.35s ease, flex-basis 0.35s ease, opacity 0.25s ease;
}

.activity-card.is-open .activity-card-media {
  flex-basis: 0;
  height: 0;
  opacity: 0;
}

.activity-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Square photos in a wider frame: crop equally top and bottom (half the overflow). */
  object-position: center;
  display: block;
}

.activity-card-title {
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-family: Quicksand, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #8b0000;
  background: #faebd7;
  text-align: center;
  overflow-wrap: anywhere;
}

.activity-card-body {
  padding: 0.55rem 0.85rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: clip;
}

.activity-card.is-open .activity-card-body {
  flex: 1 1 auto;
  overflow: clip;
  overscroll-behavior: auto;
}

.activity-card.is-open .activity-card-body.is-scrollable {
  overflow-y: auto;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}

.activity-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.55rem;
}

.activity-card-animator {
  margin: 0;
  font-size: 1rem;
  font-style: normal;
  font-weight: 700;
  color: #4a4a4a;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

.activity-card-hour {
  font-weight: 700;
  font-size: 0.9rem;
  color: #006400;
  white-space: pre-line;
  text-align: right;
  flex: 1 1 8rem;
  max-width: 16rem;
  line-height: 1.35;
}

.activity-card-tags {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.activity-card-tags .badge {
  margin-left: auto;
  flex: 0 0 auto;
}

.activity-card-social {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 0 1 auto;
}

.activity-card-social a {
  display: flex;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  color: inherit;
}

.activity-card-social svg {
  width: 100%;
  height: 100%;
  display: block;
}

.activity-card-desc {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #4a4a4a;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

.activity-card.is-open .activity-card-desc {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.activity-card-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem 0.65rem;
  border-top: 1px solid rgba(139, 0, 0, 0.12);
  background: #faf3ea;
}

.activity-card-facts {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: #5a4e44;
  overflow-wrap: break-word;
}

.activity-card-facts p {
  margin: 0;
}

.activity-card-facts p + p {
  margin-top: 0.12rem;
}

.activity-card-facts a {
  color: #8b0000;
}

.activity-card-more {
  flex: 0 0 auto;
  align-self: center;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  color: #8b0000;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.programme .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding: 0.35rem 0;
  gap: 0.4rem;
}

.programme .heure {
  flex: 0 0 148px;
  font-weight: 700;
}

.programme .row.is-tba .heure {
  color: #8b0000;
  font-style: italic;
}

.event-facts {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5a4e44;
  font-style: normal;
  margin-top: 0.12rem;
}

.event-facts a {
  color: #8b0000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.calendar-event.is-tba {
  opacity: 0.88;
  border-style: dashed;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(255, 255, 255, 0.12) 6px,
    rgba(255, 255, 255, 0.12) 12px
  );
}

.programme .categorie {
  flex: 0 0 100px;
}

.programme .titre {
  flex: 1 1 220px;
}

.programme .animateur {
  flex: 1 1 160px;
  color: #555;
  font-style: italic;
  font-weight: 700;
}

.programme-error {
  color: #8b0000;
  font-weight: 600;
  background: #f8d7d0;
}

.programme-stale {
  color: #6b3a00;
  font-weight: 600;
  background: #f8e6c8;
}

.programme-wrap.is-outage .badge-container,
.programme-wrap.is-outage .calendar-container,
.programme-wrap.is-outage .programme,
.programme-wrap.is-outage .lbm-loader {
  display: none;
}

.lbm-loader {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #f7ecd7;
  border-radius: 10px;
  color: #5a4e44;
  font-weight: 600;
}

.lbm-spinner {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border: 2.5px solid rgba(139, 0, 0, 0.2);
  border-top-color: #8b0000;
  border-radius: 50%;
  animation: lbm-spin 0.7s linear infinite;
}

@keyframes lbm-spin {
  to {
    transform: rotate(360deg);
  }
}

.programme-wrap.is-loading .badge-container,
.programme-wrap.is-loading .calendar-container,
.programme-wrap.is-loading .programme {
  display: none;
}

.programme-wrap:not(.is-loading) > .lbm-loader {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .lbm-spinner {
    animation: none;
    border-top-color: #8b0000;
    opacity: 0.7;
  }

  .featured-track {
    transition: none;
  }
}

.featured-wrap {
  max-width: 1100px;
  margin: 0 auto 0.5rem;
  padding: 0 1.25rem 1.5rem;
}

.featured-viewport {
  overflow: hidden;
  min-width: 0;
  outline: none;
  touch-action: pan-y;
  cursor: grab;
}

.featured-viewport:active {
  cursor: grabbing;
}

.featured-track {
  display: flex;
  transition: transform 0.4s ease;
  touch-action: pan-y;
}

.featured-track.is-dragging {
  transition: none;
}

.featured-slide {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  padding: 0.15rem 0 0.35rem;
}

.featured-slide .activity-card {
  cursor: pointer;
  max-width: 18.75rem;
  height: auto;
  align-self: flex-start;
}

.featured-slide .activity-card-media {
  flex-basis: 200px;
  height: 200px;
}

.featured-slide .activity-card-body {
  flex: 0 0 auto;
  padding-bottom: 0.15rem;
}

.featured-slide .activity-card-footer {
  justify-content: center;
  align-items: center;
  padding: 0.3rem 0.85rem 0.35rem;
}

.featured-slide .activity-card-more {
  margin: 0;
}

.featured-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 0.15rem;
}

.featured-nav {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 50%;
  background: #8b0000;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.featured-nav:hover {
  background: #6e0000;
}

.featured-count {
  margin: 0;
  min-width: 3.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #8b0000;
}

@media (max-width: 959px) {
  .featured-slide {
    padding: 0;
  }

  .featured-slide .activity-card {
    max-width: min(18.75rem, 100%);
  }

  .featured-controls {
    gap: 0.65rem;
    margin-top: 0.35rem;
  }
}

@media (max-width: 600px) {
  .featured-nav {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 1.3rem;
  }
}
