/* Module hector : CSS extrait d'argon-app.css (scripts/extract_module_css.py). Feuille du module : editer ici, avec les variables de static/css/app/tokens.css. */
/* ============================================ */
/* Hector choice button                         */
/* ============================================ */
.hector-choice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1) !important;
}
#reformulateAudioguideModal .hector-header { background: #f8f9fc; padding: 14px 18px 12px; border-bottom: 1px solid #eef0f5; }
#reformulateAudioguideModal .hector-input-wrap { position: relative; }
#reformulateAudioguideModal .hector-input-wrap input { border: 1.5px solid #e5e7ef; border-radius: 12px; padding: 10px 46px 10px 14px; font-size: 0.88rem; background: #fafbfc; transition: border-color 0.2s; box-shadow: none; }
#reformulateAudioguideModal .hector-input-wrap input:focus { border-color: var(--mv-primary); background: #fff; box-shadow: 0 0 0 3px rgba(0, 85, 255,0.08); outline: none; }
#reformulateAudioguideModal .hector-send-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px; background: var(--mv-primary); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
#reformulateAudioguideModal .hector-send-btn:hover { background: #3a5be0; }
#helpPromptModal .hector-header { background: #f8f9fc; padding: 14px 18px 12px; border-bottom: 1px solid #eef0f5; }
#helpPromptModal .hector-input-wrap { position: relative; }
#helpPromptModal .hector-input-wrap input { border: 1.5px solid #e5e7ef; border-radius: 12px; padding: 10px 46px 10px 14px; font-size: 0.88rem; background: #fafbfc; transition: border-color 0.2s; box-shadow: none; }
#helpPromptModal .hector-input-wrap input:focus { border-color: var(--mv-primary); background: #fff; box-shadow: 0 0 0 3px rgba(0, 85, 255,0.08); outline: none; }
#helpPromptModal .hector-send-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px; background: var(--mv-primary); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
#helpPromptModal .hector-send-btn:hover { background: #3a5be0; }
#helpPromptModal .hector-result { max-height: 260px; overflow-y: auto; background: #f8f9fc; border: 1.5px solid #eef0f5; border-radius: 12px; padding: 13px 15px; line-height: 1.65; font-size: 0.9rem; color: #1f2937; }
#helpPromptModal .hector-result.streaming::after { content: '|'; animation: hector-blink 0.7s step-end infinite; color: #9ca3af; }
@keyframes hector-blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ============================================================
   item_editor.html - Hector choice button hover
   ============================================================ */
.hector-choice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1) !important;
}
#reformulateAudioguideModal .hector-header { background: #f8f9fc; padding: 14px 18px 12px; border-bottom: 1px solid #eef0f5; }
#reformulateAudioguideModal .hector-input-wrap { position: relative; }
#reformulateAudioguideModal .hector-input-wrap input { border: 1.5px solid #e5e7ef; border-radius: 12px; padding: 10px 46px 10px 14px; font-size: 0.88rem; background: #fafbfc; transition: border-color 0.2s; box-shadow: none; }
#reformulateAudioguideModal .hector-input-wrap input:focus { border-color: var(--mv-primary); background: #fff; box-shadow: 0 0 0 3px rgba(0, 85, 255,0.08); outline: none; }
#reformulateAudioguideModal .hector-send-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 8px; background: var(--mv-primary); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
#reformulateAudioguideModal .hector-send-btn:hover { background: #3a5be0; }

/* ===================================================
   Translation Modals - Hector Style
   Utilisées dans visite_editor.html et item_editor.html
   =================================================== */
.hector-modal .modal-content { border-radius: 18px; overflow: hidden; border: none; box-shadow: 0 8px 40px rgba(0,0,0,0.12); }
.hector-modal .hector-header { background: #f8f9fc; padding: 14px 18px 12px; border-bottom: 1px solid #eef0f5; display: flex; align-items: center; justify-content: space-between; }
.hector-modal .hector-header-left { display: flex; align-items: center; gap: 10px; }
.hector-modal .hector-header .hector-title { font-size: 0.95rem; font-weight: 600; color: #111827; line-height: 1.2; margin: 0; }
.hector-modal .hector-header .hector-subtitle { font-size: 0.72rem; color: #9ca3af; line-height: 1.3; margin: 0; }
.hector-modal .modal-footer { border-top: 1px solid #eef0f5; background: #fafbfc; }
#v2-classEditorTab .nav-link.active .hector-icon-blue { display: none !important; }
#v2-classEditorTab .nav-link.active .hector-icon-white { display: inline-block !important; }

.hector-modal-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hector-modal-title-icon {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.55rem;
  border: 1px solid var(--mv-primary-200);
  background: linear-gradient(180deg, var(--mv-primary-50) 0%, var(--mv-primary-100) 100%);
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hector-modal-title-icon i {
  font-size: 0.78rem;
  line-height: 1;
}

.hector-modal-toolbar {
  border: 1px solid #d8e4f5;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 0.2rem 0.28rem 0.2rem 0.42rem;
}

.hector-modal-toolbar .btn-close {
  margin: 0;
  border-radius: 999px;
  opacity: 0.7;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.hector-modal-toolbar .btn-close:hover,
.hector-modal-toolbar .btn-close:focus {
  opacity: 1;
  background-color: var(--mv-primary-50);
}

.hector-ai-count-wrap {
  flex: 0 0 auto;
}

.hector-ai-count {
  width: 64px;
  min-width: 64px;
  border-radius: 999px;
  border-color: #d5e1f4;
  font-size: 0.76rem;
  line-height: 1.1;
  padding-top: 0.38rem;
  padding-bottom: 0.38rem;
}

.hector-ai-count:focus {
  border-color: var(--mv-primary-300);
  box-shadow: 0 0 0 0.16rem rgba(59, 130, 246, 0.2);
}

.hector-scope-group {
  border: 1px solid #d4deef;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
  flex-wrap: nowrap;
}

.hector-scope-group .btn {
  border: 0;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.38rem 0.72rem;
  color: var(--mv-gray-700);
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.hector-scope-group .btn:not(:last-child) {
  border-right: 1px solid var(--mv-gray-200);
}

.hector-scope-group .btn svg {
  flex: 0 0 auto;
}

.hector-scope-group .btn:hover,
.hector-scope-group .btn:focus {
  color: var(--mv-primary-hover);
  background: var(--mv-primary-50);
  opacity: 1;
  box-shadow: none;
  transform: none;
}

.hector-scope-group .btn-check:checked + .btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--mv-primary) 0%, var(--mv-primary-hover) 100%);
  border-color: transparent;
}

.hector-scope-group .btn-check:checked + .btn:hover,
.hector-scope-group .btn-check:checked + .btn:focus {
  color: #ffffff;
  background: linear-gradient(135deg, var(--mv-primary-hover) 0%, #1e40af 100%);
}

.hector-generate-btn {
  white-space: nowrap;
  border-radius: 999px;
  border-color: #c6d8fa;
  background: #ffffff;
  color: #1e40af;
  min-height: 2rem;
  padding: 0.38rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hector-generate-btn:hover,
.hector-generate-btn:focus {
  color: #1e3a8a;
  border-color: var(--mv-primary-300);
  background: var(--mv-primary-50);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.16);
}

.hector-generate-btn:disabled {
  opacity: 0.75;
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .hector-modal-toolbar {
    width: 100%;
    justify-content: flex-end;
    border-radius: 0.95rem;
    padding: 0.34rem 0.46rem;
  }

  .hector-scope-group .btn {
    padding: 0.36rem 0.62rem;
  }
}

@media (max-width: 575.98px) {
  .hector-modal-toolbar {
    justify-content: space-between;
  }

  .hector-modal-toolbar .hector-scope-group {
    order: 5;
    width: 100%;
  }
}

.hector-service-choice {
    display: grid;
    gap: 10px;
}

.hector-service-card {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 14px;
    text-align: left;
    color: #111827;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.hector-service-card:hover {
    border-color: var(--mv-primary);
    box-shadow: 0 4px 14px rgba(0, 85, 255, 0.12);
    transform: translateY(-1px);
}

.hector-service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    color: var(--mv-primary);
    background: #f0f3ff;
    border-radius: 10px;
}

.hector-service-title,
.hector-service-desc {
    display: block;
}

.hector-service-title {
    font-size: 0.88rem;
    font-weight: 600;
}

.hector-service-desc {
    margin-top: 2px;
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.35;
}

.hector-copy-buffer {
    position: fixed;
    left: -9999px;
    top: -9999px;
}

/* Hector TinyMCE assistant */
#helpPromptModal .hector-editor-dialog {
  max-width: 520px;
}

#helpPromptModal .hector-header {
  padding: 13px 16px 11px;
  border-bottom: 1px solid #f1f3f7;
  background: #fff;
}

#helpPromptModal .hector-editor-avatar {
  border-radius: 7px;
}

#helpPromptModal .hector-editor-title {
  color: #111827;
  font-size: 0.88rem;
}

#helpPromptModal .hector-editor-subtitle {
  color: #9ca3af;
  font-size: 0.7rem;
  line-height: 1.3;
}

#helpPromptModal .hector-editor-body {
  padding: 14px 16px 12px;
}

#helpPromptModal .hector-compose-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#helpPromptModal .hector-input-wrap {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

#helpPromptModal .hector-input-wrap input {
  min-height: 44px;
  padding: 10px 46px 10px 14px;
  border: 1.5px solid #e5e7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  font-size: 0.88rem;
  transition: border-color 0.2s;
}

#helpPromptModal .hector-input-wrap input:focus {
  border-color: var(--mv-primary);
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.08);
}

#helpPromptModal .hector-send-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--mv-primary);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s;
}

#helpPromptModal .hector-send-btn:hover {
  background: #3a5be0;
}

#helpPromptModal .hector-preset-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
}

#helpPromptModal .hector-source-row {
  flex: 0 0 auto;
  position: relative;
}

#helpPromptModal .hector-source-row summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #e5e7ef;
  border-radius: 999px;
  color: #1f2937;
  background: #f8f9fc;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

#helpPromptModal .hector-source-row summary:hover,
#helpPromptModal .hector-source-row[open] summary {
  border-color: #d7dce8;
  background: #eef1f6;
}

#helpPromptModal .hector-plus-icon {
  position: relative;
  width: 14px;
  height: 14px;
}

#helpPromptModal .hector-plus-icon::before,
#helpPromptModal .hector-plus-icon::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 14px;
  height: 1.7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

#helpPromptModal .hector-plus-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

#helpPromptModal .hector-source-row summary::-webkit-details-marker {
  display: none;
}

#helpPromptModal .hector-source-row summary::after {
  content: none;
}

#helpPromptModal .hector-source-row[open] summary::after {
  transform: none;
}

#helpPromptModal .hector-source-panel {
  position: absolute;
  z-index: 1065;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  width: min(470px, calc(100vw - 64px));
  max-height: min(520px, calc(100vh - 150px));
  align-items: stretch;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  box-sizing: border-box;
  overflow-y: auto;
}

#helpPromptModal .hector-source-title {
  color: var(--mv-gray-700);
  font-size: 0.78rem;
  font-weight: 600;
}

#helpPromptModal .hector-source-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--mv-gray-700);
  background: transparent;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: left;
}

#helpPromptModal .hector-source-option:hover {
  background: var(--mv-gray-50);
}

#helpPromptModal .hector-source-option.is-active {
  border-color: #dbe3ff;
  color: var(--mv-primary-hover);
  background: #f3f6ff;
}

#helpPromptModal .hector-source-check {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 1.5px solid var(--mv-gray-300);
  border-radius: 4px;
  background: #fff;
}

#helpPromptModal .hector-source-option.is-active .hector-source-check {
  border-color: var(--mv-primary);
  background: var(--mv-primary);
}

#helpPromptModal .hector-source-option.is-active .hector-source-check::after {
  position: absolute;
  top: 2px;
  left: 4px;
  width: 5px;
  height: 8px;
  border-right: 1.7px solid #fff;
  border-bottom: 1.7px solid #fff;
  content: "";
  transform: rotate(45deg);
}

#helpPromptModal .hector-source-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  color: var(--mv-gray-500);
}

#helpPromptModal .hector-source-option.is-active .hector-source-icon {
  color: var(--mv-primary);
}

#helpPromptModal .hector-source-option:disabled {
  cursor: default;
  opacity: 0.65;
}

#helpPromptModal .hector-source-icon svg {
  width: 17px;
  height: 17px;
}

#helpPromptModal .hector-document-picker {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

#helpPromptModal .hector-document-toggle {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #e5e7ef;
  border-radius: 8px;
  color: var(--mv-gray-700);
  background: #fff;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: left;
}

#helpPromptModal .hector-document-toggle:hover {
  border-color: #dbe3ff;
  color: var(--mv-primary-hover);
  background: var(--mv-gray-50);
}

#helpPromptModal .hector-document-summary {
  color: var(--mv-gray-500);
  font-size: 0.76rem;
}

#helpPromptModal .hector-document-controls {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#helpPromptModal .hector-document-types,
#helpPromptModal .hector-document-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#helpPromptModal .hector-document-type,
#helpPromptModal .hector-document-bulk button {
  padding: 4px 7px;
  border: 1px solid #e5e7ef;
  border-radius: 7px;
  color: var(--mv-gray-500);
  background: #fff;
  font-size: 0.72rem;
  line-height: 1.2;
}

#helpPromptModal .hector-document-type:hover,
#helpPromptModal .hector-document-bulk button:hover {
  border-color: #dbe3ff;
  color: var(--mv-primary-hover);
  background: var(--mv-gray-50);
}

#helpPromptModal .hector-document-type.is-active {
  border-color: var(--mv-primary);
  color: var(--mv-primary-hover);
  background: #eef3ff;
}

#helpPromptModal .hector-document-options {
  display: flex;
  max-height: 240px;
  overflow-y: auto;
  flex-direction: column;
  gap: 6px;
  padding-right: 3px;
}

#helpPromptModal .hector-document-group {
  padding: 4px 2px 1px;
  color: var(--mv-gray-400);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#helpPromptModal .hector-document-option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  min-height: 34px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid #e5e7ef;
  border-radius: 8px;
  color: var(--mv-gray-700);
  background: #fff;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
}

#helpPromptModal .hector-document-option:hover {
  background: var(--mv-gray-50);
}

#helpPromptModal .hector-document-option.is-active {
  border-color: #dbe3ff;
  color: var(--mv-primary-hover);
  background: #f3f6ff;
}

#helpPromptModal .hector-document-box {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--mv-gray-300);
  border-radius: 4px;
  background: #fff;
}

#helpPromptModal .hector-document-option.is-active .hector-document-box {
  border-color: var(--mv-primary);
  background: var(--mv-primary);
}

#helpPromptModal .hector-document-option.is-active .hector-document-box::after {
  position: absolute;
  top: 1.5px;
  left: 4px;
  width: 4px;
  height: 8px;
  border-right: 1.7px solid #fff;
  border-bottom: 1.7px solid #fff;
  content: "";
  transform: rotate(45deg);
}

#helpPromptModal .hector-document-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#helpPromptModal .hector-document-kind {
  padding: 2px 5px;
  border-radius: 999px;
  color: var(--mv-gray-500);
  background: var(--mv-gray-100);
  font-size: 0.66rem;
  line-height: 1.1;
}

#helpPromptModal .hector-loader {
  color: #9ca3af;
  font-size: 0.83rem;
}

#helpPromptModal .hector-loader .spinner-border {
  width: 14px;
  height: 14px;
  border-width: 2px;
  color: var(--mv-primary);
}

#helpPromptModal .hector-assistant-answer {
  padding: 10px 12px;
  border: 1px solid #e5e7ef;
  border-radius: 10px;
  background: #fff;
}

#helpPromptModal .hector-assistant-answer .hector-result-label {
  margin-bottom: 6px;
}

#helpPromptModal .hector-assistant-message {
  color: var(--mv-gray-600);
  font-size: 0.84rem;
  line-height: 1.55;
}

#helpPromptModal .hector-result {
  max-height: 280px;
  overflow-y: auto;
  padding: 13px 15px;
  border: 1.5px solid #eef0f5;
  border-radius: 12px;
  color: #1f2937;
  background: #f8f9fc;
  font-size: 0.9rem;
  line-height: 1.65;
}

#helpPromptModal .hector-result.streaming {
  white-space: pre-wrap;
}

#helpPromptModal .hector-result.streaming::after {
  color: #9ca3af;
  content: "|";
  animation: hector-editor-blink 0.7s step-end infinite;
}

@keyframes hector-editor-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

#helpPromptModal .hector-sources,
#helpPromptModal .hector-billing-result {
  color: var(--mv-gray-500);
  font-size: 0.76rem;
}

#helpPromptModal .hector-sources a {
  color: var(--mv-primary);
}

#helpPromptModal .hector-error {
  padding: 10px 14px;
  border: 1.5px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  background: #fef2f2;
  font-size: 0.83rem;
}

@keyframes hector-editor-fade-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#helpPromptModal .hector-retry-btn {
  border: 1.5px solid #e5e7ef;
  border-radius: 8px;
  color: #6b7280;
  background: transparent;
  font-size: 0.82rem;
}

#helpPromptModal .hector-insert-btn {
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
}

@media (max-width: 575.98px) {
  #helpPromptModal .hector-editor-dialog {
    max-width: calc(100% - 20px);
    margin-right: auto;
    margin-left: auto;
  }

  #helpPromptModal .hector-source-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    width: min(360px, calc(100vw - 44px));
    max-height: min(520px, calc(100vh - 120px));
  }
}

.hector-copy-buffer {
  position: fixed;
  top: -1000px;
  left: -1000px;
}


/* Hector Immersion: a shared guided editor and passage summaries. */
.him-modal .modal-content { color: var(--bs-body-color, var(--mv-text-heading)); }
.him-modal .modal-body { padding: 1.5rem; }
.him-steps { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.him-steps button { border: 1px solid #d2d6da; background: transparent; color: inherit; border-radius: .5rem; padding: .55rem .8rem; }
.him-steps button.is-current { background: var(--mv-primary); border-color: var(--mv-primary); color: #fff; }
.him-status { min-height: 1.5rem; }
.him-content { padding: 1rem; border: 1px solid #d2d6da; border-radius: .75rem; margin-bottom: 1rem; }
.him-identity { padding: .65rem; background: rgba(0, 85, 255,.08); border-radius: .5rem; }
.him-scene { border-top: 1px solid var(--mv-gray-200); margin-top: 1rem; padding-top: 1rem; }
.him-excerpt { white-space: pre-wrap; max-height: 10rem; overflow: auto; font-size: .85rem; }
.him-recommendation { background: rgba(0,0,0,.025); border-radius: .5rem; padding: .85rem; margin: .65rem 0; }
.him-recommendation p { font-size: .85rem; margin: .4rem 0; }
.him-check { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
.him-check input { flex-shrink: 0; }
.him-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .7rem; }
.him-controls label { font-size: .8rem; }
.him-wide { grid-column: 1 / -1; }
.him-scope { padding: 1rem; border: 1px solid #d2d6da; border-radius: .5rem; }
.him-scope legend { font-size: .95rem; }
.him-player { width: 100%; margin: .8rem 0; }
.him-passage-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.him-inline-cards { font-size: .75rem; margin-bottom: .65rem; }
.him-inline-scene { display: grid; gap: .3rem; border-top: 1px solid var(--mv-gray-200); padding: .5rem 0; }
.him-inline-clip { display: flex; align-items: center; gap: .25rem; overflow-wrap: anywhere; }
.him-inline-clip input[type=number] { width: 3.5rem; margin-left: auto; }
.him-inline-cards summary, .him-recommendation summary { cursor: pointer; }
@media (max-width: 600px) { .him-controls { grid-template-columns: 1fr; } .him-modal .modal-body { padding: .9rem; }
}

/* Hector Immersion V2: conversational drawer shared by all editors. */
.him-conversation.offcanvas { width: 500px; max-width: 100vw; background: var(--mv-gray-50); }
.him-chat-header { align-items: flex-start; border-bottom: 1px solid var(--mv-gray-200); background: #fff; padding: 24px; }
.him-eyebrow { font-size: .7rem; font-weight: 800; letter-spacing: .14em; color: var(--mv-primary); }
.him-chat-header h5 { margin: 6px 0; }
.him-chat-header p { font-size: .8rem; margin: 0; color: var(--mv-gray-500); }
.him-chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px; }
.him-chat-options { font-size: .8rem; margin-bottom: 20px; }
.him-chat-options summary { color: var(--mv-gray-500); cursor: pointer; margin-bottom: 12px; }
.him-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.him-chip { border: 1px solid var(--mv-gray-300); border-radius: 18px; background: #fff; padding: 7px 12px; color: var(--mv-gray-700); font-size: .8rem; text-align: left; cursor: pointer; }
.him-chip:hover, .him-chip:focus-visible { border-color: var(--mv-primary); color: var(--mv-primary); }
.him-chip:disabled { opacity: .5; cursor: default; }
.him-chat-message { padding: 16px; border-radius: 16px; margin-bottom: 14px; overflow-wrap: anywhere; }
.him-chat-message small { font-weight: 700; color: var(--mv-gray-500); }
.him-chat-message p { margin: 8px 0 0; font-size: .9rem; white-space: pre-line; }
.him-chat-message .him-chip-list { margin-top: 12px; }
.him-chat-assistant { background: #fff; border: 1px solid var(--mv-gray-200); margin-right: 16px; }
.him-chat-user { background: #eef2ff; margin-left: 40px; }
.him-chat-cost, .him-chat-result { border: 1px solid var(--mv-primary-100); background: #fff; border-radius: 16px; padding: 18px; margin: 16px 0; }
.him-chat-cost ul { padding-left: 18px; font-size: .85rem; }
.him-chat-cost li small { display: block; color: var(--mv-gray-500); margin: 3px 0 8px; }
.him-chat-result article + article { border-top: 1px solid var(--mv-gray-200); margin-top: 16px; padding-top: 16px; }
.him-chat-result audio { display: block; width: 100%; margin: 12px 0; }
.him-chat-result details { font-size: .8rem; }
.him-chat-progress { padding: 16px; color: var(--mv-gray-600); }
.him-chat-progress progress { width: 100%; height: 8px; accent-color: var(--mv-primary); }
.him-chat-progress p { font-size: .85rem; margin: 0 0 8px; }
.him-chat-progress small { font-size: .75rem; }
.him-chat-error { color: #b91c1c; background: #fef2f2; padding: 14px; border-radius: 10px; font-size: .85rem; }
.him-chat-footer { background: #fff; border-top: 1px solid var(--mv-gray-200); padding: 16px 24px; }
.him-chat-actions, .him-chat-secondary { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 10px; }
.him-chat-actions .btn, .him-chat-secondary .btn { margin: 0; }
.him-chat-actions small { color: var(--mv-gray-500); font-size: .7rem; }
.him-chat-secondary .btn { padding: 4px 0; font-size: .75rem; }
@media (max-width: 575px) { .him-conversation.offcanvas { width: 100%; } .him-chat-header, .him-chat-footer { padding: 16px; } .him-chat-scroll { padding: 16px; }
}

.him-chat-close { display: flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--mv-gray-600); }
.him-chat-close:hover, .him-chat-close:focus-visible { background: #eef2ff; color: var(--mv-gray-800); }
.him-chat-header > div { min-width: 0; }
