/**
 * Emploi du temps — grille hebdomadaire (style PDF mairie).
 */
.tpl-pandea .pan-schedule {
  --pan-schedule-gap: 0.75rem;
  margin-block: 1.5rem;
}

.tpl-pandea .pan-schedule__header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.tpl-pandea .pan-schedule__title {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bleu-fonce, #163645);
}

.tpl-pandea .pan-schedule__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--pan-schedule-gap);
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

@media (max-width: 1199.98px) {
  .tpl-pandea .pan-schedule__grid {
    grid-template-columns: repeat(4, minmax(9rem, 1fr));
  }
}

@media (max-width: 991.98px) {
  .tpl-pandea .pan-schedule__grid {
    grid-template-columns: repeat(3, minmax(10rem, 1fr));
  }
}

@media (max-width: 575.98px) {
  .tpl-pandea .pan-schedule__grid {
    grid-template-columns: repeat(2, minmax(9rem, 1fr));
  }
}

.tpl-pandea .pan-schedule__day {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tpl-pandea .pan-schedule__day-name {
  margin: 0 0 0.5rem;
  padding: 0.45rem 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--bleu-fonce, #163645);
  border-radius: 0.2rem 0.2rem 0 0;
}

.tpl-pandea .pan-schedule__day-slots {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.tpl-pandea .pan-schedule__empty {
  margin: 0;
  padding: 0.75rem 0.5rem;
  font-size: 0.8rem;
  color: var(--gris, #666);
  text-align: center;
  background: color-mix(in srgb, var(--gris-clair, #eee) 60%, #fff);
  border-radius: 0 0 0.2rem 0.2rem;
}

.tpl-pandea .pan-schedule__slot {
  border: 1px solid color-mix(in srgb, var(--pan-slot-color, var(--bleu)) 35%, #ccc);
  border-radius: 0.2rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
}

.tpl-pandea .pan-schedule__slot-head {
  padding: 0.35rem 0.45rem;
  background: var(--pan-slot-color, var(--bleu));
  color: #fff;
}

.tpl-pandea .pan-schedule__association {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tpl-pandea .pan-schedule__slot-body {
  padding: 0.4rem 0.45rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--bleu-fonce, #163645);
}

.tpl-pandea .pan-schedule__slot-body p {
  margin: 0 0 0.2rem;
}

.tpl-pandea .pan-schedule__slot-body p:last-child {
  margin-bottom: 0;
}

.tpl-pandea .pan-schedule__time {
  font-weight: 700;
  font-size: 0.8rem;
}

.tpl-pandea .pan-schedule__activity {
  font-weight: 600;
  text-transform: uppercase;
}

.tpl-pandea .pan-schedule__tag-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--pan-slot-color, var(--bleu)) 55%, transparent);
  text-underline-offset: 2px;
}

.tpl-pandea .pan-schedule__tag-link:hover,
.tpl-pandea .pan-schedule__tag-link:focus {
  color: var(--bleu-fonce);
}

.tpl-pandea .pan-schedule__location {
  font-size: 0.72rem;
  opacity: 0.9;
}

.tpl-pandea .pan-schedule__note {
  font-size: 0.7rem;
  font-style: italic;
  color: color-mix(in srgb, var(--bleu-fonce) 75%, #666);
}

.tpl-pandea .pan-schedule__legend {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--gris-clair, #eee) 50%, #fff);
  border-radius: 0.25rem;
}

.tpl-pandea .pan-schedule__legend-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bleu-fonce);
}

.tpl-pandea .pan-schedule__legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpl-pandea .pan-schedule__legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.tpl-pandea .pan-schedule__legend-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 0.15rem;
  flex-shrink: 0;
}

.tpl-pandea .pan-schedule__contacts {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 2px solid var(--bleu-fonce, #163645);
}

.tpl-pandea .pan-schedule__contacts-list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 1.5rem;
}

@media (max-width: 767.98px) {
  .tpl-pandea .pan-schedule__contacts-list {
    columns: 1;
  }
}

.tpl-pandea .pan-schedule__contact {
  break-inside: avoid;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--bleu-fonce);
}
