:is(.course-document-layout,.reader-heading,.authoring-document-preview) {
  --course-width: 48rem;
}

.course-document-layout {
  --course-font: Arial;
  box-sizing: border-box;
  width: min(100%, var(--course-width));
  margin-inline: auto;
  container: course-document / inline-size;
}

.course-reading-document.course-document-layout,
.authoring-modern #studioPaperCanvas.course-document-layout {
  display: block;
  width: min(100%, var(--course-width));
  max-width: none;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.course-document-sheet {
  padding: clamp(14px, 3cqi, 26px) clamp(12px, 2.8cqi, 22px);
  font: 400 18px/1.7 var(--course-font), Arial, sans-serif;
  color: #263e4b;
}

.course-document-layout .course-document-prose,
.reader-heading .course-document-prose,
.authoring-modern #studioIntroduction .course-document-prose {
  position: relative;
  isolation: isolate;
  display: flow-root;
  min-height: var(--course-image-extent, 0px);
  font: 400 clamp(16.5px, 15px + .4cqi, 18px)/1.7 var(--course-font, Arial), Arial, sans-serif;
  color: #263e4b;
  overflow-wrap: anywhere;
}

.course-document-layout .repere-prose.course-document-prose { min-height: max(52px, var(--course-image-extent, 0px)); }
.course-document-layout .course-document-prose > :last-child { margin-bottom: 0; }
.course-document-prose p { margin: 0 0 12px; }
.course-document-prose p:empty::before { content: '\00a0'; }
.authoring-modern #studioIntroduction .course-document-prose p { margin: 0 0 12px; }
.course-document-prose :where(h1, h2, h3, h4, h5, h6) { line-height: 1.25; margin: 1em 0 .5em; }
.course-document-prose :where(h1) { font-size: 2em; }
.course-document-prose :where(h2) { font-size: 1.5em; }
.course-document-prose :where(h3) { font-size: 1.25em; }
.course-document-prose :where(ol, ul) { margin: 0 0 12px; padding-inline-start: 1.6em; }
.course-document-prose li > p { margin-bottom: 4px; }
.course-document-prose blockquote { border-inline-start: 3px solid #d5a4c1; padding: 4px 15px; margin: 15px 0; color: #526c78; }
.course-document-prose table { display: table; width: 100%; border-collapse: collapse; table-layout: fixed; margin: 15px 0; }
.course-document-prose :is(th, td) { border: 1px solid #bccad3; padding: 9px; vertical-align: top; overflow-wrap: anywhere; }
.course-document-prose th { background: #f6f8fa; font-weight: 600; }
.course-document-prose :where(img) { max-width: 100%; height: auto; }
.course-document-prose figure { max-width: 100%; margin: 14px 0; }
.course-document-prose figure > figcaption:not(.course-accessible-text) { color: #546b78; font-size: .875em; line-height: 1.45; margin-top: 6px; }
.course-document-prose .course-edit-image { clear: none; box-sizing: border-box; min-width: 0; }
.course-document-prose .course-edit-image > img { display: block; width: 100%; max-width: 100%; height: auto; }
.course-document-prose .course-edit-image[data-image-mode=inline] { clear: both; }
:is(.course-document-prose,.course-paper-content) .course-edit-image[data-image-mode=inline][data-image-align=center] { margin-inline: auto; }
:is(.course-document-prose,.course-paper-content) .course-edit-image[data-image-mode=inline][data-image-align=right] { margin-inline: auto 0; }
.course-document-prose .course-edit-image[data-image-mode=left] { float: left; max-width: calc(100% - 16px); margin: 4px 16px 10px 0; }
.course-document-prose .course-edit-image[data-image-mode=right] { float: right; max-width: calc(100% - 16px); margin: 4px 0 10px 16px; }
.course-document-prose .course-edit-image:is([data-image-mode=front], [data-image-mode=behind]) { position: absolute; float: none; margin: 0; }
.course-document-prose .course-edit-image[data-image-mode=front] { z-index: 3; }
.course-document-prose .course-edit-image[data-image-mode=behind] { z-index: 0; }
.course-document-prose > :is(p, div, h1, h2, h3, h4, h5, h6, ol, ul, blockquote) { position: relative; z-index: 1; }
.course-document-prose .course-document-page { border: 0; padding: 0; background: transparent; clear: both; }

.authoring-modern :is(#studioPaperCanvas, #studioCoursePreview) [hidden],
.authoring-modern :is(#studioPaperCanvas, #studioCoursePreview)[hidden],
.authoring-document-preview[hidden] { display: none !important; }
.authoring-modern .authoring-sheet { width: 100%; min-height: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.authoring-modern .authoring-sheet:has(.repere-prose) { min-height: 0; }
.course-document-sheet > :is(.authoring-sheet,.course-block-read) { margin-block: 0; }
.course-document-sheet > :is(.authoring-sheet,.course-block-read) + :is(.authoring-sheet,.course-block-read) { margin-top: 22px; }
.course-document-sheet :is(.authoring-sheet,.course-block-read) > h2 { font: 700 1.5em/1.25 var(--course-font), Arial, sans-serif; margin: 0 0 .5em; }
.authoring-modern #studioPaperCanvas { margin-top: 14px; }
.course-reading-document .course-page-break { display: none; }
.course-document-layout .repere-prose hr.course-page-break { height: 0; margin: 0; padding: 0; border: 0; }
.course-document-layout .repere-prose hr.course-page-break::after { content: 'Saut dans le PDF'; left: auto; right: 0; }
.authoring-modern #studioIntroduction { padding: 0; border: 0; max-height: none; }
.course-document-introduction { max-width: min(100%, var(--course-width)); margin-inline: auto; }
.course-document-introduction .course-document-sheet { padding-block: 15px; }
.authoring-preview-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 auto 12px; max-width: 1123px; }
.authoring-preview-controls label { display: flex; gap: 8px; align-items: center; }
.authoring-document-preview .learner-course-about { width: min(100%, var(--course-width)); margin-inline: auto; }
.authoring-document-preview[data-preview-size=phone] :is(.course-document-layout,.learner-course-about) { max-width: 390px; }
.authoring-previewing :is(.studio-title-card,.authoring-intro-details,.authoring-page-layout,.authoring-ribbon,.studio-object-panel,.studio-add-end,.author-image-frame,.studio-sidebar) { display: none !important; }
.authoring-modern.authoring-previewing .studio-layout { grid-template-columns: minmax(0, 1fr); }
.learner-immersive .course-reading-document.course-document-layout { padding: 0; background: transparent; }
.reader-heading .reader-intro.course-document-prose { max-width: calc(var(--course-width) - 44px); margin-inline: auto; }
.course-reading-document.reader-enlarged .course-document-prose { font-size: var(--reader-text-size); }

.author-image-frame { position: fixed; z-index: 11; border: 1px solid #ae176c; pointer-events: none; }
.author-image-frame[hidden] { display: none; }
.author-image-frame .author-image-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: .55; }
.author-image-frame .author-image-ghost[hidden] { display: none; }
.author-image-frame button { padding: 0; pointer-events: auto; touch-action: none; color: #871056; background: white; border: 2px solid currentColor; }
.author-image-frame > button { position: absolute; }
.author-image-quick { position: absolute; z-index: 1; display: flex; gap: 2px; width: max-content; padding: 3px; border: 1px solid #e6d3df; border-radius: 8px; background: white; box-shadow: 0 3px 12px #46314124; }
.author-image-quick button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 5px; cursor: pointer; }
.author-image-quick button:is(:hover,[aria-pressed=true]) { background: #f8e8f2; }
.author-image-quick .author-image-move { cursor: move; }
.author-image-quick .author-align { pointer-events: none; }
.author-image-frame .author-image-handle { width: 13px; height: 13px; border-radius: 2px; transform: translate(-50%, -50%); }
.author-image-handle[data-edge$="w"], .author-image-handle[data-edge="w"] { left: 0; }
.author-image-handle[data-edge$="e"], .author-image-handle[data-edge="e"] { left: 100%; }
.author-image-handle:is([data-edge="n"], [data-edge="s"]) { left: 50%; cursor: ns-resize; }
.author-image-handle:is([data-edge="w"], [data-edge="e"]) { top: 50%; cursor: ew-resize; }
.author-image-handle[data-edge^="n"] { top: 0; }
.author-image-handle[data-edge^="s"] { top: 100%; }
.author-image-handle:is([data-edge="nw"], [data-edge="se"]) { cursor: nwse-resize; }
.author-image-handle:is([data-edge="ne"], [data-edge="sw"]) { cursor: nesw-resize; }
.author-image-frame button:focus-visible { outline: 3px solid #2d7491; outline-offset: 2px; }
.author-image-tools [hidden] { display: none; }

@container course-document (max-width: 36rem) {
  .course-document-prose .course-edit-image:is([data-image-mode=front], [data-image-mode=behind]) { position: relative; inset: auto !important; margin: 14px 0; }
  .course-document-prose .course-edit-image:is([data-image-mode=front], [data-image-mode=behind])[data-image-align=center] { margin-inline: auto; }
  .course-document-prose .course-edit-image:is([data-image-mode=front], [data-image-mode=behind])[data-image-align=right] { margin-inline: auto 0; }
}
.reader-enlarged .course-document-prose .course-edit-image:is([data-image-mode=front], [data-image-mode=behind]) { position: relative; inset: auto !important; margin: 14px 0; }
.reader-enlarged .course-document-prose .course-edit-image:is([data-image-mode=front], [data-image-mode=behind])[data-image-align=center] { margin-inline: auto; }
.reader-enlarged .course-document-prose .course-edit-image:is([data-image-mode=front], [data-image-mode=behind])[data-image-align=right] { margin-inline: auto 0; }
