.page-hero-pedagogy {
  background:
    radial-gradient(circle at left top, rgba(255, 191, 0, 0.18), transparent 24%),
    radial-gradient(circle at right 30%, rgba(33, 103, 120, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 249, 0.94));
}

#semaine,
#journee,
#pdf {
  scroll-margin-top: 7rem;
}

.week-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.week-intro {
  max-width: 48rem;
  color: var(--color-muted);
}

.week-schedule-card {
  padding: clamp(1rem, 2.5vw, 1.4rem);
  border: var(--border-soft);
  border-radius: 32px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(245, 250, 250, 0.92)),
    var(--color-white);
  box-shadow: var(--shadow-soft);
}

.week-table-wrap {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.week-schedule-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 6px;
  color: var(--color-primary-deep);
}

.week-schedule-table .col-time {
  width: 12%;
}

.week-schedule-table .col-day {
  width: 17.6%;
}

.week-schedule-table th,
.week-schedule-table td {
  padding: 1rem 0.9rem;
  border-radius: 18px;
  text-align: center;
  vertical-align: middle;
  font-weight: 600;
}

.week-schedule-table thead th {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 1.05rem;
}

.week-schedule-table tbody > tr > th {
  background: rgba(33, 103, 120, 0.1);
  color: var(--color-primary-deep);
  font-size: 0.98rem;
}

.week-schedule-table td {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(33, 103, 120, 0.08);
}

.week-schedule-table .subject-cell {
  padding: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.week-schedule-table .subject-cell:hover,
.week-schedule-table .subject-cell:focus-within {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 2px rgba(33, 103, 120, 0.18),
    0 12px 22px rgba(24, 77, 90, 0.08);
}

.schedule-subject-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 1rem 0.9rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: center;
  cursor: pointer;
}

.schedule-subject-button:focus-visible {
  outline: 3px solid rgba(255, 191, 0, 0.68);
  outline-offset: -3px;
}

.week-schedule-table .empty {
  background: rgba(33, 103, 120, 0.06);
  box-shadow: inset 0 0 0 1px rgba(33, 103, 120, 0.05);
}

.week-schedule-table .neutral {
  background: rgba(218, 228, 232, 0.92);
}

.week-schedule-table .francais {
  background: rgba(243, 152, 74, 0.78);
}

.week-schedule-table .maths {
  background: rgba(33, 103, 120, 0.42);
}

.week-schedule-table .anglais {
  background: rgba(120, 198, 236, 0.68);
}

.week-schedule-table .hg {
  background: rgba(221, 108, 95, 0.76);
}

.week-schedule-table .vie {
  background: rgba(211, 229, 196, 0.95);
}

.week-schedule-table .sciences {
  background: rgba(136, 191, 117, 0.84);
}

.week-schedule-table .anthropo {
  background: rgba(227, 213, 241, 0.84);
}

.week-schedule-table .eps {
  background: rgba(255, 205, 127, 0.94);
}

.week-schedule-table .club {
  background: rgba(163, 108, 74, 0.84);
}

.week-schedule-table .tutorat {
  background: rgba(33, 103, 120, 0.22);
}

.week-schedule-table .fin {
  background: rgba(255, 191, 0, 0.16);
}

.week-schedule-table .small {
  font-size: 0.92rem;
  line-height: 1.35;
}

.week-schedule-table .row-short th,
.week-schedule-table .row-short td {
  padding-block: 0.7rem;
}

.week-schedule-table .row-short .schedule-subject-button {
  padding-block: 0.7rem;
}

.week-schedule-table .row-vieSpi-remainder td {
  padding-block: 0.45rem;
}

.schedule-modal[hidden] {
  display: none;
}

.schedule-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.schedule-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 51, 61, 0.48);
  backdrop-filter: blur(8px);
}

.schedule-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1.2rem;
  width: min(860px, 100%);
  max-height: min(86dvh, 920px);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: var(--border-soft);
  border-radius: 30px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 250, 0.94)),
    var(--color-white);
  box-shadow: 0 28px 70px rgba(24, 77, 90, 0.2);
}

.schedule-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(33, 103, 120, 0.08);
  color: var(--color-primary-deep);
  cursor: pointer;
}

.schedule-modal-close:hover,
.schedule-modal-close:focus-visible {
  background: rgba(255, 191, 0, 0.18);
}

.schedule-modal-header {
  display: grid;
  gap: 0.75rem;
  padding-right: 2.4rem;
}

.schedule-modal-goal {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  background: rgba(255, 191, 0, 0.12);
  color: var(--color-primary-deep);
  font-weight: 700;
}

.schedule-modal-body {
  display: grid;
  gap: 1.15rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.3rem;
  color: var(--color-ink);
}

.schedule-modal-body p {
  margin: 0;
}

.schedule-modal-section {
  display: grid;
  gap: 0.75rem;
}

.schedule-modal-label {
  margin: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.schedule-modal-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding-left: 1.25rem;
}

.schedule-modal-list li::marker {
  color: var(--color-accent);
}

body.has-modal-open {
  overflow: hidden;
}

.journey-heading {
  max-width: 52rem;
  margin-bottom: 2rem;
}

.journey-intro {
  max-width: 48rem;
  color: var(--color-muted);
}

.journey-timeline {
  position: relative;
  display: grid;
  gap: 1.1rem;
  padding: 0.8rem 0 0.8rem 3.2rem;
}

.journey-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1rem;
  width: 2rem;
}

.journey-line-base,
.journey-line-progress {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  border-radius: 999px;
  transform: translateX(-50%);
}

.journey-line-base {
  background: rgba(33, 103, 120, 0.12);
}

.journey-line-progress {
  height: 0;
  background: linear-gradient(180deg, var(--color-accent), var(--color-primary));
  box-shadow: 0 0 18px rgba(255, 191, 0, 0.28);
}

.journey-item {
  position: relative;
  opacity: 0.6;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.journey-item.is-active,
.journey-item.is-current {
  opacity: 1;
  transform: translateY(0);
}

.journey-shell {
  display: grid;
  gap: 1rem;
}

.journey-marker {
  position: absolute;
  top: 1.2rem;
  left: -3.2rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid rgba(33, 103, 120, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 20px rgba(24, 77, 90, 0.08);
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.journey-marker::after {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: rgba(33, 103, 120, 0.28);
  transition: background-color 0.3s ease;
}

.journey-item.is-active .journey-marker,
.journey-item.is-current .journey-marker {
  border-color: transparent;
  background: var(--color-primary);
}

.journey-item.is-active .journey-marker::after,
.journey-item.is-current .journey-marker::after {
  background: var(--color-white);
}

.journey-item.is-current .journey-marker {
  transform: scale(1.12);
  box-shadow: 0 14px 28px rgba(255, 191, 0, 0.22);
}

.journey-card {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border: var(--border-soft);
  border-radius: 26px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 219, 0.62)),
    var(--color-white);
  box-shadow: var(--shadow-soft);
  grid-area: card;
}

.journey-item.is-current .journey-card {
  box-shadow: 0 20px 44px rgba(24, 77, 90, 0.12);
}

.journey-media {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  grid-area: media;
}

.journey-media img {
  display: block;
  width: 100%;
  height: auto;
  object-position: center;
  border-radius: 24px;
  background: transparent;
}

.journey-time {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 191, 0, 0.16);
  color: var(--color-primary-deep);
  font-weight: 700;
}

.download-card {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: var(--border-soft);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(155deg, rgba(255, 191, 0, 0.12), rgba(255, 255, 255, 0.94)),
    var(--color-white);
  box-shadow: var(--shadow-soft);
}

.download-actions {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

@media (min-width: 820px) {
  .journey-timeline {
    gap: 1.5rem;
    padding-left: 0;
  }

  .journey-line {
    left: 50%;
    width: 0;
  }

  .journey-item {
    width: 100%;
  }

  .journey-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "card media";
    gap: clamp(1.5rem, 4vw, 4rem);
    align-items: start;
  }

  .journey-item:nth-of-type(even) .journey-shell {
    grid-template-areas: "media card";
  }

  .journey-item .journey-marker {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .journey-item.is-current .journey-marker {
    transform: translateX(-50%) scale(1.12);
  }

  .download-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    align-items: center;
  }
}

@media (max-width: 700px) {
  .week-schedule-card {
    padding: 0.8rem;
    border-radius: 24px;
  }

  .week-schedule-table {
    min-width: 780px;
    border-spacing: 4px;
  }

  .week-schedule-table th,
  .week-schedule-table td {
    padding: 0.8rem 0.7rem;
    border-radius: 14px;
    font-size: 0.92rem;
  }

  .week-schedule-table .small {
    font-size: 0.82rem;
  }

  .journey-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "card"
      "media";
    gap: 0.9rem;
  }

  .journey-card,
  .journey-media {
    grid-area: auto;
  }

  .journey-media img {
    max-height: 240px;
    object-fit: cover;
  }

  .schedule-modal {
    place-items: end stretch;
    padding: 0.45rem;
  }

  .schedule-modal-dialog {
    width: 100%;
    gap: 1rem;
    max-height: calc(100dvh - 0.9rem);
    padding: 1rem;
    border-radius: 24px;
  }

  .schedule-modal-close {
    top: 0.7rem;
    right: 0.7rem;
  }

  .schedule-modal-header {
    padding-right: 2.8rem;
  }

  .schedule-modal-body {
    padding-right: 0.1rem;
    padding-bottom: 0.65rem;
  }

}
