/* ==========================================================================
   Panels professeur (prof.html) et administrateur (admin.html) : feuille partagée.
   Autonome : ne dépend ni d'admin.css ni d'admin-hv2.css.
   Marque hv2 : encre, accent #ef4a34, ambre #b5590b, Manrope.
   Tout est préfixé .pp- ou placé sous .pp (classe portée par le <body> des deux pages)
   pour ne rien faire fuir ailleurs. Les styles propres à l'admin sont dans css/admin-panel.css.
   ========================================================================== */

.pp {
  --pp-font: "Manrope", -apple-system, "Segoe UI", system-ui, sans-serif;
  --pp-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --pp-bg: #0b0b10;
  --pp-bg-soft: #0f0f15;
  --pp-panel: #15151c;
  --pp-panel-2: #1a1a23;
  --pp-panel-3: #232330;
  --pp-line: rgba(255, 255, 255, 0.07);
  --pp-line-2: rgba(255, 255, 255, 0.12);
  --pp-line-3: rgba(255, 255, 255, 0.22);
  --pp-text: #f5f3ee;
  --pp-text-2: #bdbab0;
  --pp-text-3: #8a877f;

  --pp-accent: #ef4a34;
  --pp-accent-hi: #ff6a52;
  --pp-accent-deep: #c93620;
  --pp-accent-soft: rgba(239, 74, 52, 0.13);
  --pp-accent-line: rgba(239, 74, 52, 0.4);
  --pp-accent-text: #ff9c88;

  --pp-amber: #f0a13a;
  --pp-amber-soft: rgba(181, 89, 11, 0.22);
  --pp-amber-line: rgba(240, 161, 58, 0.38);
  --pp-amber-text: #ffcb8a;

  --pp-ok: #4fd1a5;
  --pp-ok-soft: rgba(79, 209, 165, 0.12);
  --pp-ok-line: rgba(79, 209, 165, 0.32);

  --pp-danger: #f0575a;
  --pp-danger-soft: rgba(240, 87, 90, 0.12);
  --pp-danger-line: rgba(240, 87, 90, 0.4);
  --pp-danger-text: #ff9fa1;

  --pp-radius: 18px;
  --pp-shadow: 0 1px 0 rgba(255, 255, 255, 0.045) inset, 0 28px 56px -38px rgba(0, 0, 0, 0.8);
  --pp-ease: cubic-bezier(0.16, 0.84, 0.44, 1);
  --pp-top: var(--nv-bar, 67px);
  --pp-side: 276px;
}

/* ---------- Base ---------- */
.pp,
.pp *,
.pp *::before,
.pp *::after {
  box-sizing: border-box;
}

html:has(.pp) {
  scrollbar-color: #33333f transparent;
  scrollbar-width: thin;
}

.pp {
  margin: 0;
  min-height: 100vh;
  font-family: var(--pp-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--pp-text);
  background: var(--pp-bg);
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  overflow-x: hidden;
}

/* Halos de fond : un souffle d'accent en haut à gauche, d'ambre en haut à droite */
.pp::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(760px 480px at 96% 2%, rgba(181, 89, 11, 0.09), transparent 64%);
}

.pp [hidden] {
  display: none !important;
}

.pp * {
  scrollbar-width: thin;
  scrollbar-color: #3a3a46 transparent;
}

.pp ::selection {
  background: rgba(239, 74, 52, 0.38);
  color: #fff;
}

.pp a,
.pp button,
.pp input,
.pp select,
.pp textarea {
  touch-action: manipulation;
}

.pp button,
.pp input,
.pp textarea {
  font-family: inherit;
}

.pp :focus-visible {
  outline: 2px solid var(--pp-accent-hi);
  outline-offset: 2px;
}

.pp-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pp-i {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Boutons ---------- */
.pp .pp-btn {
  --btn-h: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--pp-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease,
    transform 0.16s var(--pp-ease);
}

.pp .pp-btn .pp-i {
  width: 1.15em;
  height: 1.15em;
}

.pp .pp-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.pp .pp-btn:active:not(:disabled) {
  transform: translateY(0);
}

.pp .pp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pp .pp-btn--sm {
  --btn-h: 36px;
  padding: 0 14px;
  font-size: 0.84rem;
  border-radius: 10px;
}

.pp .pp-btn--lg {
  --btn-h: 52px;
  padding: 0 28px;
  font-size: 1rem;
  border-radius: 14px;
}

.pp .pp-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #f75a44 0%, #e5432d 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 14px 28px -14px rgba(239, 74, 52, 0.85);
}

.pp .pp-btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff6852 0%, #ec4a34 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.34) inset, 0 18px 34px -14px rgba(239, 74, 52, 0.95);
}

.pp .pp-btn--ghost {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--pp-line-2);
}

.pp .pp-btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--pp-line-3);
}

.pp .pp-btn--danger-ghost {
  color: var(--pp-danger-text);
  border-color: var(--pp-danger-line);
}

.pp .pp-btn--danger-ghost:hover:not(:disabled) {
  color: #ffd0d1;
  background: var(--pp-danger-soft);
  border-color: var(--pp-danger);
}

.pp .pp-btn--danger {
  color: #fff;
  background: linear-gradient(180deg, #f4666a 0%, #dc474b 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 14px 28px -14px rgba(240, 87, 90, 0.8);
}

.pp .pp-btn--danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff767a 0%, #e5505a 100%);
}

/* Boutons-icône (actions de ligne, fermer, retour) */
.pp .pp-iconbtn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  flex: none;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--pp-line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--pp-text-2);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--pp-ease);
}

.pp .pp-iconbtn .pp-i {
  width: 18px;
  height: 18px;
}

.pp .pp-iconbtn:hover:not(:disabled) {
  color: var(--pp-text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--pp-line-2);
  transform: translateY(-1px);
}

.pp .pp-iconbtn--accent:hover:not(:disabled) {
  color: var(--pp-accent-hi);
  background: var(--pp-accent-soft);
  border-color: var(--pp-accent-line);
}

.pp .pp-iconbtn--amber:hover:not(:disabled) {
  color: var(--pp-amber);
  background: rgba(240, 161, 58, 0.12);
  border-color: var(--pp-amber-line);
}

.pp .pp-iconbtn--danger:hover:not(:disabled) {
  color: var(--pp-danger);
  background: var(--pp-danger-soft);
  border-color: var(--pp-danger-line);
}

.pp .pp-iconbtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pp .pp-iconbtn--slot {
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Barre du haut ----------
   Les panels n'ont plus de barre à eux : c'est la barre de navigation commune du site (css/top-nav.css, <header><nav class="navbar">).
   Elle est collante et haute de var(--nv-bar) : --pp-top (plus haut) en reprend la valeur pour caler le menu latéral. */

/* ---------- Coque : barre latérale + contenu ---------- */
.pp-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--pp-side) minmax(0, 1fr);
  min-height: calc(100vh - var(--pp-top));
}

.pp-side {
  position: sticky;
  top: var(--pp-top);
  align-self: start;
  height: calc(100vh - var(--pp-top));
  padding: 26px 16px 22px;
  overflow-y: auto;
  border-right: 1px solid var(--pp-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 45%), rgba(11, 11, 16, 0.55);
}

.pp-side__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 24px;
}

.pp-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pp-nav__label {
  margin: 20px 12px 7px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pp-text-3);
}

.pp-nav__label:first-child {
  margin-top: 0;
}

.pp .pp-nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--pp-text-2);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.pp .pp-nav__item .pp-i {
  width: 19px;
  height: 19px;
  color: var(--pp-text-3);
  transition: color 0.16s ease;
}

.pp .pp-nav__item:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--pp-text);
}

.pp .pp-nav__item:hover .pp-i {
  color: var(--pp-text-2);
}

.pp .pp-nav__item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(239, 74, 52, 0.17), rgba(239, 74, 52, 0.06));
  border-color: rgba(239, 74, 52, 0.28);
}

.pp .pp-nav__item.active .pp-i {
  color: var(--pp-accent-hi);
}

.pp .pp-nav__item.active::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 11px;
  bottom: 11px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--pp-accent);
  box-shadow: 0 0 16px rgba(239, 74, 52, 0.75);
}

.pp-nav__text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pastille « non lus » posée par SupportNotifications.setNavBadge */
.pp .support-nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pp-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px -6px rgba(239, 74, 52, 0.9);
}

/* Jauge de quota en bas de la barre latérale */
.pp-quota-mini {
  margin-top: auto;
  padding: 16px 16px 14px;
  border: 1px solid var(--pp-line);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(239, 74, 52, 0.12), rgba(255, 255, 255, 0.02) 62%);
}

.pp-quota-mini__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pp-quota-mini__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pp-text-3);
}

.pp-quota-mini__value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pp .pp-quota-mini__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--pp-accent-text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.pp .pp-quota-mini__link .pp-i {
  width: 14px;
  height: 14px;
  transition: transform 0.16s var(--pp-ease);
}

.pp .pp-quota-mini__link:hover {
  color: #ffc1b3;
}

.pp .pp-quota-mini__link:hover .pp-i {
  transform: translateX(3px);
}

.pp-quota-mini__text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--pp-text-2);
}

/* Jauge générique */
.pp-meter {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pp-meter > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pp-accent), var(--pp-accent-hi));
  box-shadow: 0 0 12px rgba(239, 74, 52, 0.55);
  transition: width 0.9s var(--pp-ease), background 0.3s ease;
}

.pp-meter.is-warn > span,
.pp-meter > span.is-warn {
  background: linear-gradient(90deg, #d68320, var(--pp-amber));
  box-shadow: 0 0 12px rgba(240, 161, 58, 0.5);
}

/* ---------- Contenu ---------- */
.pp-main {
  min-width: 0;
  padding: 42px clamp(18px, 3.4vw, 56px) 84px;
}

.pp-panel {
  display: none;
  max-width: 1260px;
  margin: 0 auto;
}

.pp-panel.active {
  display: block;
  animation: ppRise 0.34s var(--pp-ease) backwards;
}

@keyframes ppRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-bottom: 30px;
}

.pp-head__text {
  min-width: 0;
}

.pp-eyebrow {
  margin: 0 0 9px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pp-accent-text);
}

.pp-h1 {
  margin: 0;
  font-size: clamp(1.75rem, 2.5vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.028em;
  color: var(--pp-text);
}

.pp-h2 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.012em;
  color: var(--pp-text);
}

.pp-h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--pp-text);
}

.pp-lead {
  margin: 12px 0 0;
  max-width: 64ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pp-text-2);
}

.pp-lead strong,
.pp-muted strong {
  font-weight: 700;
  color: var(--pp-text);
}

.pp-muted {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--pp-text-2);
}

.pp-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--pp-text-3);
}

/* ---------- Cartes ---------- */
.pp-card {
  position: relative;
  margin-bottom: 20px;
  padding: 26px 30px;
  border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)), var(--pp-panel);
  box-shadow: var(--pp-shadow);
}

.pp-card--flush {
  padding: 0;
  overflow: hidden;
}

/* ---------- Indicateurs ---------- */
.pp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.pp-kpi {
  --kpi-color: var(--pp-accent-hi);
  --kpi-bg: var(--pp-accent-soft);
  --kpi-line: var(--pp-accent-line);
  position: relative;
  overflow: hidden;
  padding: 20px 22px 18px;
  border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)), var(--pp-panel);
  box-shadow: var(--pp-shadow);
  transition: transform 0.22s var(--pp-ease), border-color 0.22s ease;
}

.pp-kpi:hover {
  transform: translateY(-3px);
  border-color: var(--pp-line-2);
}

/* fill-mode « backwards » : un « both » figerait le transform final et empêcherait l'effet de survol */
.pp-panel.active .pp-kpis > .pp-kpi {
  animation: ppRise 0.55s var(--pp-ease) backwards;
}

.pp-panel.active .pp-kpis > .pp-kpi:nth-child(2) {
  animation-delay: 0.06s;
}

.pp-panel.active .pp-kpis > .pp-kpi:nth-child(3) {
  animation-delay: 0.12s;
}

.pp-panel.active .pp-kpis > .pp-kpi:nth-child(4) {
  animation-delay: 0.18s;
}

.pp-kpi--ok {
  --kpi-color: var(--pp-ok);
  --kpi-bg: var(--pp-ok-soft);
  --kpi-line: var(--pp-ok-line);
}

.pp-kpi--amber {
  --kpi-color: var(--pp-amber);
  --kpi-bg: rgba(240, 161, 58, 0.12);
  --kpi-line: var(--pp-amber-line);
}

.pp-kpi--slate {
  --kpi-color: #a3b4dc;
  --kpi-bg: rgba(112, 140, 200, 0.13);
  --kpi-line: rgba(112, 140, 200, 0.32);
}

.pp-kpi__top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.pp-kpi__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--kpi-line);
  background: var(--kpi-bg);
  color: var(--kpi-color);
}

.pp-kpi__icon .pp-i {
  width: 19px;
  height: 19px;
}

.pp-kpi__label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--pp-text-2);
}

.pp-kpi__value {
  position: relative;
  margin: 0;
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.pp-kpi__of {
  margin-left: 4px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--pp-text-3);
}

.pp-kpi__sub {
  position: relative;
  margin: 11px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--pp-text-3);
}

.pp-kpi .pp-meter {
  position: relative;
  margin-top: 14px;
}

.pp-kpi .pp-meter + .pp-kpi__sub {
  margin-top: 10px;
}

/* ---------- Générateur ---------- */
.pp-generator {
  overflow: hidden;
  padding: 0;
}

.pp-generator__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: center;
  padding: 32px 34px;
}

.pp-generator__badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 14px;
  color: var(--pp-accent-hi);
  background: var(--pp-accent-soft);
  border: 1px solid var(--pp-accent-line);
}

.pp-generator__badge .pp-i {
  width: 22px;
  height: 22px;
}

.pp-generator__intro .pp-h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.pp-generator__intro .pp-muted {
  margin: 0;
  max-width: 52ch;
}

.pp-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pp-text-2);
}

.pp-flow li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pp-flow__n {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--pp-accent-line);
  border-radius: 50%;
  background: var(--pp-accent-soft);
  color: var(--pp-accent-text);
  font-size: 0.7rem;
  font-weight: 800;
}

.pp-generator__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pp-generator__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.pp-generator__submit {
  width: 100%;
}

.pp-label {
  display: block;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pp-text-3);
}

.pp-form .pp-label {
  margin-top: 18px;
}

.pp-form .pp-label:first-child {
  margin-top: 0;
}

.pp-optional {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--pp-text-3);
}

.pp-quotaline {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 2px;
}

/* Sélecteur numérique − / + */
.pp-stepper {
  display: inline-flex;
  align-items: stretch;
  height: 52px;
  border: 1px solid var(--pp-line-2);
  border-radius: 14px;
  background: var(--pp-bg-soft);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pp-stepper:focus-within {
  border-color: var(--pp-accent-line);
  box-shadow: 0 0 0 4px rgba(239, 74, 52, 0.13);
}

.pp .pp-stepper__btn {
  display: grid;
  place-items: center;
  width: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pp-text-2);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.pp .pp-stepper__btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--pp-text);
}

.pp .pp-stepper__btn:active {
  background: var(--pp-accent-soft);
  color: var(--pp-accent-hi);
}

.pp .pp-stepper__input {
  width: 68px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--pp-line);
  border-right: 1px solid var(--pp-line);
  border-radius: 0;
  background: transparent;
  color: var(--pp-text);
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.pp .pp-stepper__input--wide {
  width: 96px;
}

.pp .pp-stepper__input::-webkit-outer-spin-button,
.pp .pp-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pp .pp-stepper__input:focus {
  outline: none;
}

.pp .pp-stepper__input:disabled {
  opacity: 0.5;
}

.pp-quick {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pp .pp-quick__btn {
  min-width: 46px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--pp-line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--pp-text-2);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--pp-ease);
}

.pp .pp-quick__btn:hover:not(:disabled) {
  color: var(--pp-text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--pp-line-3);
  transform: translateY(-1px);
}

.pp .pp-quick__btn.is-on {
  color: #fff;
  background: var(--pp-accent-soft);
  border-color: var(--pp-accent-line);
}

.pp .pp-quick__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Alertes & encarts ---------- */
.pp-alert {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--pp-line-2);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--pp-text-2);
}

.pp-alert strong {
  color: var(--pp-text);
}

.pp-alert--danger {
  border-color: var(--pp-danger-line);
  background: var(--pp-danger-soft);
  color: #ffc9ca;
}

.pp-alert--warn {
  border-color: var(--pp-amber-line);
  background: rgba(181, 89, 11, 0.16);
  color: var(--pp-amber-text);
}

.pp-alert--ok {
  border-color: var(--pp-ok-line);
  background: var(--pp-ok-soft);
  color: #b4f0dc;
}

.pp-alert--info {
  border-color: rgba(112, 140, 200, 0.34);
  background: rgba(112, 140, 200, 0.12);
  color: #c6d3f1;
}

.pp-head + .pp-alert,
.pp-alert + .pp-chat,
.pp-alert + .pp-card {
  margin-top: 0;
}

.pp-alert + .pp-chat,
.pp-alert + .pp-card {
  margin-top: 16px;
}

.pp-head + .pp-alert {
  margin-bottom: 16px;
}

/* État plein cadre (ex. chat non disponible pour un admin) */
.pp-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
  margin: 28px auto;
  padding: 48px 40px;
  text-align: center;
}

.pp-state__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 20px;
  color: var(--pp-accent-hi);
  background: var(--pp-accent-soft);
  border: 1px solid var(--pp-accent-line);
  box-shadow: 0 18px 36px -20px rgba(239, 74, 52, 0.7);
}

.pp-state__icon .pp-i {
  width: 30px;
  height: 30px;
}

.pp-state__title {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.pp-state__text {
  margin: 0 0 6px;
  max-width: 52ch;
  color: var(--pp-text-2);
  line-height: 1.65;
}

.pp-state__hint {
  margin: 14px 0 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pp-line);
  font-family: var(--pp-mono);
  font-size: 0.76rem;
  color: var(--pp-text-3);
}

/* ---------- Pastilles, compteurs, avatars ---------- */
.pp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px;
  border: 1px solid var(--pp-line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--pp-text-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pp-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.pp-pill--nodot::before,
.pp-pill--lg::before {
  display: none;
}

.pp-pill--lg {
  height: 34px;
  padding: 0 15px;
  font-size: 0.8rem;
}

.pp-pill--lg .pp-i {
  width: 15px;
  height: 15px;
}

.pp-pill--ok {
  color: var(--pp-ok);
  background: var(--pp-ok-soft);
  border-color: var(--pp-ok-line);
}

.pp-pill--warn {
  color: var(--pp-amber-text);
  background: var(--pp-amber-soft);
  border-color: var(--pp-amber-line);
}

.pp-pill--accent {
  color: var(--pp-accent-text);
  background: var(--pp-accent-soft);
  border-color: var(--pp-accent-line);
}

.pp-pill--danger {
  color: var(--pp-danger-text);
  background: var(--pp-danger-soft);
  border-color: var(--pp-danger-line);
}

.pp-pill--muted {
  color: var(--pp-text-3);
}

.pp-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--pp-text-2);
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pp-count:empty {
  display: none;
}

.pp-avatar {
  --av: #5c6f99;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--av);
  background: linear-gradient(140deg, var(--av), color-mix(in srgb, var(--av) 62%, #000));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 8px 18px -10px rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  user-select: none;
}

.pp-avatar--lg {
  width: 46px;
  height: 46px;
  font-size: 0.95rem;
}

.pp-avatar--pending {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1.5px var(--pp-line-2);
  border: 1px dashed rgba(255, 255, 255, 0.26);
  color: var(--pp-text-3);
}

.pp-avatar--icon {
  background: linear-gradient(140deg, rgba(240, 161, 58, 0.3), rgba(181, 89, 11, 0.4));
  box-shadow: inset 0 0 0 1px var(--pp-amber-line);
  color: var(--pp-amber-text);
}

.pp-avatar .pp-i {
  width: 55%;
  height: 55%;
}

/* ---------- Champs ---------- */
.pp .pp-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 15px;
  border: 1px solid var(--pp-line-2);
  border-radius: 12px;
  background: var(--pp-bg-soft);
  color: var(--pp-text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pp .pp-input--area {
  height: auto;
  min-height: 110px;
  padding: 13px 15px;
  line-height: 1.55;
  resize: vertical;
}

.pp .pp-input::placeholder,
.pp .pp-search input::placeholder,
.pp .pp-composer textarea::placeholder {
  color: var(--pp-text-3);
  opacity: 1;
}

.pp .pp-input:hover {
  border-color: var(--pp-line-3);
}

.pp .pp-input:focus {
  outline: none;
  border-color: var(--pp-accent-line);
  box-shadow: 0 0 0 4px rgba(239, 74, 52, 0.13);
}

.pp-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.pp-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.pp-search .pp-i {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--pp-text-3);
  pointer-events: none;
}

.pp .pp-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--pp-line-2);
  border-radius: 11px;
  background: var(--pp-bg-soft);
  color: var(--pp-text);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pp .pp-search input:hover {
  border-color: var(--pp-line-3);
}

.pp .pp-search input:focus {
  outline: none;
  border-color: var(--pp-accent-line);
  box-shadow: 0 0 0 4px rgba(239, 74, 52, 0.12);
}

.pp .pp-search input::-webkit-search-cancel-button {
  filter: invert(0.7);
  cursor: pointer;
}

/* Filtre segmenté */
.pp-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--pp-line-2);
  border-radius: 12px;
  background: var(--pp-bg-soft);
}

.pp .pp-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--pp-text-3);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.pp .pp-seg__btn:hover {
  color: var(--pp-text);
}

.pp .pp-seg__btn.active {
  background: var(--pp-panel-3);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 6px 14px -8px rgba(0, 0, 0, 0.8);
}

.pp-seg__n {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pp .pp-seg__btn.active .pp-seg__n {
  background: var(--pp-accent);
  color: #fff;
}

/* ---------- Liste des élèves & tableaux ---------- */
.pp-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--pp-line);
}

.pp-list__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pp-list__title .pp-h2 {
  margin: 0;
}

.pp-list__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.pp-list__tools .pp-search {
  width: 300px;
  max-width: 100%;
}

.pp-tablewrap {
  width: 100%;
}

.pp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.pp-table th {
  padding: 13px 18px;
  border-bottom: 1px solid var(--pp-line);
  color: var(--pp-text-3);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.015);
}

.pp-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--pp-line);
  color: var(--pp-text-2);
  vertical-align: middle;
}

.pp-table tbody tr {
  transition: background 0.15s ease;
}

.pp-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.028);
}

.pp-table tbody tr:last-child td {
  border-bottom: 0;
}

.pp-table th:first-child,
.pp-table td:first-child {
  padding-left: 26px;
}

.pp-table th:last-child,
.pp-table td:last-child {
  padding-right: 26px;
}

.pp-col-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.pp-col-num {
  width: 1%;
  color: var(--pp-text-3);
}

.pp-person {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 340px;
}

.pp-person__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.pp-person__name {
  overflow: hidden;
  font-weight: 700;
  color: var(--pp-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-person__sub {
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--pp-text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-person.is-pending .pp-person__name {
  font-weight: 600;
  color: var(--pp-text-2);
}

.pp-date {
  display: flex;
  flex-direction: column;
  gap: 1px;
  white-space: nowrap;
}

.pp-date__main {
  color: var(--pp-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pp-date__sub {
  font-size: 0.76rem;
  color: var(--pp-text-3);
}

.pp-teacher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--pp-text);
}

.pp-teacher {
  max-width: 220px;
}

.pp-teacher__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-teacher .pp-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.66rem;
}

.pp .pp-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--pp-line-2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffc2b2;
  font-family: var(--pp-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pp button.pp-code {
  cursor: copy;
}

.pp button.pp-code:hover {
  background: var(--pp-accent-soft);
  border-color: var(--pp-accent-line);
  color: #ffd9cf;
}

.pp-code__t {
  min-width: 0;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-code .pp-i {
  width: 13px;
  height: 13px;
  opacity: 0.5;
}

.pp-code--secret {
  color: #ffe0a8;
  background: rgba(240, 161, 58, 0.1);
  border-color: var(--pp-amber-line);
}

.pp-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* États : chargement, vide, erreur */
.pp-skel {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  background-size: 220% 100%;
  animation: ppShimmer 1.4s linear infinite;
}

@keyframes ppShimmer {
  from {
    background-position: 220% 0;
  }
  to {
    background-position: -220% 0;
  }
}

.pp-skelrow {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--pp-line);
}

.pp-skelrow .pp-skel:first-child {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.pp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 56px 24px 60px;
  text-align: center;
}

.pp-empty__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--pp-line-2);
  color: var(--pp-text-3);
}

.pp-empty__icon .pp-i {
  width: 28px;
  height: 28px;
}

.pp-empty__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pp-text);
}

.pp-empty__text {
  margin: 0 0 8px;
  max-width: 46ch;
  font-size: 0.9rem;
  color: var(--pp-text-2);
}

/* ---------- Résultats du générateur ---------- */
.pp-results {
  border-color: var(--pp-ok-line);
  background: linear-gradient(180deg, rgba(79, 209, 165, 0.075), rgba(255, 255, 255, 0.01) 55%), var(--pp-panel);
  animation: ppRise 0.4s var(--pp-ease) both;
}

.pp-adminnote {
  margin-bottom: 20px;
}

/* Titre + bouton « Masquer » : toujours sur la même ligne, y compris sur téléphone (le titre rétrécit, pas le bouton) */
.pp-results__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 24px 34px 18px;
}

.pp-results__title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 0;
}

.pp-results__title strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pp-text);
}

.pp-results__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--pp-ok-soft);
  border: 1px solid var(--pp-ok-line);
  color: var(--pp-ok);
}

.pp-results__note {
  margin: 4px 0 0;
  max-width: 68ch;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--pp-text-2);
}

.pp-results__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Récupérer les identifiants : trois tuiles, chacune dit ce qu'on obtient (fiches PDF, copie, Excel). js/prof.js */
.pp-export {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 34px 24px;
}

.pp .pp-export__item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  text-align: left;
  color: var(--pp-text);
  font: inherit;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--pp-line-2);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s var(--pp-ease);
}

.pp .pp-export__item:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--pp-line-3);
  transform: translateY(-1px);
}

.pp .pp-export__item:active {
  transform: translateY(0);
}

.pp .pp-export__item--main {
  background: var(--pp-accent-soft);
  border-color: var(--pp-accent-line);
}

.pp .pp-export__item--main:hover {
  background: rgba(239, 74, 52, 0.2);
  border-color: var(--pp-accent);
}

.pp-export__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--pp-line-2);
  color: var(--pp-text-2);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.pp-export__icon .pp-i {
  width: 20px;
  height: 20px;
}

.pp .pp-export__item--main .pp-export__icon {
  background: linear-gradient(180deg, #f75a44 0%, #e5432d 100%);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pp-export__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pp-export__text strong {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}

.pp-export__text small {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--pp-text-2);
  overflow-wrap: anywhere;
}

/* Fait : la tuile le dit pendant quelques secondes */
.pp .pp-export__item.is-done {
  background: var(--pp-ok-soft);
  border-color: var(--pp-ok-line);
}

.pp .pp-export__item.is-done .pp-export__icon {
  background: var(--pp-ok-soft);
  border-color: var(--pp-ok-line);
  color: var(--pp-ok);
}

.pp .pp-export__item.is-done small {
  color: var(--pp-ok);
}

.pp-table--cred td,
.pp-table--cred th {
  padding-top: 11px;
  padding-bottom: 11px;
}

.pp-table--cred th:first-child,
.pp-table--cred td:first-child {
  padding-left: 34px;
}

.pp-table--cred th:last-child,
.pp-table--cred td:last-child {
  padding-right: 34px;
}

/* « Copier » au bout d'une ligne d'identifiants : un bouton avec son mot, plus discret qu'un bouton d'action */
.pp .pp-btn--row {
  --btn-h: 32px;
  padding: 0 12px;
  font-size: 0.8rem;
}

/* ---------- Chat (deux colonnes) ---------- */
.pp-chat {
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr);
  height: clamp(540px, calc(100vh - 300px), 820px);
  border: 1px solid var(--pp-line);
  border-radius: 22px;
  background: var(--pp-panel);
  box-shadow: var(--pp-shadow);
  overflow: hidden;
}

.pp-chat__list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--pp-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 30%), rgba(11, 11, 16, 0.35);
}

.pp-chat__listhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 20px 12px;
}

.pp-chat__search {
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--pp-line);
}

.pp-chat__items {
  flex: 1;
  min-height: 0;
  padding: 10px;
  overflow-y: auto;
}

.pp .pp-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  margin: 0 0 4px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--pp-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pp .pp-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.pp .pp-item.active {
  background: linear-gradient(90deg, rgba(239, 74, 52, 0.15), rgba(239, 74, 52, 0.06));
  border-color: rgba(239, 74, 52, 0.28);
}

.pp-item__body {
  flex: 1;
  min-width: 0;
}

.pp-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pp-item__name {
  overflow: hidden;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--pp-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-item__time {
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pp-text-3);
  font-variant-numeric: tabular-nums;
}

.pp-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 3px;
}

.pp-item__preview {
  overflow: hidden;
  font-size: 0.82rem;
  color: var(--pp-text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-item.is-unread .pp-item__name,
.pp-item.is-unread .pp-item__preview {
  color: #fff;
}

.pp-item.is-unread .pp-item__preview {
  font-weight: 700;
}

.pp-item.is-unread .pp-item__time {
  color: var(--pp-accent-text);
}

.pp-badge {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pp-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 6px 14px -6px rgba(239, 74, 52, 0.9);
}

.pp-tag {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--pp-amber-line);
  background: var(--pp-amber-soft);
  color: var(--pp-amber-text);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pp-item__subject {
  display: block;
  overflow: hidden;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--pp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pp-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 7px;
}

.pp-item--ticket {
  align-items: flex-start;
}

.pp-item--ticket .pp-avatar {
  margin-top: 1px;
}

.pp-list-note {
  margin: 0;
  padding: 26px 18px;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--pp-text-3);
}

.pp-list-note strong {
  color: var(--pp-text-2);
}

.pp-chat__main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--pp-bg-soft);
}

.pp-chat__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px;
  text-align: center;
}

.pp-chat__empty .pp-muted {
  max-width: 40ch;
  margin-bottom: 16px;
}

.pp-chat__empty-title {
  margin: 8px 0 4px;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--pp-text);
}

.pp-illus {
  width: 190px;
  height: auto;
  margin-bottom: 8px;
  overflow: visible;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.45));
}

.pp-illus__a {
  fill: var(--pp-panel-3);
  stroke: var(--pp-line-2);
}

.pp-illus__b {
  fill: #e5432d;
}

.pp-illus__line {
  fill: rgba(255, 255, 255, 0.28);
}

.pp-illus__line2 {
  fill: rgba(255, 255, 255, 0.55);
}

.pp-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pp-thread__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--pp-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), var(--pp-panel);
}

.pp-thread__who {
  flex: 1;
  min-width: 0;
}

.pp-thread__title {
  margin: 0;
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-thread__sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--pp-text-3);
}

.pp-thread__sub .pp-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pp-thread__sub .pp-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pp-ok);
  box-shadow: 0 0 8px var(--pp-ok);
}

.pp-thread__sub .pp-dot--warn::before {
  background: var(--pp-amber);
  box-shadow: 0 0 8px var(--pp-amber);
}

.pp .pp-thread__back {
  display: none;
}

.pp-thread__body {
  flex: 1;
  min-height: 0;
  padding: 22px 26px 18px;
  overflow-y: auto;
  background-color: var(--pp-bg-soft);
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}

.pp-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0 22px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--pp-line-2);
  border-radius: 18px;
  background: var(--pp-panel-2);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pp-composer:focus-within {
  border-color: var(--pp-accent-line);
  box-shadow: 0 0 0 4px rgba(239, 74, 52, 0.12);
}

.pp .pp-composer textarea {
  flex: 1;
  align-self: center;
  min-height: 26px;
  max-height: 150px;
  padding: 6px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--pp-text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: none;
}

.pp .pp-composer textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pp .pp-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, #f75a44, #e5432d);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 12px 22px -12px rgba(239, 74, 52, 0.9);
  transition: transform 0.16s var(--pp-ease), filter 0.16s ease, opacity 0.16s ease;
}

.pp .pp-send .pp-i {
  width: 19px;
  height: 19px;
  transform: translate(-1px, 1px);
}

.pp .pp-send:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.04);
  filter: brightness(1.08);
}

.pp .pp-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.6);
}

.pp-composer__hint {
  margin: 8px 22px 14px;
  font-size: 0.72rem;
  color: var(--pp-text-3);
}

.pc-counter {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pp-amber-text);
  white-space: nowrap;
}

/* ---------- Fil de messages élève <-> prof (js/prof-chat.js : .pc-*) ---------- */
.pp .pc-thread {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pp .pc-day {
  align-self: center;
  margin: 16px 0 10px;
  padding: 4px 13px;
  border: 1px solid var(--pp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--pp-text-3);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pp .pc-day:first-child {
  margin-top: 0;
}

.pp .pc-row {
  display: flex;
  width: 100%;
}

.pp .pc-row--mine {
  justify-content: flex-end;
}

.pp .pc-bubble {
  max-width: min(74%, 580px);
  padding: 10px 14px 7px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: ppPop 0.22s var(--pp-ease) both;
}

@keyframes ppPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pp .pc-row--mine .pc-bubble {
  color: #fff;
  background: linear-gradient(135deg, #f4553f, #dc3f29);
  border-bottom-right-radius: 6px;
  box-shadow: 0 12px 24px -16px rgba(239, 74, 52, 0.9);
}

.pp .pc-row--theirs .pc-bubble {
  color: var(--pp-text);
  background: var(--pp-panel-3);
  border: 1px solid var(--pp-line-2);
  border-bottom-left-radius: 6px;
}

.pp .pc-author {
  display: none;
}

.pp .pc-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pp .pc-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.68rem;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.pp .pc-receipt--read {
  font-weight: 800;
  opacity: 1;
}

.pp .pc-empty {
  margin: auto;
  max-width: 34ch;
  padding: 24px 16px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--pp-text-3);
}

/* ---------- Fil support prof <-> admin (js/support-chat-ui.js : .chat-*) ---------- */
.pp #prof-chat-messages .chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pp .chat-thread-empty {
  margin: 40px auto;
  text-align: center;
  color: var(--pp-text-3);
}

.pp .chat-bubble-row {
  display: flex;
  width: 100%;
}

.pp .chat-bubble-row--user {
  justify-content: flex-end;
}

.pp .chat-bubble-row--staff {
  justify-content: flex-start;
}

.pp .chat-bubble {
  max-width: min(74%, 580px);
  padding: 10px 14px 8px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: ppPop 0.22s var(--pp-ease) both;
}

.pp .chat-bubble--user {
  color: #fff;
  background: linear-gradient(135deg, #f4553f, #dc3f29);
  border-bottom-right-radius: 6px;
  box-shadow: 0 12px 24px -16px rgba(239, 74, 52, 0.9);
}

.pp .chat-bubble--staff {
  color: var(--pp-text);
  background: var(--pp-panel-3);
  border: 1px solid var(--pp-line-2);
  border-bottom-left-radius: 6px;
}

.pp .chat-bubble--user .chat-bubble__author {
  display: none;
}

.pp .chat-bubble__author {
  margin-bottom: 2px;
}

.pp .msg-author {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--pp-amber-text);
}

.pp .chat-bubble__body p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pp .chat-bubble__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 5px;
  font-size: 0.68rem;
  opacity: 0.78;
}

.pp .chat-bubble__foot time {
  font-variant-numeric: tabular-nums;
}

.pp .chat-bubble__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pp .chat-msg-edited {
  margin-left: 6px;
  font-style: italic;
  opacity: 0.8;
}

.pp .msg-receipt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 700;
}

.pp .msg-receipt__icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 10px;
}

.pp .msg-receipt__check {
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 7px;
  height: 4px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.pp .msg-receipt__check--2 {
  left: 6px;
}

.pp .msg-receipt--read {
  color: #fff;
  opacity: 1;
}

.pp .chat-msg-edit {
  padding: 2px 9px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pp .chat-msg-edit:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pp .chat-bubble--editing {
  width: min(74%, 580px);
}

.pp .chat-msg-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.pp .chat-msg-edit-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.pp .chat-msg-edit-input {
  width: 100%;
  min-height: 84px;
  max-height: 220px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}

.pp .chat-msg-edit-input:focus {
  outline: none;
  border-color: #fff;
}

.pp .chat-msg-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pp .chat-msg-edit-save,
.pp .chat-msg-edit-cancel {
  padding: 6px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.pp .chat-msg-edit-save {
  background: #fff;
  color: #b8321f;
}

.pp .chat-msg-edit-cancel {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.pp .chat-msg-edit-save:disabled,
.pp .chat-msg-edit-cancel:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Demande + élèves ---------- */
.pp-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: start;
}

.pp-grid-2 > .pp-card {
  margin-bottom: 0;
}

.pp-quotacard__body {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 18px;
}

.pp-quotacard__text {
  min-width: 0;
}

.pp-quotacard__stat {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--pp-text);
}

.pp-quotacard__stat .is-ok {
  color: var(--pp-ok);
  font-size: 0.92rem;
  font-weight: 700;
}

.pp-quotacard__stat .is-full {
  color: var(--pp-amber);
  font-size: 0.92rem;
  font-weight: 700;
}

.pp-ring {
  position: relative;
  width: 138px;
  height: 138px;
  flex: none;
}

.pp-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pp-ring__track,
.pp-ring__bar {
  fill: none;
  stroke-width: 9;
}

.pp-ring__track {
  stroke: rgba(255, 255, 255, 0.08);
}

.pp-ring__bar {
  stroke: var(--pp-accent);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  filter: drop-shadow(0 0 7px rgba(239, 74, 52, 0.6));
  transition: stroke-dashoffset 1s var(--pp-ease), stroke 0.3s ease;
}

.pp-ring.is-warn .pp-ring__bar {
  stroke: var(--pp-amber);
  filter: drop-shadow(0 0 7px rgba(240, 161, 58, 0.55));
}

.pp-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.pp-ring__label strong {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pp-ring__label span {
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pp-text-3);
}

/* ---------- Fenêtre modale ---------- */
.pp-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: ppFade 0.2s ease both;
}

@keyframes ppFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.pp-modal__panel {
  position: relative;
  width: min(100%, 540px);
  max-height: 92vh;
  padding: 28px 30px 30px;
  overflow-y: auto;
  border: 1px solid var(--pp-line-2);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--pp-panel-2);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  animation: ppRise 0.3s var(--pp-ease) both;
}

.pp-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.pp-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  padding-right: 40px;
}

.pp-modal__head .pp-muted {
  margin: 0;
  font-size: 0.88rem;
}

.pp-modal__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--pp-accent-hi);
  background: var(--pp-accent-soft);
  border: 1px solid var(--pp-accent-line);
}

.pp-modal__icon--danger {
  color: var(--pp-danger);
  background: var(--pp-danger-soft);
  border-color: var(--pp-danger-line);
}

.pp-modal__title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pp-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.pp-modal__body {
  margin: 0 0 6px;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--pp-text-2);
}

.pp-modal__body strong {
  color: var(--pp-text);
}

.pp-modal__confirm-input {
  margin-top: 16px;
}

.pp-modal__confirm-input .pp-label {
  margin-bottom: 8px;
}

.pp-modal__confirm-input code {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--pp-danger-soft);
  color: var(--pp-danger-text);
  font-family: var(--pp-mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* ---------- Notifications ---------- */
.pp-toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.pp-toast {
  --tone: var(--pp-accent-hi);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px 14px 14px;
  border: 1px solid var(--pp-line-2);
  border-left: 3px solid var(--tone);
  border-radius: 14px;
  background: rgba(27, 27, 36, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.85);
  color: var(--pp-text);
  pointer-events: auto;
  animation: ppToastIn 0.36s var(--pp-ease) both;
}

.pp-toast.is-leaving {
  animation: ppToastOut 0.24s ease both;
}

@keyframes ppToastIn {
  from {
    opacity: 0;
    transform: translateX(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ppToastOut {
  to {
    opacity: 0;
    transform: translateX(28px);
  }
}

.pp-toast--ok {
  --tone: var(--pp-ok);
}

.pp-toast--danger {
  --tone: var(--pp-danger);
}

.pp-toast--warn {
  --tone: var(--pp-amber);
}

.pp-toast__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 15%, transparent);
}

.pp-toast__icon .pp-i {
  width: 16px;
  height: 16px;
}

.pp-toast__text {
  flex: 1;
  min-width: 0;
  padding-top: 3px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pp-toast__text small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--pp-text-3);
}

.pp .pp-toast__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pp-text-3);
  cursor: pointer;
}

.pp .pp-toast__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--pp-text);
}

.pp-toast__close .pp-i {
  width: 14px;
  height: 14px;
}

/* Info-bulle (une seule, positionnée par js/panel-ui.js) */
.pp-tip {
  position: fixed;
  z-index: 1200;
  max-width: 260px;
  padding: 7px 11px;
  border: 1px solid var(--pp-line-2);
  border-radius: 9px;
  background: #050508;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.9);
  color: var(--pp-text);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.pp-tip.is-on {
  opacity: 1;
  transform: none;
}

/* ---------- Adaptation aux écrans plus étroits ---------- */
@media (max-width: 1180px) {
  .pp-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pp-generator__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .pp-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .pp-shell {
    grid-template-columns: 1fr;
  }

  .pp-side {
    top: var(--pp-top);
    z-index: 60;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--pp-line);
    background: rgba(11, 11, 16, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .pp-side::-webkit-scrollbar {
    display: none;
  }

  .pp-side__inner {
    flex-direction: row;
    min-height: 0;
    gap: 0;
  }

  .pp-nav {
    flex-direction: row;
    gap: 6px;
  }

  .pp-nav__label,
  .pp-quota-mini {
    display: none;
  }

  .pp .pp-nav__item {
    width: auto;
    height: 42px;
    flex: none;
    padding: 0 14px;
  }

  .pp .pp-nav__item.active::before {
    display: none;
  }

  .pp-main {
    padding-top: 30px;
  }

  .pp-chat {
    grid-template-columns: minmax(0, 1fr);
    height: clamp(520px, calc(100vh - 250px), 780px);
  }

  .pp-chat.is-thread-open .pp-chat__list {
    display: none;
  }

  .pp-chat:not(.is-thread-open) .pp-chat__main {
    display: none;
  }

  .pp-chat__list {
    border-right: 0;
  }

  .pp .pp-thread__back {
    display: inline-grid;
  }
}

@media (max-width: 820px) {
  .pp-card:not(.pp-card--flush):not(.pp-generator) {
    padding: 22px 20px;
  }

  .pp-generator__grid {
    padding: 24px 20px;
  }

  .pp-results__head {
    padding: 22px 20px 16px;
  }

  .pp-export {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 20px 20px;
  }

  .pp-list__head {
    padding: 18px 18px 14px;
  }

  .pp-list__tools,
  .pp-list__tools .pp-search {
    width: 100%;
  }

  .pp-quotacard__body {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Tableau des élèves : une carte par ligne */
  .pp-table--students thead {
    display: none;
  }

  .pp-table--students,
  .pp-table--students tbody {
    display: block;
  }

  .pp-table--students tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--pp-line);
  }

  .pp-table--students tbody tr:last-child {
    border-bottom: 0;
  }

  .pp-table--students td,
  .pp-table--students td:first-child,
  .pp-table--students td:last-child {
    display: block;
    padding: 0;
    border: 0;
  }

  /* Ligne 1 : élève + statut ; ligne 2 : identifiant, (prof), date ; ligne 3 : actions */
  .pp-table--students .pp-td-person {
    order: 1;
    flex: 1 1 calc(100% - 96px);
    min-width: 0;
  }

  .pp-table--students .pp-td-status {
    order: 2;
    flex: 0 0 auto;
  }

  .pp-table--students .pp-td-code {
    order: 3;
    flex: 0 0 auto;
    min-width: 0;
  }

  .pp-table--students .pp-td-prof {
    order: 4;
    flex: 0 0 auto;
  }

  .pp-table--students .pp-td-date {
    order: 5;
    flex: 0 0 auto;
    margin-left: auto;
    text-align: right;
  }

  .pp-table--students .pp-td-actions,
  .pp-table--students td.pp-col-actions {
    order: 6;
    flex: 1 1 100%;
    width: 100%;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px dashed var(--pp-line);
  }

  .pp-table--students .pp-actions {
    justify-content: flex-end;
  }

  .pp-table--students .pp-iconbtn--slot {
    display: none;
  }
}

@media (max-width: 640px) {
  .pp-seg {
    width: 100%;
  }

  .pp .pp-seg__btn {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .pp-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .pp-kpi {
    padding: 16px;
  }

  .pp-kpi__value {
    font-size: 1.9rem;
  }

  .pp-kpi__sub {
    display: none;
  }

  .pp-head {
    margin-bottom: 22px;
  }

  .pp-chat {
    border-radius: 18px;
  }

  .pp-thread__body {
    padding: 16px 14px;
  }

  .pp-composer,
  .pp-composer__hint {
    margin-left: 12px;
    margin-right: 12px;
  }

  .pp-generator__row {
    gap: 10px;
  }

  .pp-modal__panel {
    padding: 24px 20px;
  }

  .pp-toasts {
    right: 12px;
    left: 12px;
    bottom: 12px;
    align-items: stretch;
  }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .pp *,
  .pp *::before,
  .pp *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Impression des identifiants (panel prof uniquement) ---------- */
@media print {
  .prof-body {
    background: #fff;
    color: #000;
  }

  .prof-body::before,
  .prof-body > header,
  .prof-body > .nav-overlay,
  .prof-body > .nav-drawer-portal,
  .prof-body .pp-side,
  .prof-body .pp-head,
  .prof-body .pp-kpis,
  .prof-body .pp-generator__grid,
  .prof-body .pp-list,
  .prof-body .pp-toasts,
  .prof-body .pp-tip,
  .prof-body .pp-results__actions,
  .prof-body .pp-export,
  .prof-body #prof-batch-close,
  .prof-body .pp-results__icon,
  .prof-body .pp-panel:not(#panel-students) {
    display: none !important;
  }

  .prof-body .pp-shell {
    display: block;
  }

  .prof-body .pp-main {
    padding: 0;
  }

  .prof-body .pp-card,
  .prof-body .pp-results {
    border: 0;
    background: #fff;
    box-shadow: none;
  }

  .prof-body .pp-results__head,
  .prof-body .pp-table--cred th:first-child,
  .prof-body .pp-table--cred td:first-child {
    padding-left: 0;
  }

  .prof-body .pp-results__title strong,
  .prof-body .pp-results__note,
  .prof-body .pp-table th,
  .prof-body .pp-table td,
  .prof-body .pp-code {
    color: #000;
  }

  .prof-body .pp-code {
    background: #fff;
    border-color: #999;
  }

  .prof-body .pp-table td,
  .prof-body .pp-table th {
    border-bottom: 1px solid #bbb;
    background: #fff;
  }

  .prof-body .pp-table--cred.has-class .pp-cred-class {
    color: #000;
  }
}

/* ==========================================================================
   Classes de professeur : barre de classes, sélection, menu « Déplacer vers »,
   cartes de classe, liste déroulante. (js/prof-classes.js, js/prof.js, PPUI.menu)
   ========================================================================== */

/* ---------- Liste déroulante native, dans la charte ---------- */
.pp-field .pp-label {
  margin-bottom: 8px;
}

.pp-selectwrap {
  position: relative;
}

.pp-selectwrap > .pp-i {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  color: var(--pp-text-3);
  pointer-events: none;
}

.pp .pp-select {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 40px 0 15px;
  border: 1px solid var(--pp-line-2);
  border-radius: 12px;
  background: var(--pp-bg-soft);
  color: var(--pp-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pp .pp-select:hover {
  border-color: var(--pp-line-3);
}

.pp .pp-select:focus {
  outline: none;
  border-color: var(--pp-accent-line);
  box-shadow: 0 0 0 4px rgba(239, 74, 52, 0.13);
}

.pp .pp-select option {
  background: var(--pp-panel);
  color: var(--pp-text);
}

.pp .pp-select--sm {
  height: 38px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.pp-selectwrap--sm {
  margin-top: 10px;
}

/* ---------- Barre de classes (filtre de la liste des élèves) ---------- */
.pp-classbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--pp-line);
  background: rgba(255, 255, 255, 0.012);
}

.pp .pp-chip {
  --c: var(--pp-accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  height: 34px;
  padding: 0 8px 0 13px;
  border: 1px solid var(--pp-line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--pp-text-2);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s var(--pp-ease);
}

.pp .pp-chip:hover {
  color: var(--pp-text);
  border-color: var(--pp-line-3);
  background: rgba(255, 255, 255, 0.075);
}

.pp .pp-chip.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--c) 70%, transparent);
  background: color-mix(in srgb, var(--c) 18%, var(--pp-panel-3));
}

.pp .pp-chip--none {
  --c: #8a877f;
}

.pp-chip__dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 26%, transparent);
}

.pp-chip__name {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-chip__n {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pp .pp-chip.active .pp-chip__n {
  background: var(--c);
  color: #fff;
}

.pp .pp-chip--add {
  padding: 0 14px 0 11px;
  border-style: dashed;
  border-color: var(--pp-line-3);
  background: transparent;
  color: var(--pp-text-3);
}

.pp .pp-chip--add .pp-i {
  width: 15px;
  height: 15px;
}

.pp .pp-chip--add:hover {
  color: var(--pp-accent-text);
  border-color: var(--pp-accent-line);
  background: var(--pp-accent-soft);
}

.pp-classhint {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--pp-line);
  background: linear-gradient(90deg, rgba(239, 74, 52, 0.08), transparent 72%);
}

.pp-classhint p {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--pp-text-2);
}

.pp-classhint strong {
  color: var(--pp-text);
}

.pp-classhint__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--pp-accent-soft);
  color: var(--pp-accent-hi);
}

/* ---------- Sélection de plusieurs élèves ---------- */
.pp-bulk {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px 26px;
  border-bottom: 1px solid var(--pp-accent-line);
  background: linear-gradient(90deg, rgba(239, 74, 52, 0.14), rgba(239, 74, 52, 0.04));
  animation: ppPop 0.18s var(--pp-ease) both;
}

.pp-bulk__count {
  margin-right: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pp-text-2);
}

.pp-bulk__count strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.pp-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.pp-check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pp-check__box {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--pp-line-3);
  border-radius: 6px;
  background: var(--pp-bg-soft);
  transition: background 0.14s ease, border-color 0.14s ease;
}

.pp-check__box::after {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.14s var(--pp-ease);
}

.pp-check:hover .pp-check__box {
  border-color: var(--pp-accent-line);
}

.pp-check input:checked + .pp-check__box,
.pp-check input:indeterminate + .pp-check__box {
  border-color: var(--pp-accent);
  background: var(--pp-accent);
}

.pp-check input:checked + .pp-check__box::after {
  transform: rotate(-45deg) scale(1);
}

.pp-check input:indeterminate + .pp-check__box::after {
  width: 10px;
  height: 0;
  margin-top: 0;
  border-left: 0;
  transform: none;
}

.pp-check input:focus-visible + .pp-check__box {
  outline: 2px solid var(--pp-accent-hi);
  outline-offset: 2px;
}

.pp-table th.pp-col-check,
.pp-table td.pp-td-check {
  width: 1%;
  padding-right: 0;
}

.pp-table th.pp-col-check + th,
.pp-table td.pp-td-check + td {
  padding-left: 14px;
}

.pp-table tbody tr.is-selected {
  background: rgba(239, 74, 52, 0.07);
}

.pp-table tbody tr.is-selected:hover {
  background: rgba(239, 74, 52, 0.1);
}

/* ---------- Classe d'un élève (pastille cliquable) ---------- */
.pp .pp-classtag {
  --c: #8a877f;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 210px;
  height: 30px;
  padding: 0 9px 0 10px;
  border: 1px solid var(--pp-line-2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--pp-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pp .pp-classtag--static {
  padding-right: 11px;
}

.pp button.pp-classtag {
  cursor: pointer;
}

.pp button.pp-classtag:hover,
.pp button.pp-classtag[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
  background: color-mix(in srgb, var(--c) 14%, transparent);
}

.pp-classtag__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.pp-classtag__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp .pp-classtag .pp-i {
  width: 13px;
  height: 13px;
  opacity: 0.55;
}

.pp .pp-classtag.is-none {
  border-style: dashed;
  color: var(--pp-text-3);
  font-weight: 600;
}

/* ---------- Menu déroulant (PPUI.menu) ---------- */
.pp-menu {
  position: fixed;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  max-width: min(340px, calc(100vw - 16px));
  max-height: min(420px, 70vh);
  padding: 6px;
  border: 1px solid var(--pp-line-3);
  border-radius: 14px;
  background: #14141b;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4);
  color: var(--pp-text);
  font-family: var(--pp-font);
  animation: ppMenuIn 0.14s var(--pp-ease) both;
}

@keyframes ppMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pp-menu__title {
  margin: 0;
  padding: 8px 10px 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pp-text-3);
}

.pp .pp-menu__search {
  flex: none;
  height: 36px;
  margin: 4px 4px 6px;
  padding: 0 12px;
  border: 1px solid var(--pp-line-2);
  border-radius: 9px;
  background: var(--pp-bg-soft);
  color: var(--pp-text);
  font: inherit;
  font-size: 0.88rem;
}

.pp .pp-menu__search:focus {
  outline: none;
  border-color: var(--pp-accent-line);
  box-shadow: 0 0 0 3px rgba(239, 74, 52, 0.13);
}

.pp-menu__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  overflow-y: auto;
}

.pp .pp-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--pp-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.pp .pp-menu__item:hover,
.pp .pp-menu__item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.pp .pp-menu__item.is-current {
  background: rgba(239, 74, 52, 0.12);
}

.pp .pp-menu__item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pp-menu__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c, #8a877f);
}

.pp-menu__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-menu__hint {
  flex: none;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--pp-text-3);
  font-variant-numeric: tabular-nums;
}

.pp-menu__tick {
  display: grid;
  flex: none;
  color: var(--pp-accent-hi);
}

.pp-menu__tick .pp-i {
  width: 16px;
  height: 16px;
}

.pp-menu__sep {
  height: 1px;
  margin: 5px 6px;
  background: var(--pp-line);
}

.pp-menu__empty {
  margin: 0;
  padding: 14px 10px;
  font-size: 0.84rem;
  color: var(--pp-text-3);
  text-align: center;
}

/* ---------- Panneau « Classes » : cartes ---------- */
.pp-classes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

.pp-classes > .pp-card {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.pp-classcard {
  --c: #5c6f99;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 18px 25px;
  overflow: hidden;
  border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 58%), var(--pp-panel);
  box-shadow: var(--pp-shadow);
  transition: transform 0.2s var(--pp-ease), border-color 0.2s ease;
}

.pp-classcard::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--c);
}

.pp-classcard:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
}

.pp-classcard__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pp-classcard__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--c) 24%, #0b0b10);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pp-classcard__name {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pp-classcard__tools {
  display: flex;
  flex: none;
  gap: 6px;
}

.pp-classcard__stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.pp-classcard__stat strong {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pp-classcard__stat span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pp-text-3);
}

.pp-classcard__bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.pp-classcard__bar span {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--pp-ok);
  transition: width 0.5s var(--pp-ease);
}

.pp-classcard__sub {
  margin: -6px 0 0;
  font-size: 0.82rem;
  color: var(--pp-text-3);
}

.pp-classcard__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.pp-classcard__foot .pp-btn {
  flex: 1 1 auto;
}

.pp-classcard--none {
  --c: #8a877f;
  border-style: dashed;
  border-color: var(--pp-line-2);
}

.pp .pp-classcard--new {
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 22px;
  border: 1.5px dashed var(--pp-line-3);
  background: transparent;
  box-shadow: none;
  color: var(--pp-text-2);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.pp .pp-classcard--new::before {
  display: none;
}

.pp .pp-classcard--new:hover {
  border-color: var(--pp-accent-line);
  background: var(--pp-accent-soft);
  color: #fff;
}

.pp-classcard__plus {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--pp-accent-soft);
  color: var(--pp-accent-hi);
}

.pp-classcard__plus .pp-i {
  width: 22px;
  height: 22px;
}

.pp-classcard--new strong {
  font-size: 1rem;
  font-weight: 800;
}

.pp-classcard--new small {
  max-width: 28ch;
  font-size: 0.82rem;
  color: var(--pp-text-3);
}

/* Colonne « Classe » des identifiants fraîchement générés : visible seulement quand une classe est choisie */
.pp-table--cred .pp-cred-class {
  display: none;
}

.pp-table--cred.has-class .pp-cred-class {
  display: table-cell;
}

@media (max-width: 820px) {
  .pp-classbar {
    flex-wrap: nowrap;
    padding: 12px 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pp-classbar::-webkit-scrollbar {
    display: none;
  }

  .pp .pp-chip {
    flex: none;
  }

  .pp-classhint,
  .pp-bulk {
    padding: 12px 18px;
  }

  .pp-classhint {
    flex-wrap: wrap;
  }

  .pp-classes {
    grid-template-columns: 1fr;
  }

  .pp-bulk .pp-btn--ghost {
    flex: 1 1 auto;
  }

  /* Tableau des élèves en cartes : case à cocher en tête, classe à côté du statut */
  .pp-table--students td.pp-td-check {
    order: 0;
    flex: 0 0 auto;
    width: auto;
  }

  .pp-table--students .pp-td-person {
    flex-basis: calc(100% - 150px);
  }

  .pp-table--students .pp-td-class {
    order: 3;
    flex: 0 0 auto;
    min-width: 0;
  }

  .pp-table--students .pp-td-code {
    order: 4;
  }

  .pp-table--students .pp-td-prof {
    order: 5;
  }

  .pp-table--students .pp-td-date {
    order: 6;
  }

  .pp-table--students .pp-td-actions,
  .pp-table--students td.pp-col-actions {
    order: 7;
  }

  .pp-table--students td.pp-td-check + td {
    padding-left: 0;
  }
}
