/* Formation — planificateur interne (lab) */

.fcp-page {
  --fcp-radius: 12px;
  --fcp-radius-sm: 8px;
  --fcp-gap: 1rem;
  --fcp-tier-onboarding: #8a8278;
  --fcp-tier-free: #4a7c59;
  --fcp-tier-core: var(--theme-b-action, #6d5d4b);
  --fcp-tier-advanced: #5c4a6e;
  min-height: 100vh;
  margin: 0;
  font-family: var(--typo-body, "Manrope", system-ui, sans-serif);
  font-weight: var(--typo-w-body, 400);
  color: var(--theme-b-text, #252320);
  background: var(--theme-b-bg, #faf7f2);
  line-height: 1.45;
}

.fcp-page *,
.fcp-page *::before,
.fcp-page *::after {
  box-sizing: border-box;
}

.fcp-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--fcp-gap);
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--theme-b-surface, #fff) 92%, transparent);
  border-bottom: 1px solid var(--theme-b-border, #e2ded7);
  backdrop-filter: blur(8px);
  max-height: 20rem;
  overflow: hidden;
  transition:
    max-height 0.32s ease,
    opacity 0.24s ease,
    padding 0.32s ease,
    border-width 0.2s ease;
}

.fcp-header__title {
  margin: 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-weight: var(--typo-w-display-title, 700);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
}

.fcp-header__sub {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--theme-b-text-muted, #6a645e);
  max-width: 42rem;
}

.fcp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.fcp-btn {
  appearance: none;
  border: 1px solid var(--theme-b-border-strong, rgba(63, 52, 40, 0.35));
  border-radius: var(--fcp-radius-sm);
  padding: 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: var(--typo-w-body-semibold, 600);
  cursor: pointer;
  background: var(--theme-b-surface, #fff);
  color: var(--theme-b-text, #252320);
  transition: background 0.15s, border-color 0.15s;
}

.fcp-btn:hover {
  background: var(--theme-b-subtle, #f0ebe3);
}

.fcp-btn--primary {
  background: var(--theme-b-action, #6d5d4b);
  border-color: transparent;
  color: var(--theme-b-on-action, #faf8f5);
}

.fcp-btn--primary:hover {
  background: var(--theme-b-action-hover, #5a4c3d);
}

.fcp-btn--danger {
  color: var(--theme-b-danger, #b42318);
  border-color: color-mix(in srgb, var(--theme-b-danger, #b42318) 35%, transparent);
}

.fcp-status {
  font-size: 0.75rem;
  color: var(--theme-b-text-muted, #6a645e);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--theme-b-subtle, #f0ebe3);
}

.fcp-status.is-dirty {
  color: var(--theme-b-primary, #3f3428);
  background: var(--theme-b-tag-bg, #ddd4c8);
}

.fcp-banner {
  margin: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.8125rem;
  background: var(--theme-b-success-bg, #d4eadc);
  color: var(--theme-b-success-text, #1e4d32);
  border-bottom: 1px solid var(--theme-b-success-border, rgba(30, 77, 50, 0.2));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.fcp-banner__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.fcp-banner__actions[hidden] {
  display: none !important;
}

.fcp-banner .fcp-btn {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
}

.fcp-banner[hidden] {
  display: none;
}

.fcp-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 0;
  border-bottom: 1px solid var(--theme-b-border, #e2ded7);
  background: var(--theme-b-surface, #fff);
  max-height: 4rem;
  overflow: hidden;
  transition:
    max-height 0.32s ease,
    opacity 0.24s ease,
    padding 0.32s ease,
    border-width 0.2s ease;
}

.fcp-tab {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: var(--typo-w-body-semibold, 600);
  cursor: pointer;
  background: transparent;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-tab.is-active {
  color: var(--theme-b-text, #252320);
  border-bottom-color: var(--theme-b-action, #6d5d4b);
}

.fcp-main {
  padding: 1rem 1.25rem 2rem;
}

@media (max-width: 768px) {
  .fcp-page.fcp-page--admin,
  .fcp-page.fcp-page--admin.da-global-background,
  .fcp-page.fcp-page--admin.fcp-page--module-focus,
  .fcp-page.fcp-page--admin.da-global-background.fcp-page--module-focus {
    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .fcp-page .fcp-main,
  .fcp-page--module-focus .fcp-main {
    padding: 0 !important;
  }
}

.fcp-panel[hidden] {
  display: none !important;
}

/* —— Fil conducteur —— */

.fcp-pipeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 70%);
  gap: 1.25rem;
  align-items: start;
}

.fcp-pipeline-layout--craft {
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
}

#fcpPipelineCol {
  container-type: inline-size;
  min-width: 0;
}

@media (max-width: 1100px) {
  .fcp-pipeline-layout--craft {
    grid-template-columns: minmax(0, 38%) minmax(0, 62%);
  }
}

@media (max-width: 960px) {
  .fcp-pipeline-layout {
    grid-template-columns: 1fr;
  }
}

.fcp-pipeline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.fcp-pipeline__hint {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-module-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius);
  background: var(--theme-b-surface, #fff);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fcp-module-card:hover {
  border-color: var(--theme-b-border-strong, rgba(63, 52, 40, 0.35));
}

.fcp-module-card.is-selected {
  border-color: var(--theme-b-action, #6d5d4b);
  box-shadow: 0 0 0 1px var(--theme-b-action, #6d5d4b);
}

.fcp-module-card.is-dragging {
  opacity: 0.45;
}

.fcp-module-card__drag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  padding-top: 0.15rem;
  color: var(--theme-b-text-muted, #6a645e);
  cursor: grab;
  user-select: none;
  font-size: 1rem;
  line-height: 1;
}

.fcp-module-card__drag:active {
  cursor: grabbing;
}

.fcp-module-card__order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-weight: 700;
  font-size: 0.8125rem;
  background: var(--theme-b-subtle, #f0ebe3);
  color: var(--theme-b-primary, #3f3428);
}

.fcp-module-card__body {
  min-width: 0;
}

.fcp-module-card__title {
  margin: 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-weight: var(--typo-w-display-card, 700);
  font-size: 1rem;
  line-height: 1.25;
}

.fcp-module-card__objective {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fcp-module-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-tier {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: var(--typo-w-body-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}

.fcp-tier--onboarding { background: var(--fcp-tier-onboarding); }
.fcp-tier--free { background: var(--fcp-tier-free); }
.fcp-tier--core { background: var(--fcp-tier-core); }
.fcp-tier--advanced { background: var(--fcp-tier-advanced); }

.fcp-connector {
  display: flex;
  justify-content: center;
  height: 1.5rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-size: 0.875rem;
  user-select: none;
}

.fcp-add-module {
  margin-top: 0.75rem;
  width: 100%;
  border-style: dashed;
}

/* —— Détail module —— */

.fcp-detail {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 6.5rem);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius);
  background: var(--theme-b-surface, #fff);
}

.fcp-detail--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-size: 0.875rem;
  text-align: center;
}

.fcp-field {
  margin-bottom: 1rem;
}

.fcp-field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: var(--typo-w-body-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-input,
.fcp-textarea,
.fcp-select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  font: inherit;
  font-size: 0.875rem;
  color: var(--theme-b-text, #252320);
  background: var(--theme-b-bg, #faf7f2);
}

.fcp-textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.fcp-input:focus,
.fcp-textarea:focus,
.fcp-select:focus {
  outline: 2px solid color-mix(in srgb, var(--theme-b-action, #6d5d4b) 45%, transparent);
  outline-offset: 1px;
}

.fcp-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fcp-list-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
}

.fcp-list-item.is-dragging {
  opacity: 0.5;
}

.fcp-list-item__drag {
  cursor: grab;
  color: var(--theme-b-text-muted, #6a645e);
  user-select: none;
}

.fcp-list-item__input {
  border: none;
  background: transparent;
  padding: 0.25rem 0;
  font: inherit;
  font-size: 0.875rem;
  width: 100%;
}

.fcp-list-item__input:focus {
  outline: none;
}

.fcp-icon-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.2rem 0.35rem;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--theme-b-text-muted, #6a645e);
  border-radius: 4px;
}

.fcp-icon-btn:hover {
  color: var(--theme-b-danger, #b42318);
  background: color-mix(in srgb, var(--theme-b-danger, #b42318) 8%, transparent);
}

.fcp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.fcp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--theme-b-tag-bg, #ddd4c8);
  color: var(--theme-b-tag-text, #3a3026);
  border: 1px solid var(--theme-b-tag-border, rgba(58, 48, 38, 0.12));
}

.fcp-chip button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
}

.fcp-chip button:hover {
  opacity: 1;
}

.fcp-chip--selectable {
  cursor: pointer;
}

.fcp-chip--selectable.is-on {
  background: var(--theme-b-action, #6d5d4b);
  color: var(--theme-b-on-action, #faf8f5);
  border-color: transparent;
}

.fcp-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--theme-b-border, #e2ded7);
}

/* —— Notions —— */

.fcp-notions-layout {
  max-width: 52rem;
}

.fcp-notion-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.35rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-surface, #fff);
}

.fcp-notion-row.is-dragging {
  opacity: 0.45;
}

.fcp-notion-row__index {
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
  min-width: 1.5rem;
}

/* —— Arborescence —— */

.fcp-tree {
  font-size: 0.875rem;
  max-width: 56rem;
}

.fcp-tree details {
  margin-left: 0.5rem;
  border-left: 1px solid var(--theme-b-border, #e2ded7);
  padding-left: 0.75rem;
  margin-bottom: 0.25rem;
}

.fcp-tree summary {
  cursor: pointer;
  padding: 0.35rem 0;
  font-weight: var(--typo-w-body-semibold, 600);
  list-style: none;
}

.fcp-tree summary::-webkit-details-marker {
  display: none;
}

.fcp-tree summary::before {
  content: "▸ ";
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-tree details[open] > summary::before {
  content: "▾ ";
}

.fcp-tree__module > summary {
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 1rem;
}

.fcp-tree__leaf {
  padding: 0.2rem 0 0.2rem 1rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-tree__leaf--notion {
  color: var(--theme-b-tag-text, #3a3026);
}

.fcp-tree__leaf--empty {
  font-style: italic;
}

.fcp-inline-add {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.fcp-inline-add .fcp-input {
  flex: 1;
}

.fcp-page--admin {
  /* Dégage le rail controlbar replié (64px) + marge de lecture */
  padding-left: var(--shell-content-offset, calc(var(--shell-rail-w, 64px) + 1.5rem));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: var(--shell-bottom-nav-h, 0px);
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .fcp-page--admin {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  .fcp-page--admin.fcp-page--module-focus,
  .fcp-page--admin.fcp-page--module-focus.da-global-background {
    padding: 0 !important;
    margin: 0 !important;
  }
}

.fcp-admin-back {
  margin: 0;
  padding: 0.65rem 1.25rem 0;
  font-size: 0.875rem;
}

.fcp-admin-back a {
  color: var(--theme-b-action, #6d5d4b);
  font-weight: var(--typo-w-body-semibold, 600);
  text-decoration: none;
}

.fcp-admin-back a:hover {
  text-decoration: underline;
}

.fcp-admin-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: var(--typo-w-body-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--theme-b-text-muted, #6a645e);
}

/* Sections repliables — notions, prérequis, récap */
.fcp-collapse-field {
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-surface, #fff);
}

.fcp-collapse-field--sm {
  font-size: 0.875rem;
}

.fcp-collapse-field__summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  font-weight: var(--typo-w-body-semibold, 600);
  cursor: pointer;
  list-style: none;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-collapse-field__summary::-webkit-details-marker {
  display: none;
}

.fcp-collapse-field__summary::before {
  content: "▸ ";
  font-size: 0.6875rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-collapse-field[open] > .fcp-collapse-field__summary::before {
  content: "▾ ";
}

.fcp-collapse-field__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  background: color-mix(in srgb, #5c4a6e 12%, #fff);
  color: #5c4a6e;
}

.fcp-collapse-field[open] .fcp-prereq-grid,
.fcp-collapse-field[open] .fcp-chips,
.fcp-collapse-field[open] .fcp-image-magnet__body {
  padding: 0 0.6rem 0.6rem;
}

.fcp-prereq-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Structures visuelles — uniquement dans paramètres module (ouverts) */
.fcp-presentation {
  padding: 0.65rem 0.75rem;
  border: 1px dashed color-mix(in srgb, #5c4a6e 28%, var(--theme-b-border, #e2ded7));
  border-radius: var(--fcp-radius-sm);
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 40%, #fff);
}

.fcp-presentation__heading {
  margin: 0 0 0.25rem;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
}

.fcp-presentation__hint {
  margin: 0 0 0.55rem;
  font-size: 0.6875rem;
  color: var(--theme-b-text-muted, #6a645e);
  line-height: 1.4;
}

/* DA & effets portfolio */
.fcp-da {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px dashed color-mix(in srgb, #3d5a4a 30%, var(--theme-b-border, #e2ded7));
  border-radius: var(--fcp-radius-sm);
  background: color-mix(in srgb, #e8f0ea 35%, #fff);
}

.fcp-da--chapter {
  margin-top: 0;
  border: none;
  background: transparent;
  padding: 0.35rem 0 0;
}

.fcp-da__heading {
  margin: 0 0 0.25rem;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
}

.fcp-da__lede,
.fcp-da__hint {
  margin: 0 0 0.55rem;
  font-size: 0.6875rem;
  color: var(--theme-b-text-muted, #6a645e);
  line-height: 1.45;
}

.fcp-da-scopes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.fcp-da-scope {
  padding: 0.45rem 0.5rem;
  border: 1px solid color-mix(in srgb, var(--theme-b-border, #e2ded7) 80%, #fff);
  border-radius: 8px;
  background: #fff;
}

.fcp-da-scope__head {
  margin-bottom: 0.35rem;
}

.fcp-da-scope__label {
  display: block;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.6875rem;
  font-weight: 700;
}

.fcp-da-scope__desc {
  display: block;
  font-size: 0.625rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-da-scope__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.fcp-da-scope__fields--block {
  margin-top: 0.35rem;
}

.fcp-da-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fcp-da-field--palette-global {
  margin-bottom: 0.55rem;
}

.fcp-da-field__label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-block-da {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--theme-b-border, #e2ded7);
}

.fcp-block-da__title {
  margin: 0 0 0.15rem;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
}

.fcp-block-da__hint {
  margin: 0 0 0.35rem;
  font-size: 0.625rem;
  color: var(--theme-b-text-muted, #6a645e);
  line-height: 1.4;
}

.fcp-da-collapse {
  margin-bottom: 0.65rem;
}

.fcp-rough-collapse {
  margin-bottom: 0.65rem;
}

.fcp-rough-collapse--promoted {
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.55rem 0.45rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
}

.fcp-rough-collapse--promoted > .fcp-collapse-field__summary {
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  user-select: none;
}

.fcp-rough-collapse--promoted:not([open]) > .fcp-collapse-field__summary {
  opacity: 0.92;
}

.fcp-rough-collapse--promoted:not([open]) {
  padding-bottom: 0.2rem;
}

.fcp-chapter-rough {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.35rem;
}

.fcp-chapter-rough__hint {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-textarea--rough {
  min-height: 10rem;
  max-height: 22rem;
  resize: vertical;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.fcp-chapter-rough__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.fcp-chapter-rough__status {
  font-size: 0.6875rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-whisper {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.45rem 0.5rem 0.55rem;
  margin-bottom: 0.55rem;
  border: 1px dashed color-mix(in srgb, var(--theme-b-action, #6d5d4b) 35%, var(--theme-b-border, #e2ded7));
  border-radius: var(--fcp-radius-sm);
  background: color-mix(in srgb, var(--theme-b-action, #6d5d4b) 4%, var(--theme-b-bg, #faf7f2));
}

.fcp-whisper__title {
  margin: 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--theme-b-text, #2c2926);
}

.fcp-whisper--optional {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--theme-b-border, #e2ded7);
}

.fcp-whisper--optional > summary.fcp-whisper__title {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0.45rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-weight: 600;
}

.fcp-whisper--optional > summary.fcp-whisper__title::-webkit-details-marker {
  display: none;
}

.fcp-whisper__title--rough {
  margin-top: 0.15rem;
}

.fcp-whisper__lead {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-whisper__lead code {
  font-size: 0.625rem;
}

.fcp-whisper__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.fcp-whisper__file {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.fcp-whisper__filename {
  font-size: 0.75rem;
  color: var(--theme-b-text-muted, #6a645e);
  min-width: 0;
  word-break: break-word;
}

.fcp-whisper__status {
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-whisper__status[data-kind="ok"] {
  color: #2f6f4e;
}

.fcp-whisper__status[data-kind="warn"] {
  color: #8a5a1a;
}

.fcp-whisper__status[data-kind="err"] {
  color: #8a3b3b;
}

.fcp-whisper__status[data-kind="busy"] {
  color: var(--theme-b-action, #6d5d4b);
}

#fcpWhisperRunBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.fcp-whisper-progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--theme-b-action, #6d5d4b) 28%, var(--theme-b-border, #e2ded7));
  background: var(--theme-b-surface, #fff);
}

.fcp-whisper-progress[hidden] {
  display: none !important;
}

.fcp-whisper-progress__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.fcp-whisper-progress__spinner {
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid color-mix(in srgb, var(--theme-b-action, #6d5d4b) 25%, transparent);
  border-top-color: var(--theme-b-action, #6d5d4b);
  border-radius: 50%;
  animation: fcp-whisper-spin 0.8s linear infinite;
  flex: 0 0 auto;
}

.fcp-whisper-progress:not(.is-running) .fcp-whisper-progress__spinner {
  animation: none;
  opacity: 0.35;
}

@keyframes fcp-whisper-spin {
  to {
    transform: rotate(360deg);
  }
}

.fcp-whisper-progress__phase {
  font-size: 0.75rem;
  color: var(--theme-b-text, #2c2926);
  flex: 1;
  min-width: 8rem;
}

.fcp-whisper-progress__timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--theme-b-action, #6d5d4b);
}

.fcp-whisper-progress__hint {
  margin: 0;
  font-size: 0.625rem;
  line-height: 1.4;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-whisper-progress__log {
  margin: 0;
  min-height: 4.5rem;
  max-height: 9rem;
  overflow: auto;
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--theme-b-ink, #2c2926) 4%, #fff);
  border: 1px solid var(--theme-b-border, #e2ded7);
  font-size: 0.625rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--theme-b-text-muted, #6a645e);
}

/* Cadrage aimant image (éditeur) */
.fcp-image-magnet {
  margin-top: 0.35rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
}

.fcp-image-magnet__preview {
  aspect-ratio: 4 / 3;
  max-height: 9rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--theme-b-subtle, #f0ebe3);
  border: 1px solid var(--theme-b-border, #e2ded7);
}

.fcp-image-magnet__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: var(--formation-img-fit, cover);
  object-position: var(--formation-img-x, 50%) var(--formation-img-y, 50%);
  transform: scale(var(--formation-img-scale, 1));
  transform-origin: var(--formation-img-x, 50%) var(--formation-img-y, 50%);
}

.fcp-image-magnet__thumb-empty {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 0.75rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-style: italic;
}

.fcp-image-magnet__controls {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.fcp-image-magnet__control {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fcp-image-magnet__label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-image-magnet__control input[type="range"] {
  width: 100%;
  accent-color: var(--theme-b-action, #6d5d4b);
}

/* Contenu bloc — pas de débordement */
.fcp-block__body {
  min-width: 0;
  overflow: hidden;
}

.fcp-textarea,
.fcp-input {
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fcp-block__notions-collapse {
  margin-top: 0.35rem;
}

/* —— Détail chapitres / ressources —— */

.fcp-module-settings {
  margin-bottom: 1rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
}

.fcp-module-settings__summary {
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: var(--typo-w-body-semibold, 600);
  cursor: pointer;
  list-style: none;
}

.fcp-module-settings__summary::-webkit-details-marker {
  display: none;
}

.fcp-module-settings__summary::before {
  content: "▸ ";
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-module-settings[open] > .fcp-module-settings__summary::before {
  content: "▾ ";
}

.fcp-module-settings__body {
  padding: 0 0.75rem 0.85rem;
  border-top: 1px solid var(--theme-b-border, #e2ded7);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fcp-field--flush {
  margin-bottom: 0;
}

.fcp-field--inline {
  max-width: 14rem;
}

.fcp-textarea--compact {
  min-height: 3.25rem;
}

.fcp-textarea--sm {
  min-height: 2.75rem;
  font-size: 0.8125rem;
}

.fcp-input--title {
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
}

.fcp-select--compact {
  width: auto;
  min-width: 8rem;
  font-size: 0.8125rem;
  padding: 0.35rem 0.5rem;
}

.fcp-chapter-workspace__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.fcp-chapter-workspace__title {
  margin: 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 1rem;
  font-weight: 700;
}

.fcp-chapter-split {
  display: grid;
  grid-template-columns: minmax(100px, 22%) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.fcp-chapter-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .fcp-chapter-edit-grid {
    grid-template-columns: 1fr;
  }
}

.fcp-inline-preview {
  position: sticky;
  top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  max-height: calc(100dvh - 1rem);
  padding: 0.25rem 0.15rem 0.4rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.fcp-inline-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.1rem;
}

.fcp-inline-preview__kicker {
  margin: 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--da-accent, #5c7d97);
}

.fcp-inline-preview__title {
  margin: 0.1rem 0 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--da-ink, #262a30);
  line-height: 1.2;
}

.fcp-inline-preview__actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}

.fcp-inline-preview__frame {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: transparent;
}

/* Pas de carte « Posture et prise » : contenu document plein largeur */
.fcp-inline-preview .formation-chapter-preview--inline,
.fcp-inline-preview .formation-chapter-preview--inline.formation-chapter-preview--document,
.fcp-inline-preview .formation-chapter-preview--inline.formation-chapter-preview--reader {
  display: block;
  min-height: 0;
  height: auto;
  max-height: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
  grid-template-columns: none;
  grid-template-rows: none;
  grid-template-areas: none;
}

.fcp-inline-preview .formation-chapter-preview__head,
.fcp-inline-preview .formation-reader-pages-host {
  display: none !important;
}

.fcp-inline-preview .formation-chapter-preview__body,
.fcp-inline-preview .formation-chapter-preview--document .formation-chapter-preview__body,
.fcp-inline-preview .formation-chapter-preview--reader .formation-chapter-preview__body {
  display: block;
  height: auto;
  max-height: calc(100dvh - 5rem);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.15rem 0.35rem 1.25rem;
  scroll-snap-type: none;
  background: transparent;
}

.fcp-inline-preview .formation-reader__page-title {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.fcp-inline-preview .formation-reader__idea {
  padding: 1rem 1.05rem 1.1rem;
}

.fcp-inline-preview .formation-reader__idea .formation-block__prose,
.fcp-inline-preview .formation-reader__idea .formation-block-point__children {
  font-size: 0.9rem;
  line-height: 1.5;
}

.fcp-inline-preview .formation-block-image__wrap,
.fcp-inline-preview .formation-image-magnet,
.fcp-inline-preview .formation-image--framed .formation-block-image__wrap,
.fcp-inline-preview .formation-image--bleed-soft .formation-block-image__wrap,
.fcp-inline-preview .formation-image--polaroid .formation-block-image__wrap {
  width: 100%;
  max-width: 100%;
  aspect-ratio: auto;
  height: auto;
  background: transparent;
}

.fcp-inline-preview .formation-block-image,
.fcp-inline-preview .formation-block-image--magnet {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.fcp-inline-preview .formation-chapter-recap {
  margin-top: 0.75rem;
  padding: 0.65rem 0.15rem 0;
  border-top: 1px solid var(--da-line, rgba(38, 42, 48, 0.12));
  background: transparent;
}

.fcp-inline-preview__hint {
  margin: 0;
  padding: 0 0.1rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--da-ink-muted, rgba(38, 42, 48, 0.72));
}

@media (max-width: 720px) {
  .fcp-chapter-split {
    grid-template-columns: 1fr;
  }
}

.fcp-chapter-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.4rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
  scrollbar-width: thin;
}

.fcp-chapter-nav__empty {
  margin: 0.5rem;
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
  white-space: nowrap;
}

.fcp-chapter-nav__item {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  max-width: 14rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--theme-b-surface, #fff);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.fcp-chapter-nav__item:hover {
  border-color: var(--theme-b-border, #e2ded7);
}

.fcp-chapter-nav__item.is-active {
  border-color: var(--theme-b-action, #6d5d4b);
  background: color-mix(in srgb, var(--theme-b-action, #6d5d4b) 8%, #fff);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-b-action, #6d5d4b) 12%, transparent);
}

.fcp-chapter-nav__item.is-dragging {
  opacity: 0.45;
}

.fcp-chapter-nav__drag {
  cursor: grab;
  color: var(--theme-b-text-muted, #6a645e);
  user-select: none;
  padding: 0;
  font-size: 0.75rem;
}

.fcp-chapter-nav__index {
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-weight: 700;
  font-size: 0.6875rem;
  color: var(--theme-b-text-muted, #6a645e);
  flex: 0 0 auto;
}

.fcp-chapter-nav__label {
  font-size: 0.75rem;
  font-weight: var(--typo-w-body-semibold, 600);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.fcp-chapter-nav__meta {
  display: none;
}

.fcp-chapter-panel {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-surface, #fff);
}

.fcp-chapter-panel--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-size: 0.875rem;
  text-align: center;
}

.fcp-chapter-panel__head {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.fcp-chapter-panel__head .fcp-field {
  flex: 1;
  margin-bottom: 0;
}

.fcp-chapter-panel__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-top: 1.35rem;
}

.fcp-chapter-panel__head-actions .fcp-chapter-panel__test,
.fcp-chapter-panel__head-actions .fcp-chapter-panel__delete {
  margin-top: 0;
}

.fcp-block-editor__persist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--theme-b-border, #e2ded7);
}

.fcp-persist-status {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-persist-status.is-dirty {
  color: var(--da-accent-2-hover, #857664);
}

.fcp-btn[data-fcp-save-btn].is-dirty {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--da-accent, #5c7d97) 35%, transparent);
}

.fcp-persist-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--da-line, rgba(38, 42, 48, 0.12));
  border-radius: 12px;
  background: color-mix(in srgb, #fff 88%, var(--da-base, #f1efe9));
  box-shadow: 0 -6px 20px color-mix(in srgb, var(--da-shadow, rgba(38, 42, 48, 0.14)) 35%, transparent);
}

.fcp-persist-bar__label {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--typo-body, Manrope, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--da-ink, #262a30);
}

.fcp-page--module-focus .fcp-persist-bar {
  bottom: 0.5rem;
}

.fcp-chapter-panel__delete {
  margin-top: 1.5rem;
}

.fcp-chapter-panel__preview {
  margin-top: 1.35rem;
  flex-shrink: 0;
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
}

.fcp-chapter-panel__test {
  margin-top: 1.35rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.fcp-btn--test {
  background: color-mix(in srgb, #5c4a6e 12%, #fff);
  border-color: color-mix(in srgb, #5c4a6e 45%, var(--theme-b-border, #e2ded7));
  color: #5c4a6e;
}

.fcp-btn--test:hover {
  background: color-mix(in srgb, #5c4a6e 20%, #fff);
}

/* —— Dictée vocale (champs texte) —— */

.fcp-input-with-dictation {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.fcp-input-with-dictation > .fcp-input,
.fcp-input-with-dictation > .fcp-textarea {
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.75rem;
}

.fcp-field-row .fcp-input-with-dictation {
  flex: 1;
  min-width: 0;
}

.fcp-block__head .fcp-input-with-dictation {
  flex: 1;
  min-width: 6rem;
}

.fcp-notion-row .fcp-input-with-dictation {
  flex: 1;
  min-width: 0;
}

.fcp-dictation-btn,
.fcp-input-with-dictation .adminDictationBtn {
  position: absolute;
  z-index: 2;
  right: 6px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #a8b0ba;
  cursor: pointer;
  font: inherit;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(6px);
  transition:
    opacity 0.26s ease,
    transform 0.28s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.fcp-input-with-dictation--multiline .fcp-dictation-btn,
.fcp-input-with-dictation--multiline .adminDictationBtn {
  top: 8px;
  transform: translateX(6px);
}

.fcp-input-with-dictation:hover .fcp-dictation-btn:not(:disabled),
.fcp-input-with-dictation:hover .adminDictationBtn:not(:disabled),
.fcp-input-with-dictation:focus-within .fcp-dictation-btn:not(:disabled),
.fcp-input-with-dictation:focus-within .adminDictationBtn:not(:disabled),
.fcp-dictation-btn:focus-visible,
.adminDictationBtn:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.fcp-input-with-dictation--multiline:hover .fcp-dictation-btn:not(:disabled),
.fcp-input-with-dictation--multiline:focus-within .fcp-dictation-btn:not(:disabled) {
  transform: translateX(0);
}

.fcp-dictation-btn--listening,
.adminDictationBtn--listening {
  opacity: 1;
  pointer-events: auto;
  color: var(--theme-b-danger, #b42318);
  background: color-mix(in srgb, var(--theme-b-danger, #b42318) 12%, #fff);
  transform: translateY(-50%) translateX(0);
}

/* —— Mode aperçu test intégré —— */

/* —— Table de craft — aperçu live (colonne gauche) —— */

.fcp-craft {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 6.5rem);
  min-height: calc(100vh - 6.5rem);
  min-width: 0;
}

.fcp-craft__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.fcp-craft__modes {
  display: inline-flex;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: 999px;
  overflow: hidden;
  background: var(--theme-b-surface, #fff);
}

.fcp-craft-mode {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0.28rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--theme-b-text-muted, #6a645e);
  cursor: pointer;
}

.fcp-craft-mode.is-active {
  background: color-mix(in srgb, #5c4a6e 14%, #fff);
  color: #5c4a6e;
}

.fcp-btn--compact {
  font-size: 0.75rem;
  padding: 0.35rem 0.55rem;
}

.fcp-craft__live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5c4a6e;
}

.fcp-craft__live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 25%, transparent);
  animation: fcp-craft-pulse 1.8s ease-in-out infinite;
}

@keyframes fcp-craft-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.fcp-craft__browser {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
  box-shadow:
    0 12px 40px rgba(37, 35, 32, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  background: #1e1e1e;
  /* Remplit la colonne craft (plus de plafond 50vh / ratio 16:10) */
  width: 100%;
  height: 100%;
  max-height: none;
}

.fcp-craft__chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(180deg, #3a3a3a 0%, #2e2e2e 100%);
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.fcp-craft__dots {
  display: inline-flex;
  gap: 0.25rem;
}

.fcp-craft__dots i {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #5c5c5c;
}

.fcp-craft__dots i:first-child {
  background: #ff5f57;
}

.fcp-craft__dots i:nth-child(2) {
  background: #febc2e;
}

.fcp-craft__dots i:nth-child(3) {
  background: #28c840;
}

.fcp-craft__url {
  flex: 1;
  min-width: 0;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #1a1a1a;
  color: #b8b8b8;
  font-size: 0.625rem;
  font-family: ui-monospace, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fcp-craft__viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #e8e4df;
  padding: 0.35rem;
}

.fcp-craft__page {
  min-height: 100%;
}

.fcp-craft__module-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--theme-b-text-muted, #6a645e);
  text-align: center;
}

/* Aperçu embarqué dans le planificateur — échelle page réduite, proportions conservées */
.formation-craft-preview {
  font-size: clamp(0.68rem, 1.85cqw, 0.8rem);
}

.formation-craft-preview .formation-chapter-preview--craft {
  border: none;
  border-radius: 8px;
  box-shadow: none;
  background: var(--theme-b-surface, #fff);
}

.formation-craft-preview .formation-chapter-preview__head {
  padding: 0.45rem 0.55rem;
}

.formation-craft-preview .formation-chapter-preview__title {
  font-size: 0.95em;
}

.formation-craft-preview .formation-chapter-preview__body {
  padding: 0.45rem 0.55rem 0.65rem;
  gap: 0.55rem;
  background: transparent;
}

.formation-craft-preview .formation-chapter-preview--craft:has(.formation-da-page) {
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 55%, #fff);
}

.formation-craft-preview .formation-canvas {
  max-width: 100%;
  margin-inline: auto;
}

.formation-craft-preview .formation-layout--airy,
.formation-craft-preview .formation-layout--editorial,
.formation-craft-preview .formation-layout--compact {
  --formation-canvas-max: 100%;
  max-width: 100%;
}

.formation-craft-preview .formation-block-video {
  /* Dans le craft : largeur bornée ; le ratio vient de aspect-ratio (pas de max-height) */
  width: min(100%, 28rem, calc(min(32vh, 16rem) * 16 / 9));
}

.formation-craft-preview .formation-video--center-narrow .formation-block-video {
  width: min(100%, 24rem, calc(min(28vh, 14rem) * 16 / 9));
}

.formation-craft-preview .formation-video--card .formation-block-video {
  width: min(100%, 24rem, calc(min(28vh, 14rem) * 16 / 9));
}

.formation-craft-preview .formation-video--cinema .formation-block-video {
  width: min(100%, 30rem, calc(min(34vh, 17rem) * 16 / 9));
}

.formation-craft-preview .formation-structures-gallery {
  padding: 0.35rem 0.25rem 0.65rem;
}

.formation-craft-preview .formation-structure-section__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
}

.formation-craft-preview mux-player::part(top) {
  display: none;
}

.fcp-page .formation-chapter-preview,
.fcp-page .formation-block--text,
.fcp-page .formation-block--resource,
.fcp-page .formation-block--point {
  position: relative;
  z-index: 1;
}

.fcp-resources__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.fcp-resources__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: var(--typo-w-body-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-resources__add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.fcp-resources__empty {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-style: italic;
  border: 1px dashed var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
}

.fcp-resources__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fcp-resource-card {
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
  overflow: hidden;
}

.fcp-resource-card.is-dragging {
  opacity: 0.5;
}

.fcp-resource-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 70%, #fff);
  border-bottom: 1px solid var(--theme-b-border, #e2ded7);
}

.fcp-resource-card__drag {
  cursor: grab;
  color: var(--theme-b-text-muted, #6a645e);
  user-select: none;
}

.fcp-resource-card__type {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--theme-b-action, #6d5d4b);
}

.fcp-resource-card__type--video { background: #5c4a6e; }
.fcp-resource-card__type--image { background: #6a5a4a; }
.fcp-resource-card__type--chord_sequence { background: #4a7c59; }
.fcp-resource-card__type--repetition_table { background: #8a6a3a; }
.fcp-resource-card__type--text { background: #6a645e; }
.fcp-resource-card__type--link { background: #3d6b8a; }

.fcp-resource-card__head .fcp-select {
  flex: 1;
  min-width: 7rem;
}

.fcp-resource-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem 0.65rem;
}

.fcp-resource-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fcp-resource-field__label {
  font-size: 0.6875rem;
  font-weight: var(--typo-w-body-semibold, 600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-field-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.fcp-field-row__input {
  flex: 1;
  min-width: 0;
}

.fcp-field-row__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
}

.fcp-icon-action-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.35rem;
  border: 1px solid var(--theme-b-border-strong, rgba(63, 52, 40, 0.35));
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-surface, #fff);
  color: var(--theme-b-text-muted, #6a645e);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.fcp-icon-action-btn:hover {
  background: var(--theme-b-subtle, #f0ebe3);
  color: var(--theme-b-text, #252320);
}

.fcp-icon-action-btn.is-ready {
  color: var(--theme-b-action, #6d5d4b);
  border-color: color-mix(in srgb, var(--theme-b-action, #6d5d4b) 45%, var(--theme-b-border, #e2ded7));
}

.fcp-icon-action-btn[hidden] {
  display: none;
}

.fcp-icon-action-btn__glyph {
  font-size: 0.8125rem;
  line-height: 1;
}

.fcp-icon-action-btn__glyph--text {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* —— Builder dynamique (blocs) —— */

.fcp-builder__hint {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-builder__workspace {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 62%);
  gap: 0.65rem;
  align-items: start;
}

@media (max-width: 900px) {
  .fcp-builder__workspace {
    grid-template-columns: 1fr;
  }
}

.fcp-chapter-outline-wrap {
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
  padding: 0.45rem 0.5rem 0.55rem;
  max-height: min(52vh, 28rem);
  overflow: auto;
  position: sticky;
  top: 0.25rem;
}

.fcp-chapter-outline__head {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}

.fcp-chapter-outline__title {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-outline-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.35rem;
  border-radius: 8px;
  background: color-mix(in srgb, #5c4a6e 8%, #fff);
  border: 1px solid color-mix(in srgb, #5c4a6e 22%, var(--theme-b-border, #e2ded7));
}

.fcp-outline-bulk[hidden] {
  display: none !important;
}

.fcp-outline-bulk__count {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--theme-b-text, #2c2926);
  margin-right: 0.15rem;
}

.fcp-outline,
.fcp-outline__branch {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fcp-outline__branch {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid color-mix(in srgb, var(--theme-b-action, #6d5d4b) 18%, var(--theme-b-border, #e2ded7));
}

.fcp-outline__empty {
  margin: 0;
  padding: 0.65rem 0.35rem;
  font-size: 0.75rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-style: italic;
  text-align: center;
}

.fcp-outline-item {
  margin-bottom: 0.3rem;
  min-width: 0;
  max-width: 100%;
}

.fcp-outline-item__row.is-dragging {
  opacity: 0.45;
}

.fcp-outline-item__row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--theme-b-surface, #fff);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.fcp-outline-item__row:hover {
  border-color: var(--theme-b-border, #e2ded7);
}

.fcp-outline-item.is-selected > .fcp-outline-item__row,
.fcp-outline-item.is-checked > .fcp-outline-item__row {
  border-color: #5c4a6e;
  box-shadow: 0 0 0 1px color-mix(in srgb, #5c4a6e 35%, transparent);
  background: color-mix(in srgb, #5c4a6e 6%, #fff);
}

.fcp-outline-item__check {
  display: none;
}

.fcp-outline-item__drag {
  font-size: 0.65rem;
  color: var(--theme-b-text-muted, #6a645e);
  user-select: none;
  cursor: grab;
}

.fcp-outline-item__kind {
  font-size: 0.5rem;
  padding: 0.1rem 0.3rem;
}

.fcp-outline-item__kind--text,
.fcp-outline-item__kind--point {
  background: var(--theme-b-action, #6d5d4b);
  color: #fff;
  border-radius: 999px;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
}

.fcp-outline-item__select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  min-width: 0;
  text-align: left;
  pointer-events: none;
  font: inherit;
}

.fcp-outline-item__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--theme-b-text, #252320);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.fcp-outline-item__children {
  margin-top: 0.2rem;
  min-width: 0;
  max-width: 100%;
}

.fcp-outline-item--cue-do > .fcp-outline-item__row {
  background: color-mix(in srgb, var(--da-accent, #5c7d97) 8%, #fff);
}
.fcp-outline-item--cue-attention > .fcp-outline-item__row {
  background: color-mix(in srgb, #c48a4a 8%, #fff);
}
.fcp-outline-item--cue-retain > .fcp-outline-item__row {
  background: color-mix(in srgb, #5f8a6e 8%, #fff);
}
.fcp-outline-item--cue-notepad > .fcp-outline-item__row {
  background: color-mix(in srgb, var(--da-accent-2, #9c8b76) 8%, #fff);
  border-style: dotted;
  border-color: color-mix(in srgb, var(--da-accent-2, #9c8b76) 40%, var(--theme-b-border, #e2ded7));
}

.fcp-outline-item__kind--cue-do { color: var(--da-accent, #5c7d97); }
.fcp-outline-item__kind--cue-attention { color: #a56b30; }
.fcp-outline-item__kind--cue-retain { color: #3f6a50; }
.fcp-outline-item__kind--cue-notepad { color: var(--da-accent-2, #9c8b76); }

.fcp-outline-item__meta {
  display: block;
  font-size: 0.5625rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-outline-item__thumb {
  flex-shrink: 0;
  width: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fcp-outline-thumb {
  display: block;
  font-size: 0.5rem;
  line-height: 1.2;
  color: var(--theme-b-text-muted, #6a645e);
  max-width: 2.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fcp-outline-thumb--text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  font-size: 0.5rem;
}

.fcp-outline-thumb--video {
  width: 2.5rem;
  aspect-ratio: 16 / 10;
  border-radius: 3px;
  background: linear-gradient(135deg, #3a3835, #1a1918);
}

.fcp-outline-thumb--image {
  width: 2.5rem;
  height: 1.65rem;
  object-fit: cover;
  border-radius: 3px;
  background: var(--theme-b-subtle, #f0ebe3);
}

.fcp-outline-thumb--image.fcp-outline-thumb--empty,
.fcp-outline-thumb--empty {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 1.65rem;
  border-radius: 3px;
  background: var(--theme-b-subtle, #f0ebe3);
  font-size: 0.5rem;
}

.fcp-outline-thumb--point {
  width: 2.5rem;
  height: 1.65rem;
  border-radius: 3px;
  border: 1px dashed color-mix(in srgb, var(--theme-b-action, #6d5d4b) 40%, var(--theme-b-border, #e2ded7));
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 50%, #fff);
}

.fcp-outline-thumb--exo,
.fcp-outline-thumb--meta {
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Panneau édition (un seul bloc) */
.fcp-block-editor {
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-surface, #fff);
  min-height: 8rem;
}

.fcp-block-editor--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  text-align: center;
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 35%, #fff);
}

.fcp-block-editor__empty-title {
  margin: 0 0 0.25rem;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--theme-b-text, #252320);
}

.fcp-block-editor__empty-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-block--edit {
  border: none;
  margin: 0;
}

.fcp-block-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--theme-b-border, #e2ded7);
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 45%, #fff);
}

.fcp-block-editor__title {
  margin: 0;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.8125rem;
  font-weight: 700;
}

.fcp-point-editor__add {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--theme-b-border, #e2ded7);
}

.fcp-point-editor__add-label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-resource-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.fcp-resource-field--inline .fcp-select {
  flex: 1;
  max-width: 14rem;
}

.fcp-builder__toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem;
  border: 1px dashed var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
  margin-bottom: 0.65rem;
}

.fcp-builder__toolbar--nested {
  margin: 0.5rem 0;
  padding: 0.35rem;
}

.fcp-builder__toolbar--nested .fcp-builder__toolbar-inner {
  margin-bottom: 0;
  padding: 0.35rem;
}

.fcp-builder__toolbar-sep {
  width: 1px;
  height: 1.25rem;
  background: var(--theme-b-border, #e2ded7);
}

.fcp-builder__stream {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fcp-builder__stream--nested {
  margin-left: calc(var(--fcp-block-depth, 0) * 0.35rem);
}

.fcp-builder__empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
  border: 1px dashed var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
}

.fcp-block {
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-surface, #fff);
  margin-left: calc(var(--fcp-block-depth, 0) * 0.75rem);
}

.fcp-block.is-dragging {
  opacity: 0.45;
}

.fcp-block--point {
  border-color: color-mix(in srgb, var(--theme-b-action, #6d5d4b) 35%, var(--theme-b-border, #e2ded7));
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 40%, #fff);
}

.fcp-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--theme-b-border, #e2ded7);
  background: color-mix(in srgb, var(--theme-b-subtle, #f0ebe3) 55%, #fff);
}

.fcp-block__head--point {
  background: color-mix(in srgb, var(--theme-b-action, #6d5d4b) 10%, #fff);
}

.fcp-block__drag {
  cursor: grab;
  color: var(--theme-b-text-muted, #6a645e);
  user-select: none;
}

.fcp-block__kind {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-block__point-title {
  flex: 1;
  min-width: 8rem;
  font-weight: 600;
}

.fcp-block__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem 0.65rem;
}

.fcp-block__body--point {
  padding-top: 0.45rem;
}

.fcp-block__notions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fcp-block__notions-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-chip--sm {
  font-size: 0.6875rem;
  padding: 0.12rem 0.4rem;
}

.fcp-chapter-recap {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--theme-b-border, #e2ded7);
}

.fcp-chapter-recap__empty {
  font-size: 0.8125rem;
  color: var(--theme-b-text-muted, #6a645e);
  font-style: italic;
}

.fcp-chips--readonly .fcp-chip {
  cursor: default;
}

/* Mode focus — clic module / Éditer le plan : #fcpDetail = page entière */

.fcp-page--module-focus .fcp-header,
.fcp-page--module-focus .fcp-tabs,
.fcp-page--module-focus .fcp-banner,
.fcp-page--module-focus .fcp-admin-back {
  display: none !important;
}

.fcp-page--module-focus.fcp-page--admin,
.fcp-page--module-focus.fcp-page--admin.da-global-background {
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.fcp-page--module-focus .fcp-main {
  padding: 0 !important;
  margin: 0;
  width: 100%;
  height: 100%;
}

.fcp-page--module-focus .fcp-panel,
.fcp-page--module-focus .fcp-pipeline-layout,
.fcp-page--module-focus .fcp-pipeline-layout--craft {
  display: block !important;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 !important;
  gap: 0;
  grid-template-columns: none;
}

.fcp-page--module-focus #fcpPipelineCol {
  display: none !important;
}

.fcp-page--module-focus #fcpDetail,
.fcp-page--module-focus .fcp-detail,
#fcpDetail.fcp-detail--fullscreen,
aside#fcpDetail.fcp-detail--fullscreen {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: var(--shell-content-offset, calc(var(--shell-rail-w, 64px) + 1.5rem)) !important;
  z-index: 40000 !important;
  width: auto !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: 100dvh !important;
  min-width: 0 !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.75rem 1rem 1.25rem !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: var(--theme-b-surface, #fff) !important;
  transform: none !important;
}

@media (max-width: 768px) {
  .fcp-page--module-focus #fcpDetail,
  .fcp-page--module-focus .fcp-detail,
  #fcpDetail.fcp-detail--fullscreen,
  aside#fcpDetail.fcp-detail--fullscreen {
    left: 0 !important;
    padding: 0.65rem 0.75rem 4.5rem !important;
  }
}

.fcp-detail__admin-back {
  display: none;
}

.fcp-page--module-focus .fcp-detail__admin-back {
  display: block;
  margin: 0 0 0.65rem;
  padding: 0;
  font-size: 0.8125rem;
}

.fcp-page--module-focus .fcp-detail__admin-back a {
  color: var(--theme-b-action, #6d5d4b);
  font-weight: var(--typo-w-body-semibold, 600);
  text-decoration: none;
}

@media (max-width: 960px) {
  .fcp-pipeline-layout--craft .fcp-craft {
    position: relative;
    top: auto;
    max-height: none;
    min-height: 0;
  }

  .fcp-pipeline-layout--craft .fcp-craft__browser {
    min-height: min(70vh, 36rem);
    max-height: none;
    height: auto;
  }

  .fcp-pipeline-layout--craft .fcp-detail:not(.fcp-detail--fullscreen) {
    position: relative;
    top: auto;
    max-height: none;
  }
}

/* —— Mode édition mobile : focus #fcpChapterPanel —— */

.fcp-chapter-mobile-pick {
  display: none;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 0.2rem;
}

.fcp-chapter-mobile-pick__label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--theme-b-text-muted, #6a645e);
}

.fcp-edit-settings {
  margin: 0 0 0.75rem;
  border: none;
  background: transparent;
}

.fcp-edit-settings__summary {
  display: none;
  cursor: pointer;
  list-style: none;
  font-family: var(--typo-display, "League Spartan", sans-serif);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
}

.fcp-edit-settings__summary::-webkit-details-marker {
  display: none;
}

.fcp-edit-settings__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fcp-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.35rem 0 0.5rem;
}

.fcp-compare-col {
  padding: 0.55rem;
  border: 1px solid var(--theme-b-border, #e2ded7);
  border-radius: var(--fcp-radius-sm);
  background: var(--theme-b-bg, #faf7f2);
  min-width: 0;
}

.fcp-compare-col--do {
  border-color: color-mix(in srgb, #2f6f4e 35%, var(--theme-b-border, #e2ded7));
}

.fcp-compare-col--dont {
  border-color: color-mix(in srgb, #8a3b3b 35%, var(--theme-b-border, #e2ded7));
}

.fcp-compare-col__items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.35rem 0;
}

.fcp-compare-item {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.fcp-compare-item .fcp-input-with-dictation {
  flex: 1;
  min-width: 0;
}

.fcp-compare-actions {
  margin-bottom: 0.5rem;
}

.fcp-outline-thumb--compare {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 1.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--theme-b-action, #6d5d4b) 12%, #fff);
  color: var(--theme-b-action, #6d5d4b);
}

@media (max-width: 720px) {
  .fcp-admin-back {
    display: none;
  }

  .fcp-detail__admin-back {
    display: block;
    margin: 0 0 0.65rem;
    padding: 0;
    font-size: 0.8125rem;
  }

  .fcp-detail__admin-back a {
    color: var(--theme-b-action, #6d5d4b);
    font-weight: var(--typo-w-body-semibold, 600);
    text-decoration: none;
  }

  .fcp-chapter-workspace__head {
    flex-wrap: wrap;
  }

  .fcp-chapter-workspace__title {
    width: 100%;
  }

  .fcp-chapter-mobile-pick {
    display: flex;
  }

  .fcp-chapter-nav {
    display: none;
  }

  .fcp-chapter-split,
  .fcp-chapter-edit-grid {
    grid-template-columns: 1fr;
  }

  .fcp-inline-preview {
    position: relative;
    top: auto;
  }

  .fcp-chapter-panel {
    padding: 0.65rem;
  }

  .fcp-chapter-panel__head {
    flex-wrap: wrap;
  }

  .fcp-chapter-panel__test,
  .fcp-chapter-panel__delete {
    margin-top: 0;
  }

  .fcp-edit-settings__summary {
    display: block;
  }

  .fcp-edit-settings:not([open]) > .fcp-edit-settings__body {
    display: none;
  }

  .fcp-builder__toolbar-inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
  }

  .fcp-builder__toolbar-inner .fcp-btn,
  .fcp-builder__toolbar-inner .fcp-select {
    flex: 0 0 auto;
  }

  .fcp-builder__workspace {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .fcp-chapter-outline-wrap {
    position: static;
    max-height: min(58vh, 28rem);
    min-height: 12rem;
  }

  .fcp-block-editor {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .fcp-block,
  .fcp-block__body,
  .fcp-compare-grid,
  .fcp-point-editor__add {
    min-width: 0;
    max-width: 100%;
  }

  .fcp-compare-grid {
    grid-template-columns: 1fr;
  }

  .fcp-toolbar {
    flex-wrap: wrap;
  }

  .fcp-outline-item__children,
  .fcp-outline__branch {
    margin-left: 0 !important;
    padding-left: 0 !important;
    max-width: 100%;
  }
}

@media (min-width: 721px) {
  .fcp-edit-settings {
    display: contents;
  }

  .fcp-edit-settings__body {
    display: contents;
  }

  .fcp-detail__admin-back {
    display: none;
  }

  .fcp-page--module-focus .fcp-detail__admin-back {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fcp-header,
  .fcp-tabs {
    transition: none;
  }
}

