/* ============================================================================
   Rétroplanning consultable (js/planning.js) : en-tête, séance du jour, frise
   des phases, vues Semaine / Mois / Liste, fenêtre de détail, carte du tableau
   de bord. Couleur de phase transmise par la variable --c.
   ============================================================================ */
.pl-root { display: flex; flex-direction: column; gap: 20px; }
.pl-root > .panel { margin: 0; }
.pl-root .pl-sec-h h2, .pl-dash h2 { font-size: 1.45rem; margin: 0; }
.pl-sec-h { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.25rem; }
.pl-sec-h .compte-sub { margin: 0; }
.pl-muted { color: var(--ink-mute); font-weight: 400; }
.pl-warn { color: var(--signal-ink); }
.pl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink-mute)); flex: 0 0 auto; }
.pl-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; align-self: flex-start; }

/* ---------- pastilles */
.pl-pill {
  display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start;
  padding: .2rem .65rem .2rem .55rem; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 78%, #021D29);
  font-size: .76rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.pl-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pl-ep {
  display: inline-block; margin-right: .4rem; padding: .02rem .38rem; border-radius: 6px;
  border: 1px solid var(--hairline-strong); font-family: var(--font-body); font-size: .7em; font-weight: 700;
  color: var(--accent-ink); vertical-align: .12em; letter-spacing: 0;
}
.pl-flag {
  display: inline-block; padding: .05rem .45rem; border-radius: 6px;
  background: var(--signal-dim); color: var(--signal-ink); font-size: .7rem; font-weight: 600; white-space: nowrap;
}
.pl-flag-today { background: var(--acid-dim); color: var(--accent-ink); }

/* ---------- en-tête */
.pl-hero { padding: 30px 32px 26px; }
.pl-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.pl-hero h1 { margin: 0 0 .55rem; }
.pl-hero-sub { margin: 0; color: var(--ink-soft); font-size: 1.02rem; max-width: 60ch; }
.pl-hero-sub strong { color: var(--ink); font-weight: 600; }
.pl-count {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 16px 22px; border-radius: 18px; background: var(--ink); color: #fff;
}
.pl-count-n { font-family: var(--font-display); font-size: 3.1rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pl-count-j { font-style: italic; }
.pl-count-l { font-size: .82rem; line-height: 1.3; color: rgba(255, 255, 255, .78); }
.pl-metrics {
  display: grid; grid-template-columns: 1.15fr 1fr 1fr; margin-top: 26px;
  border-top: 1px solid var(--hairline);
}
.pl-metric { display: flex; flex-direction: column; gap: .3rem; padding: 18px 22px 0; border-left: 1px solid var(--hairline); min-width: 0; }
.pl-metric:first-child { padding-left: 0; border-left: 0; }
.pl-metric-l { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.pl-metric b { font-size: 1.12rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.pl-metric > .pl-muted { font-size: .86rem; }
.pl-bar { height: 8px; border-radius: 99px; background: var(--surface-alt); overflow: hidden; margin-top: .35rem; box-shadow: inset 0 0 0 1px var(--hairline); }
.pl-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent-ink); transition: width .5s var(--ease); }

/* ---------- séance du jour */
.pl-today { position: relative; padding: 28px 32px 26px 38px; overflow: hidden; }
.pl-today::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, var(--accent-ink)); display: block !important; }
.pl-today-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: .8rem; }
.pl-eyebrow { margin: 0; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); }
.pl-root .pl-today-title { font-size: clamp(1.45rem, 2.4vw, 1.9rem); margin: 0 0 .65rem; max-width: 34ch; }
.pl-today-desc { margin: 0; color: var(--ink-soft); max-width: 72ch; line-height: 1.6; }
.pl-today-meta { margin: .7rem 0 0; font-size: .86rem; color: var(--ink-mute); }
.pl-today .session-actions { margin-top: 1.2rem; }
.pl-today.is-done .pl-today-title { color: var(--ink-mute); }
.pl-today-end::before { background: var(--ink); }
.btn svg { vertical-align: -3px; }
.pl-toggle.is-done { background: var(--acid-dim); border-color: transparent; color: var(--accent-ink); font-weight: 600; }

/* ---------- frise */
.pl-frise + .pl-frise { margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--hairline-strong); }
.pl-frise-t { margin: 0 0 .7rem; font-weight: 600; color: var(--ink); }
.pl-frise-bar { position: relative; display: flex; gap: 4px; height: 18px; margin: 30px 0 18px; }
.pl-seg { position: relative; min-width: 8px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--c) 20%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); }
.pl-seg span { position: absolute; inset: 0 auto 0 0; background: var(--c); transition: width .5s var(--ease); }
.pl-here { position: absolute; top: -9px; bottom: -6px; width: 0; border-left: 2px solid var(--ink); z-index: 1; pointer-events: none; }
.pl-here em {
  position: absolute; bottom: 100%; left: 0; transform: translate(-50%, -4px);
  padding: .1rem .5rem; border-radius: 6px; background: var(--ink); color: #fff;
  font-style: normal; font-size: .7rem; font-weight: 600; white-space: nowrap;
}
.pl-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem 1.4rem; }
.pl-legend li { display: flex; gap: .65rem; align-items: flex-start; min-width: 0; }
.pl-legend .pl-dot { margin-top: .38rem; }
.pl-legend b { display: block; font-weight: 600; font-size: .93rem; color: var(--ink); }
.pl-legend span { display: block; font-size: .82rem; color: var(--ink-mute); line-height: 1.45; }

/* ---------- vues */
.pl-views-h { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.pl-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--hairline); }
.pl-tab {
  min-height: 36px; padding: 0 1.05rem; border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-size: .9rem; font-weight: 500; color: var(--ink-soft); cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.pl-tab:hover { color: var(--ink); }
.pl-tab.is-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(3, 45, 63, .08), 0 0 0 1px var(--hairline); }
.pl-nav { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.pl-arrow {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--hairline-strong); background: #fff; color: var(--ink); cursor: pointer;
  transition: border-color .2s ease, transform .2s var(--ease);
}
.pl-arrow:hover:not(:disabled) { border-color: var(--ink-mute); }
.pl-arrow:disabled { opacity: .35; cursor: default; }
.pl-range { min-width: 12.5rem; text-align: center; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); letter-spacing: -.01em; }
.pl-todaybtn {
  margin-left: auto; min-height: 36px; padding: 0 .95rem; border-radius: 999px;
  border: 1px solid var(--hairline-strong); background: #fff; font: inherit; font-size: .86rem; color: var(--ink); cursor: pointer;
}
.pl-todaybtn:hover { border-color: var(--ink-mute); }

/* Semaine */
.pl-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pl-wday { display: flex; flex-direction: column; min-height: 210px; border-radius: 14px; background: var(--surface-alt); border: 1px solid transparent; }
.pl-wday-h { display: flex; align-items: baseline; gap: .4rem; padding: 10px 12px 6px; flex-wrap: wrap; }
.pl-wday-h span { font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.pl-wday-h b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 400; color: var(--ink); line-height: 1; }
.pl-wday-h em { font-style: normal; font-size: .68rem; font-weight: 600; color: var(--accent-ink); width: 100%; }
.pl-wday-b { display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 10px; flex: 1; }
.pl-wday.is-today { background: #fff; border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--acid-dim); }
.pl-wday.is-out { background: transparent; border: 1px dashed var(--hairline); }
.pl-wday.is-out .pl-wday-h b, .pl-wday.is-out .pl-wday-h span { color: var(--hairline-strong); }
.pl-rest { margin: auto 0; text-align: center; font-size: .78rem; color: var(--ink-mute); opacity: .8; }
.pl-sess {
  position: relative; border-radius: 10px; background: #fff;
  box-shadow: 0 1px 2px rgba(3, 45, 63, .06), inset 0 0 0 1px var(--hairline);
  transition: transform .2s var(--ease), box-shadow .2s ease;
}
.pl-sess:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(3, 45, 63, .35), inset 0 0 0 1px var(--hairline-strong); }
.pl-sess::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.pl-sess-open {
  display: flex; flex-direction: column; gap: .3rem; width: 100%; padding: 10px 30px 10px 12px;
  border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: inherit;
}
.pl-sess-time { font-size: .72rem; font-weight: 600; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.pl-sess-title {
  font-size: .84rem; line-height: 1.35; color: var(--ink); font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.pl-sess .pl-flag { align-self: flex-start; }
.pl-sess .pl-check { position: absolute; top: 8px; right: 8px; }
.pl-sess.is-done { background: color-mix(in srgb, #fff 55%, var(--surface-alt)); box-shadow: inset 0 0 0 1px var(--hairline); }
.pl-sess.is-done .pl-sess-title { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: var(--hairline-strong); }
.pl-sess.is-late { box-shadow: inset 0 0 0 1px rgba(224, 85, 46, .35); }
.pl-examday {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .15rem;
  border-radius: 10px; background: var(--ink); color: #fff; padding: 14px 8px; text-align: center;
}
.pl-examday b { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; font-style: italic; }
.pl-examday span { font-size: .74rem; color: rgba(255, 255, 255, .75); }

/* case à cocher ronde */
.pl-check {
  display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto;
  border-radius: 50%; border: 1.5px solid var(--hairline-strong); background: #fff; color: transparent;
  cursor: pointer; padding: 0; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.pl-check:hover { border-color: var(--accent-ink); color: color-mix(in srgb, var(--accent-ink) 40%, transparent); }
.pl-check:active { transform: scale(.92); }
.pl-check.is-on { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

/* Mois */
.pl-month { border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; }
.pl-mhead, .pl-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pl-mhead { background: var(--surface-alt); border-bottom: 1px solid var(--hairline); }
.pl-mhead span { padding: 8px 10px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.pl-mcell { min-height: 104px; padding: 6px 6px 8px; border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; min-width: 0; background: #fff; }
.pl-mcell:nth-child(7n) { border-right: 0; }
.pl-mgrid .pl-mcell:nth-last-child(-n+7) { border-bottom: 0; }
.pl-mcell.is-other { background: color-mix(in srgb, var(--surface-alt) 60%, #fff); }
.pl-mcell.is-other .pl-mnum { color: var(--hairline-strong); }
.pl-mcell.is-other .pl-mchip { opacity: .45; }
.pl-mnum { align-self: flex-start; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 50%; font-size: .82rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pl-mcell.is-today .pl-mnum { background: var(--accent-ink); color: #fff; }
.pl-mcell.is-exam { background: var(--ink); }
.pl-mcell.is-exam .pl-mnum { color: #fff; }
.pl-mexam { margin-top: auto; font-family: var(--font-display); font-style: italic; color: #fff; font-size: 1.05rem; padding: 0 4px 2px; }
.pl-mchip {
  position: relative; display: flex; align-items: center; gap: .3rem; width: 100%; min-width: 0;
  padding: 4px 6px 4px 9px; border: 0; border-radius: 6px; cursor: pointer; text-align: left;
  background: color-mix(in srgb, var(--c) 13%, #fff); color: color-mix(in srgb, var(--c) 70%, #021D29);
  font: inherit; font-size: .74rem; font-weight: 500; line-height: 1.3;
  transition: background-color .2s ease;
}
.pl-mchip::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.pl-mchip:hover { background: color-mix(in srgb, var(--c) 22%, #fff); }
.pl-mchip span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl-mchip.is-done { opacity: .62; }
.pl-mchip.is-done span { text-decoration: line-through; }
.pl-mchip.is-late { box-shadow: inset 0 0 0 1px rgba(224, 85, 46, .55); }
.pl-mchip-ok { display: inline-grid; place-items: center; width: 15px; height: 15px; flex: 0 0 auto; border-radius: 50%; background: var(--accent-ink); color: #fff; font-style: normal; }
.pl-mchip-ok svg { width: 10px; height: 10px; }
.pl-keys { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 1rem 0 0; padding: 0; }
.pl-keys li { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--ink-soft); }
.pl-key-late .pl-dot { background: #fff; box-shadow: inset 0 0 0 1.5px var(--signal); }

/* Liste */
.pl-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.pl-chip {
  min-height: 36px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--hairline-strong);
  background: #fff; font: inherit; font-size: .86rem; color: var(--ink-soft); cursor: pointer;
}
.pl-chip b { margin-left: .25rem; font-weight: 600; color: var(--ink-mute); }
.pl-chip:hover { border-color: var(--ink-mute); }
.pl-chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pl-chip.is-on b { color: rgba(255, 255, 255, .75); }
.pl-group + .pl-group { margin-top: 1.6rem; }
.pl-root .pl-group-h { font-size: 1.12rem; margin: 0 0 .4rem; display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.pl-group-h span { font-family: var(--font-body); font-size: .84rem; color: var(--ink-mute); letter-spacing: 0; }
.pl-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.pl-row { display: grid; grid-template-columns: 22px 9.5rem minmax(0, 1fr); gap: 1rem; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.pl-row .pl-check { margin-top: 2px; }
.pl-row-when { display: flex; flex-direction: column; gap: .2rem; }
.pl-row-when b { font-size: .92rem; font-weight: 600; color: var(--ink); }
.pl-row-when > span:not(.pl-flag) { font-size: .82rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.pl-row-when .pl-flag { align-self: flex-start; margin-top: .2rem; }
.pl-row-what { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.pl-row-what strong { font-weight: 600; color: var(--ink); line-height: 1.35; }
.pl-row-what p { margin: 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.55; }
.pl-row-link { align-self: flex-start; display: inline-flex; align-items: center; gap: .3rem; font-size: .84rem; font-weight: 500; color: var(--accent-ink); text-decoration: none; }
.pl-row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pl-row.is-done .pl-row-what strong { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: var(--hairline-strong); }
.pl-row.is-done .pl-row-what p { color: var(--ink-mute); }
.pl-empty { margin: 1.5rem 0; padding: 1.4rem; border-radius: 14px; background: var(--surface-alt); color: var(--ink-soft); text-align: center; }

/* ---------- agenda et réglages */
.pl-settings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 1.2rem; border: 1px solid var(--hairline); border-radius: 14px; }
.pl-settings div { padding: 12px 16px; border-left: 1px solid var(--hairline); min-width: 0; }
.pl-settings div:first-child { border-left: 0; }
.pl-settings dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute); }
.pl-settings dd { margin: .25rem 0 0; font-size: .9rem; color: var(--ink); }
.pl-dd-note { display: block; margin-top: .1rem; font-size: .78rem; color: var(--ink-mute); }
.pl-del { color: var(--ink-mute); }

/* ---------- fenêtre de détail */
.pl-noscroll { overflow: hidden; }
.pl-modal {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px;
  background: rgba(2, 29, 41, .42); backdrop-filter: blur(3px);
  animation: pl-fade .2s ease;
}
.pl-modal-card {
  position: relative; width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto;
  padding: 30px 30px 26px 36px; border-radius: 20px; background: #fff;
  box-shadow: 0 40px 80px -30px rgba(2, 29, 41, .55);
  animation: pl-rise .28s var(--ease);
}
.pl-modal-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c); }
.pl-modal-card h2 { font-size: 1.6rem; margin: .8rem 2rem .5rem 0; }
.pl-modal-x {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--hairline); background: #fff; color: var(--ink); cursor: pointer;
}
.pl-modal-x:hover { border-color: var(--ink-mute); }
.pl-modal-when { margin: 0 0 .9rem; font-weight: 600; color: var(--ink); font-size: .95rem; }
.pl-modal-when span:not(.pl-flag) { font-weight: 400; color: var(--ink-mute); }
.pl-modal-desc { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.pl-modal .session-actions { margin-top: 1.3rem; }
@keyframes pl-fade { from { opacity: 0; } }
@keyframes pl-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- tableau de bord */
.pl-dash { position: relative; overflow: hidden; }
.pl-dash::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.pl-dash-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .9rem; }
.pl-dash-count { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent-ink); }
.pl-dash .pl-eyebrow { margin-bottom: .55rem; }
.pl-dash-title { margin: .6rem 0 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25; color: var(--ink); max-width: 46ch; }
.pl-dash-act { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
.pl-dash-foot { display: grid; grid-template-columns: minmax(120px, 220px) auto 1fr; align-items: center; gap: 1rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--hairline); font-size: .86rem; color: var(--ink-mute); }
.pl-dash-foot .pl-bar { margin: 0; }
.pl-dash-foot a { justify-self: end; display: inline-flex; align-items: center; gap: .35rem; color: var(--accent-ink); font-weight: 500; text-decoration: none; }
.pl-dash-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- tablette */
@media (max-width: 1080px) {
  .pl-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .pl-sess-title { -webkit-line-clamp: 6; font-size: .8rem; }
  .pl-sess-open { padding-right: 10px; padding-top: 34px; }
}

/* ---------- téléphone */
@media (max-width: 760px) {
  .pl-hero { padding: 22px 20px 20px; }
  .pl-hero-top { flex-direction: column-reverse; gap: 16px; }
  .pl-count { padding: 12px 16px; border-radius: 14px; }
  .pl-count-n { font-size: 2.4rem; }
  .pl-metrics { grid-template-columns: 1fr; margin-top: 18px; }
  .pl-metric { padding: 14px 0 0; border-left: 0; }
  .pl-metric + .pl-metric { border-top: 1px solid var(--hairline); margin-top: 14px; }
  .pl-today { padding: 22px 20px 20px 26px; }
  .pl-views-h { flex-direction: column; align-items: stretch; }
  .pl-tabs { align-self: stretch; }
  .pl-tab { flex: 1; }
  .pl-range { min-width: 0; flex: 1; font-size: 1.05rem; white-space: nowrap; }
  .pl-yr { display: none; }
  .pl-todaybtn { margin-left: 0; }

  /* la semaine devient une liste de jours */
  .pl-week { grid-template-columns: 1fr; gap: 6px; }
  .pl-wday { min-height: 0; flex-direction: row; align-items: stretch; }
  .pl-wday-h { flex: 0 0 64px; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; padding: 10px 4px; }
  .pl-wday-h em { text-align: center; font-size: .62rem; }
  .pl-wday-b { padding: 8px 8px 8px 0; justify-content: center; }
  .pl-wday.is-out { display: none; }
  .pl-rest { text-align: left; margin: 0; }
  .pl-sess-open { padding: 10px 40px 10px 14px; }
  .pl-sess-title { -webkit-line-clamp: 3; font-size: .86rem; }

  /* le mois garde sa grille, les séances deviennent des barres de couleur */
  .pl-mcell { min-height: 58px; padding: 4px 3px 5px; gap: 3px; }
  .pl-mnum { min-width: 22px; height: 22px; font-size: .74rem; }
  .pl-mhead span { padding: 6px 2px; text-align: center; font-size: .62rem; letter-spacing: .02em; }
  .pl-mchip { height: 8px; padding: 0; border-radius: 4px; background: var(--c); }
  .pl-mchip::before, .pl-mchip span, .pl-mchip .pl-mchip-ok { display: none; }
  .pl-mchip.is-late { box-shadow: 0 0 0 1.5px var(--signal); }
  .pl-mchip.is-done { opacity: .35; }
  .pl-mexam { font-size: .6rem; padding: 0 1px; overflow: hidden; text-overflow: clip; }

  .pl-row { grid-template-columns: 22px minmax(0, 1fr); gap: .5rem .8rem; }
  .pl-row-what { grid-column: 2; }
  .pl-settings { grid-template-columns: 1fr 1fr; }
  .pl-settings div:nth-child(3) { border-left: 0; }
  .pl-settings div:nth-child(n+3) { border-top: 1px solid var(--hairline); }
  .pl-modal { place-items: end center; padding: 0; }
  .pl-modal-card { width: 100%; border-radius: 20px 20px 0 0; max-height: 88dvh; padding: 26px 20px 24px 26px; animation-name: pl-sheet; }
  .pl-dash-foot { grid-template-columns: 1fr; gap: .6rem; }
  .pl-dash-foot a { justify-self: start; }
}
@keyframes pl-sheet { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pl-modal, .pl-modal-card { animation: none; }
  .pl-sess, .pl-bar span, .pl-seg span { transition: none; }
}

/* ---------- « À faire aujourd'hui » et liens flashcards */
.pl-when-today { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.pl-due {
  display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .06em;
}
.pl-due.is-done { background: var(--acid-dim); color: var(--accent-ink); }
.pl-due svg { width: 13px; height: 13px; }
.pl-row-links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
button.pl-row-link { background: none; border: 0; padding: 0; font: inherit; font-size: .84rem; font-weight: 500; color: var(--accent-ink); cursor: pointer; text-align: left; }
button.pl-row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pl-when-today { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--ink-soft); font-weight: 600; }
.pl-when-today .pl-due { text-transform: uppercase; }
/* Téléphone : la séance du jour passe en tête, avant l'en-tête et ses chiffres. */
@media (max-width: 760px) { .pl-today { order: -1; } }

/* ---------- parcourir les séances et rattraper les oublis */
.pl-today-top { align-items: flex-start; flex-wrap: nowrap; }
.pl-today-when { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; min-width: 0; }
.pl-today-nav { display: flex; align-items: center; gap: .4rem; flex: 0 0 auto; }
.pl-today-nav .pl-todaybtn { margin-left: .2rem; }
.pl-due-late { background: var(--signal-dim); color: var(--signal-ink); }
.pl-late {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1.2rem;
  margin-top: 1.3rem; padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, var(--signal-dim) 55%, #fff); box-shadow: inset 0 0 0 1px rgba(224, 85, 46, .22);
}
.pl-late-t { margin: 0; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pl-late-t b { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--signal-ink); }
.pl-late-t span { font-size: .92rem; color: var(--ink); line-height: 1.4; }
.pl-late-act { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.pl-late-btn { background: #fff; }
.pl-late-dash { margin-top: 1rem; }
@media (max-width: 760px) {
  .pl-today-top { flex-direction: column-reverse; align-items: stretch; }
  .pl-today-nav { justify-content: flex-start; }
  .pl-today-nav .pl-todaybtn { margin-left: auto; }
  .pl-late { flex-direction: column; align-items: stretch; }
}
