/* Recap · Subject pages (hubs, lesson lists, lessons, exercises, devoirs…) · Desktop / large screens (≥ 1024px)
   Loaded only on wide viewports (media attribute in each page) → the phone layout is untouched.
   1. the UI scales with the screen (root font size) so text stays readable on laptops, monitors and TVs
   2. content sits in a centred column with a comfortable reading width instead of stretching edge to edge
   3. hubs and lesson lists use a multi-column grid */

@media (min-width: 1024px) {
  html { font-size: 17px; }

  /* ---------- page frame ---------- */
  html #subject, html #pager { padding-inline: clamp(40px, 5vw, 120px); padding-top: 88px; padding-bottom: 60px; }

  /* ---------- lessons / exercises / devoirs : one centred reading column ---------- */
  html #pager > .hdr-note-wrap, html #pager > .branch, html #pager > .pg-nav { width: 100%; max-width: 54rem; margin-inline: auto !important; box-sizing: border-box; }  /* !important : some subjects (physique, géo, philo…) set their own side margins */
  html #pager > .branch { position: relative; }

  /* ---------- hubs + lesson lists ---------- */
  html #subject .hdr-note-wrap { width: 100%; max-width: 48rem; margin-inline: auto; box-sizing: border-box; }
  html #subject > #lessons, html #subject > .stack, html #subject > .pc-stack { width: 100%; max-width: 78rem; margin-inline: auto; box-sizing: border-box; }
  /* hub : the blocks (Cours / Devoirs / Séries …) side by side */
  html #subject .stack, html #subject .pc-stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(23rem, 1fr)); gap: 28px 30px; align-items: start; }
  html #subject .stack > .pc-block { margin: 0; }
  /* lesson list : cards on two columns instead of full-width ribbons */
  html #subject .lv2 .ls-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 26px; align-items: stretch; }
  html #subject .lv2 .lc { height: 100%; box-sizing: border-box; }
  html #subject .ls-head { margin-bottom: 18px; }
  html #subject .ls + .ls { margin-top: 38px; }

  @media (hover: hover) {
    html #subject .lv2 .lc:not(.wip) { transition: transform .2s cubic-bezier(.3, 1.4, .5, 1), box-shadow .2s ease; }
    html #subject .lv2 .lc:not(.wip):hover { rotate: 0deg; transform: translateY(-4px); box-shadow: 5px 9px 0 color-mix(in srgb, var(--c, var(--teal)) 34%, transparent); }
    html #subject .pc-block { transition: transform .2s ease, box-shadow .2s ease; }
    html #subject .pc-block:hover { transform: translateY(-4px); }
  }
}

/* lessons and exercises are dense small text on the phone : scale them up a bit more */
@media (min-width: 1024px) { :root:has(#pager) { font-size: 19px; } }

/* large monitors */
@media (min-width: 1500px) { html { font-size: 18px; } :root:has(#pager) { font-size: 20.5px; } }
/* full-HD TVs and big monitors */
@media (min-width: 1900px) {
  html { font-size: 20px; } :root:has(#pager) { font-size: 23px; }
  html #subject .lv2 .ls-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 4K screens used at 100 % scaling */
@media (min-width: 2500px) { html { font-size: 26px; } :root:has(#pager) { font-size: 30px; } }
