/* /public_html/assets/css/help/teacher-help.css */

.teacher-help-root {
  min-height: 100%;
  background: transparent;
  overflow-anchor: none;
}

.teacher-help-root *,
.teacher-help-content,
.teacher-help-content * {
  overflow-anchor: none;
}

.teacher-help-content {
  width: min(1120px, calc(100vw - 24px));
  margin: 0 auto;
  padding: clamp(84px, 11vh, 132px) 0 104px;
}

.teacher-help-search {
  margin: 18px 0 16px;
  display: grid;
  gap: 12px;
}

.teacher-help-search__box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.28);
  padding: 0 16px;
  color: rgba(226, 232, 240, 0.8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.teacher-help-search__box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-weight: 700;
}

.teacher-help-search__box input::placeholder {
  color: rgba(148, 163, 184, 0.78);
  font-weight: 600;
}

.teacher-help-category-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}

.teacher-help-category-strip::-webkit-scrollbar {
  display: none;
}

.teacher-help-chip {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.86);
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.2);
}

.teacher-help-chip.is-active {
  border-color: rgba(56, 189, 248, 0.52);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(168, 85, 247, 0.2));
  color: #f8fafc;
}

.teacher-help-intro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.teacher-help-intro > div,
.teacher-help-card__button,
.teacher-help-detail-hero,
.teacher-help-step,
.teacher-help-sidebox > section,
.teacher-help-empty {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.54));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.3);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.teacher-help-intro > div {
  border-radius: 22px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.teacher-help-intro i {
  color: #38bdf8;
  font-size: 1.2rem;
  margin-top: 1px;
}

.teacher-help-intro p {
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.45;
  font-size: 0.9rem;
}

.teacher-help-results__header {
  margin: 8px 0 12px;
}

.teacher-help-results__header h2,
.teacher-help-results__header p {
  margin: 0;
}

.teacher-help-results__header h2 {
  color: #f8fafc;
  font-size: 1.1rem;
}

.teacher-help-results__header p {
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.9rem;
}

.teacher-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.teacher-help-card {
  min-width: 0;
}

.teacher-help-card__button {
  width: 100%;
  min-height: 100%;
  border-radius: 24px;
  color: inherit;
  text-align: left;
  padding: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.teacher-help-card__button:active {
  transform: scale(0.985);
}

.teacher-help-card__button:hover,
.teacher-help-card__button:focus-visible {
  border-color: rgba(56, 189, 248, 0.46);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.18), rgba(15, 23, 42, 0.62));
}

.teacher-help-card__icon,
.teacher-help-detail-hero__icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(168, 85, 247, 0.24));
  color: #e0f2fe;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.teacher-help-card__main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.teacher-help-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(186, 230, 253, 0.88);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.teacher-help-card__meta span:not(:first-child)::before {
  content: '·';
  margin-right: 6px;
  color: rgba(148, 163, 184, 0.8);
}

.teacher-help-card__main strong {
  color: #f8fafc;
  font-size: 1rem;
  line-height: 1.18;
}

.teacher-help-card__main > span:not(.teacher-help-card__meta):not(.teacher-help-card__tags) {
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.88rem;
  line-height: 1.4;
}

.teacher-help-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.teacher-help-card__tags em {
  font-style: normal;
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.72rem;
  font-weight: 700;
}

.teacher-help-card__arrow {
  color: rgba(226, 232, 240, 0.7);
}

.teacher-help-detail-hero {
  border-radius: 28px;
  padding: 16px;
  margin-bottom: 16px;
  display: grid;
  gap: 14px;
}

.teacher-help-detail-hero__back,
.teacher-help-open-panel {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  padding: 10px 13px;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
}

.teacher-help-detail-hero__title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.teacher-help-detail-hero__title p,
.teacher-help-detail-hero__title h1,
.teacher-help-detail-hero__title span {
  margin: 0;
}

.teacher-help-detail-hero__title p {
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.teacher-help-detail-hero__title h1 {
  margin-top: 4px;
  color: #f8fafc;
  font-size: clamp(1.35rem, 4.5vw, 2.2rem);
  line-height: 1.04;
}

.teacher-help-detail-hero__title span:not(.teacher-help-detail-hero__icon) {
  display: block;
  margin-top: 8px;
  color: rgba(226, 232, 240, 0.76);
  line-height: 1.45;
}

.teacher-help-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.teacher-help-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: teacher-help-step;
}

.teacher-help-step {
  border-radius: 26px;
  padding: 15px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
}

.teacher-help-step__number {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  font-weight: 900;
}

.teacher-help-step__body h2,
.teacher-help-step__body p {
  margin: 0;
}

.teacher-help-step__body h2 {
  color: #f8fafc;
  font-size: 1.02rem;
}

.teacher-help-step__body p {
  margin-top: 6px;
  color: rgba(226, 232, 240, 0.76);
  line-height: 1.5;
}

.teacher-help-step__capture {
  margin: 12px 0 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.32);
}

.teacher-help-step__capture--image img {
  display: block;
  width: 100%;
  height: auto;
}

.teacher-help-step__capture figcaption {
  padding: 9px 11px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.82rem;
}

.teacher-help-step__capture--placeholder > div {
  min-height: 130px;
  display: grid;
  place-items: center;
  gap: 5px;
  text-align: center;
  padding: 18px;
  color: rgba(226, 232, 240, 0.7);
}

.teacher-help-step__capture--placeholder i {
  font-size: 1.55rem;
  color: rgba(125, 211, 252, 0.9);
}

.teacher-help-step__capture--placeholder strong {
  color: #f8fafc;
}

.teacher-help-step__capture--placeholder span {
  max-width: 34rem;
  font-size: 0.82rem;
}

.teacher-help-sidebox {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 12px;
}

.teacher-help-sidebox > section {
  border-radius: 24px;
  padding: 14px;
}

.teacher-help-sidebox h3 {
  margin: 0 0 9px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.teacher-help-sidebox ul {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(226, 232, 240, 0.76);
  line-height: 1.45;
  display: grid;
  gap: 7px;
}

.teacher-help-notice--warning h3 i {
  color: #fbbf24;
}

.teacher-help-notice--tip h3 i,
.teacher-help-keywords h3 i {
  color: #38bdf8;
}

.teacher-help-keywords div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.teacher-help-keywords span {
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.72);
  font-size: 0.76rem;
  font-weight: 800;
}

.teacher-help-empty {
  border-radius: 26px;
  padding: 30px 20px;
  text-align: center;
  max-width: 620px;
  margin: 80px auto 0;
}

.teacher-help-empty i {
  color: #38bdf8;
  font-size: 2rem;
}

.teacher-help-empty h2 {
  color: #f8fafc;
  margin: 10px 0 6px;
}

.teacher-help-empty p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .teacher-help-content {
    width: min(100%, calc(100vw - 18px));
    padding-top: clamp(78px, 12vh, 112px);
  }

  .teacher-help-intro,
  .teacher-help-grid,
  .teacher-help-detail-layout {
    grid-template-columns: 1fr;
  }

  .teacher-help-sidebox {
    position: static;
  }
}

@media (max-width: 520px) {
  .teacher-help-content {
    width: min(100%, calc(100vw - 12px));
    padding-bottom: 92px;
  }

  .teacher-help-search__box {
    min-height: 48px;
    border-radius: 19px;
    padding: 0 13px;
  }

  .teacher-help-card__button {
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 22px;
    padding: 14px;
  }

  .teacher-help-card__arrow {
    display: none;
  }

  .teacher-help-card__icon,
  .teacher-help-detail-hero__icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .teacher-help-step {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .teacher-help-step__number {
    width: fit-content;
    min-width: 34px;
    padding: 0 10px;
  }

  .teacher-help-detail-hero {
    border-radius: 24px;
    padding: 14px;
  }

  .teacher-help-detail-hero__title {
    gap: 11px;
  }
}

/* V49.9.10 — aide prof dans le shell EDQ + tutoriel réductible */
body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-inline: 0 !important;
  overflow-x: visible !important;
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list {
  padding-top: 0 !important;
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > :not([data-courses-panel-hero]),
body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--detail > * {
  width: min(1120px, calc(100vw - 24px));
  margin-left: auto;
  margin-right: auto;
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--detail {
  padding-top: calc(var(--edq-navbar-height-current, var(--app-header-safe-height, 72px)) + clamp(.7rem, 2.4vw, 1.15rem)) !important;
}

.teacher-help-detail-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.teacher-help-minimize {
  appearance: none;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(168, 85, 247, 0.16));
  color: rgba(226, 232, 240, 0.95);
  border-radius: 999px;
  padding: 10px 13px;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
}

.teacher-help-minimized-chip {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(78px, calc(env(safe-area-inset-bottom, 0px) + 72px));
  z-index: 2147481200;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(78vw, 320px);
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 20px 52px rgba(2, 6, 23, 0.42);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.teacher-help-minimized-chip__open,
.teacher-help-minimized-chip__close {
  appearance: none;
  border: 0;
  color: #f8fafc;
  font: inherit;
  cursor: pointer;
}

.teacher-help-minimized-chip__open {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(168, 85, 247, 0.22));
  font-weight: 900;
}

.teacher-help-minimized-chip__open i {
  font-size: 1rem;
  flex: 0 0 auto;
}

.teacher-help-minimized-chip__open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-help-minimized-chip__close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(148, 163, 184, 0.13);
}

@media (max-width: 860px) {
  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > :not([data-courses-panel-hero]),
  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--detail > * {
    width: min(100%, calc(100vw - 18px));
  }
}

@media (max-width: 520px) {
  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > :not([data-courses-panel-hero]),
  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--detail > * {
    width: min(100%, calc(100vw - 12px));
  }

  .teacher-help-minimized-chip {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(72px, calc(env(safe-area-inset-bottom, 0px) + 66px));
  }
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content > .courses-panel-hero {
  width: var(--courses-hero-bleed-width-js, 100vw) !important;
  max-width: var(--courses-hero-bleed-width-js, 100vw) !important;
  min-width: var(--courses-hero-bleed-width-js, 100vw) !important;
  margin-left: calc(var(--courses-hero-bleed-left-js, 0px) * -1) !important;
  margin-right: 0 !important;
}


/* V49.9.11 — recalage d’ouverture du panel aide prof */
body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list {
  scroll-margin-top: 0 !important;
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > [data-courses-panel-hero] {
  scroll-margin-top: 0 !important;
}

/* V49.9.12 — recalage réel de l'ouverture mobile du panel aide prof */
body.is-dashboard-shell-visible:has(#dashboard-view > .teacher-help-content) #dashboard-view,
body.is-dashboard-shell-visible:has(#dashboard-view > .teacher-help-content) .dashboard-app-main,
body.is-dashboard-shell-visible:has(#dashboard-view > .teacher-help-content) #dashboard-app-shell {
  scroll-padding-top: 0 !important;
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content {
  scroll-margin-top: 0 !important;
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > [data-teacher-help-hero].courses-panel-hero.ui-panel-hero {
  margin-top: 0 !important;
}

@media (max-width: 1023px) {
  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > [data-teacher-help-hero].courses-panel-hero.ui-panel-hero {
    min-height: clamp(218px, 34svh, 320px) !important;
  }

  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > [data-teacher-help-hero].courses-panel-hero.ui-panel-hero .courses-panel-hero__inner {
    padding-top: calc(var(--edq-navbar-height-current, var(--app-header-safe-height, 72px)) + clamp(.85rem, 3vw, 1.25rem)) !important;
    padding-bottom: clamp(1rem, 4vw, 1.45rem) !important;
  }
}

/* V49.9.13 — hero aide prof vraiment reconnu comme hero EDQ + anti-scroll anchoring mobile */
body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > [data-teacher-help-hero][data-courses-panel-hero] {
  display: block !important;
  margin-top: 0 !important;
  scroll-margin-top: 0 !important;
}

body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > [data-teacher-help-hero][data-courses-panel-hero] .courses-panel-hero__inner {
  padding-top: calc(var(--edq-navbar-height-current, var(--app-header-safe-height, 72px)) + clamp(.95rem, 3vw, 1.35rem)) !important;
}

@media (max-width: 1023px) {
  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--list > [data-teacher-help-hero][data-courses-panel-hero] {
    min-height: clamp(218px, 34svh, 320px) !important;
  }
}

/* V49.9.14 — bouton flottant et mémoire de lecture des tutoriels profs */
.teacher-help-floating-minimize {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(86px, calc(env(safe-area-inset-bottom, 0px) + 80px));
  z-index: 2147481100;
  appearance: none;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(168, 85, 247, 0.2));
  color: rgba(248, 250, 252, 0.96);
  border-radius: 999px;
  padding: 10px 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.42);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.teacher-help-floating-minimize:active {
  transform: scale(0.97);
}

.teacher-help-floating-minimize i {
  font-size: 1rem;
}

@media (max-width: 520px) {
  .teacher-help-floating-minimize {
    right: max(8px, env(safe-area-inset-right, 0px));
    bottom: max(76px, calc(env(safe-area-inset-bottom, 0px) + 70px));
    padding: 9px 11px;
  }
}

/* V49.9.15 — chip réduit non intrusif + rappel visuel doux */
@keyframes teacherHelpChipPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 20px 52px rgba(2, 6, 23, 0.42), 0 0 0 0 rgba(56, 189, 248, 0.18);
  }
  50% {
    transform: translateY(-2px) scale(1.012);
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.48), 0 0 0 8px rgba(56, 189, 248, 0.04);
  }
}

@keyframes teacherHelpChipIconNudge {
  0%, 100% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-5deg) scale(1.08); }
  70% { transform: rotate(5deg) scale(1.08); }
}

.teacher-help-minimized-chip {
  animation: teacherHelpChipPulse 2.8s ease-in-out infinite;
}

.teacher-help-minimized-chip__open i {
  animation: teacherHelpChipIconNudge 3.4s ease-in-out infinite;
  transform-origin: center;
}

.teacher-help-minimized-chip:has(:focus-visible),
.teacher-help-minimized-chip:hover {
  animation-play-state: paused;
}

.teacher-help-minimized-chip:has(:focus-visible) .teacher-help-minimized-chip__open i,
.teacher-help-minimized-chip:hover .teacher-help-minimized-chip__open i {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .teacher-help-minimized-chip,
  .teacher-help-minimized-chip__open i {
    animation: none !important;
  }
}

/* V49.9.16 — réduction compacte + icône de tutoriel déplaçable */
body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--detail > .teacher-help-floating-minimize,
.teacher-help-floating-minimize {
  width: auto !important;
  min-width: 0 !important;
  max-width: calc(100vw - 24px) !important;
  inline-size: max-content !important;
  margin: 0 !important;
  white-space: nowrap;
}

.teacher-help-minimized-chip {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  will-change: left, top, transform;
}

.teacher-help-minimized-chip.is-positioned {
  right: auto !important;
  bottom: auto !important;
}

.teacher-help-minimized-chip.is-dragging {
  cursor: grabbing;
  animation: none !important;
  transition: none !important;
}

.teacher-help-minimized-chip.is-dragging .teacher-help-minimized-chip__open i {
  animation: none !important;
}

.teacher-help-minimized-chip__open {
  touch-action: none;
}

.teacher-help-minimized-chip__close {
  touch-action: manipulation;
}

@media (max-width: 520px) {
  body.is-dashboard-shell-visible #dashboard-view > .teacher-help-content--detail > .teacher-help-floating-minimize,
  .teacher-help-floating-minimize {
    max-width: calc(100vw - 16px) !important;
  }
}

/* V49.9.18 — animation permanente du chip réduit, même déplacé ou focalisé */
.teacher-help-minimized-chip,
.teacher-help-minimized-chip.is-dragging,
.teacher-help-minimized-chip:has(:focus-visible),
.teacher-help-minimized-chip:hover {
  animation: teacherHelpChipPulse 2.8s ease-in-out infinite !important;
  animation-play-state: running !important;
}

.teacher-help-minimized-chip__open i,
.teacher-help-minimized-chip.is-dragging .teacher-help-minimized-chip__open i,
.teacher-help-minimized-chip:has(:focus-visible) .teacher-help-minimized-chip__open i,
.teacher-help-minimized-chip:hover .teacher-help-minimized-chip__open i {
  animation: teacherHelpChipIconNudge 3.4s ease-in-out infinite !important;
  animation-play-state: running !important;
}

@media (prefers-reduced-motion: reduce) {
  .teacher-help-minimized-chip,
  .teacher-help-minimized-chip.is-dragging,
  .teacher-help-minimized-chip:has(:focus-visible),
  .teacher-help-minimized-chip:hover,
  .teacher-help-minimized-chip__open i,
  .teacher-help-minimized-chip.is-dragging .teacher-help-minimized-chip__open i,
  .teacher-help-minimized-chip:has(:focus-visible) .teacher-help-minimized-chip__open i,
  .teacher-help-minimized-chip:hover .teacher-help-minimized-chip__open i {
    animation: none !important;
  }
}

/* V49.9.22 — administration des captures depuis les fiches profs */
.teacher-help-step {
  grid-template-columns: 1fr;
}

.teacher-help-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.teacher-help-step__capture-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.teacher-help-step__capture-action {
  appearance: none;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.17), rgba(168, 85, 247, 0.15));
  color: rgba(248, 250, 252, 0.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  font: inherit;
  font-size: .82rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(2, 6, 23, .22);
}

.teacher-help-step__capture-action--delete {
  border-color: rgba(248, 113, 113, 0.34);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(244, 63, 94, 0.13));
  color: rgba(254, 242, 242, 0.96);
}

.teacher-help-step__capture-action:disabled {
  opacity: .72;
  cursor: wait;
}

.teacher-help-step__capture-action.is-uploading i {
  animation: teacherHelpCaptureSpin .8s linear infinite;
}

@keyframes teacherHelpCaptureSpin {
  to { transform: rotate(360deg); }
}

.teacher-help-step__capture-open {
  appearance: none;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.teacher-help-step__capture-open img {
  transition: transform .18s ease, filter .18s ease;
}

.teacher-help-step__capture-open:active img,
.teacher-help-step__capture-open:focus-visible img {
  transform: scale(.992);
  filter: brightness(1.08);
}

.teacher-help-capture-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: rgba(2, 6, 23, .92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.teacher-help-capture-lightbox__figure {
  width: min(100%, 980px);
  max-height: 94svh;
  margin: 0;
  display: grid;
  gap: 10px;
  place-items: center;
}

.teacher-help-capture-lightbox__figure img {
  max-width: 100%;
  max-height: min(86svh, 980px);
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 26px 78px rgba(0, 0, 0, .45);
  background: rgba(15, 23, 42, .88);
}

.teacher-help-capture-lightbox__figure figcaption {
  max-width: min(100%, 760px);
  color: rgba(226, 232, 240, .86);
  text-align: center;
  font-weight: 800;
  line-height: 1.35;
}

.teacher-help-capture-lightbox__close {
  position: fixed;
  top: max(14px, calc(env(safe-area-inset-top, 0px) + 8px));
  right: max(14px, calc(env(safe-area-inset-right, 0px) + 8px));
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .24);
  background: rgba(15, 23, 42, .86);
  color: #f8fafc;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  box-shadow: 0 18px 44px rgba(2, 6, 23, .36);
}

body.teacher-help-capture-lightbox-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .teacher-help-step__capture-action span {
    display: none;
  }

  .teacher-help-step__capture-action {
    min-width: 40px;
    min-height: 36px;
    padding: 8px 10px;
  }

  .teacher-help-capture-lightbox__figure img {
    border-radius: 18px;
  }
}
