/* Règle 13 — menu unique accolé à la barre de zoom, pas de sixième bouton de zoom. */
.ef-fs-control{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;margin-left:9px}
.ef-fs-trigger{width:32px;height:32px;min-width:32px;display:grid;place-items:center;padding:0;border:1px solid #d8e2e8;border-radius:9px;background:white;color:#173b55;cursor:pointer}
.ef-fs-trigger:hover,.ef-fs-trigger:focus-visible{background:#fff1c5;border-color:#e4af22;outline-offset:2px}
.ef-fs-menu{position:absolute;z-index:100;bottom:calc(100% + 8px);right:0;width:max-content;max-width:min(270px,85vw);padding:5px;border:1px solid #dce3e8;border-radius:11px;background:white;box-shadow:0 9px 28px #15354d27}
.ef-fs-menu[hidden]{display:none!important}
.ef-fs-option{display:block;width:100%;padding:11px 10px;border:0;border-radius:7px;text-align:left;background:white;color:#183850;font:700 12px/1.3 Lexend,Arial,sans-serif;cursor:pointer}
.ef-fs-option:hover,.ef-fs-option:focus-visible{background:#fff1c3;outline:1px solid #eab628}
.ef-fs-paper-control{position:absolute;bottom:12px;right:12px;z-index:15}
.ef-fs-paper-control .ef-fs-trigger{box-shadow:0 3px 12px #17354c24}
#view-memory #memory-paper,#view-loto #loto-paper,#view-labyrinthe #lab-paper{position:relative}
.ef-fs-editor:fullscreen{width:100vw!important;height:100dvh!important;min-height:0!important;margin:0!important;padding:10px 12px!important;display:flex!important;flex-direction:column!important;gap:8px!important;overflow:hidden!important;background:#fffefa!important}
.ef-fs-editor:fullscreen>.ef-activity-header{position:sticky;top:0;flex:0 0 auto}
.ef-fs-editor:fullscreen>:is(.pin-layout,.tri-workspace,.chg-workspace,.den-workspace,.sui-workspace,.mq-workspace,.dom-shell,.loto-config,.lab-config,.puz-config,.gr-layout){flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
@media (min-width:801px){
  .ef-fs-editor:fullscreen>:is(.tri-workspace,.chg-workspace,.den-workspace,.sui-workspace,.mq-workspace,.dom-shell,.loto-workspace,.lab-workspace,.puz-workspace){display:grid!important;grid-template-columns:var(--ef-left-current,var(--ef-library-width)) minmax(0,1fr) var(--ef-right-current,var(--ef-parameters-width))!important}
}
.ef-fs-preview:fullscreen{box-sizing:border-box!important;position:relative!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:12px!important;border:0!important;border-radius:0!important;background:#eef2f2!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.ef-fs-preview .ef-fs-hidden{display:none!important}
.ef-fs-preview:fullscreen .ef-fs-path{min-width:0!important;min-height:0!important;flex:1 1 auto!important;max-width:none!important;max-height:none!important}
.ef-fs-preview:fullscreen .ef-work-viewport{height:100%!important;overflow:auto!important}
.ef-fs-preview:fullscreen .ef-fs-exit{position:absolute;right:14px;top:14px;z-index:50;display:flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid #d0d9df;border-radius:10px;background:white;color:#19394e;box-shadow:0 4px 15px #12334a24;cursor:pointer;font:700 12px Lexend,Arial,sans-serif}
.ef-fs-exit span:first-child{font:900 21px/1 Arial,sans-serif}
.ef-fs-error{position:absolute;bottom:65px;left:50%;transform:translateX(-50%);z-index:60;padding:10px 15px;max-width:90%;background:#fff5ef;border:1px solid #eaa399;border-radius:9px;font:700 12px Lexend,sans-serif}
/* En aperçu des jeux imprimables : la page conserve son ratio, et non un ratio de l'écran. */
#memory-paper-space:fullscreen,#loto-paper-space:fullscreen,.lab-paper-space:fullscreen{align-items:center!important;justify-content:center!important}
#memory-paper-space:fullscreen>.memory-paper-sheet{height:min(calc(100dvh - 30px),calc((100vw - 30px) * 210 / 297));width:auto;max-width:100%;aspect-ratio:297/210}
#loto-paper-space:fullscreen>.loto-paper-sheet,.lab-paper-space:fullscreen>.lab-paper-sheet{width:min(calc(100vw - 30px),calc((100dvh - 30px) * 297 / 210))!important;height:auto!important;max-height:100%!important;aspect-ratio:297/210}
@media print{.ef-fs-control,.ef-fs-exit,.ef-fs-menu,.ef-fs-error{display:none!important}}
/* L'aperçu seul est une consultation : supprimer les affordances d'édition
   sans retirer de données ni toucher à l'arbre utilisé pour l'impression. */
.ef-fs-preview:fullscreen :is(.gr-zone-resize){display:none!important}
.ef-fs-preview:fullscreen :is(.pin-card[aria-selected="true"],.is-selected,.gr-zone[aria-selected="true"]){outline:0!important;box-shadow:none!important}
.ef-fs-preview:fullscreen :is(.pin-sheet,.ef-zoom-board,#gr-paper){pointer-events:none!important}

/* Domino : le support seul ne permet pas de modifier la planche. */
#view-domino.ef-fs-preview .dom-board{pointer-events:none!important}

/* En plein écran éditeur : les conteneurs des trois jeux transmettent
   réellement la hauteur disponible au workspace commun. */
.ef-fs-editor:not(.ef-game-intro-active):fullscreen>:is(.loto-config,.lab-config,.puz-config){display:flex!important;flex-direction:column!important;min-height:0!important;flex:1 1 auto!important}
.ef-fs-editor:fullscreen :is(.loto-workspace,.lab-workspace,.puz-workspace){min-height:0!important;flex:1 1 auto!important}

/* L'éditeur à grille utilise le même menu plein écran que les autres supports, sous la feuille. */
#view-grille .gr-zoom-toolbar .ef-fs-control{margin-left:8px}

/* Hôte WordPress des outils CAA : même bandeau rouge et même icône fullscreen
   que les Ateliers. Aucune commande de navigation superposée dans le natif. */
#el-caa-native-launcher{display:flex;flex-direction:column;}
#el-caa-native-launcher>.ef-caa-host-header{margin:0;border-radius:0;min-height:51px;}
#el-caa-native-launcher:fullscreen>.ef-caa-host-header{display:none!important;}
#el-caa-native-launcher>.ef-caa-host-header[hidden]{display:none!important;}
#el-caa-native-launcher>.ef-caa-host-fs{position:absolute;right:12px;bottom:12px;z-index:12;box-shadow:0 2px 8px #12334a26;}
#el-caa-native-launcher-frame{flex:1 1 auto;min-height:0;height:0;}
@media print{#el-caa-native-launcher>.ef-caa-host-header,#el-caa-native-launcher>.ef-caa-host-fs{display:none!important}}

/* Tableau de communication — gabarit préservé, pourcentage fondé sur A4.
   Pas de nouvelle règle CSS de zoom : le calcul est centralisé en JS.
   Contrat de zoom et de plein écran commun.
   Limité à #tableSection, aucune règle de la feuille pédagogique n'est altérée. */
#tableSection .table-workbench{min-width:0;min-height:0}
#tableSection .table-settings-rail,#tableSection .table-parameters-panel{border-radius:var(--ef-activity-radius)}
#tableSection .table-canvas-area{display:flex!important;flex-direction:column!important;gap:8px!important;min-height:0;overflow:hidden!important}
#tableSection .ef-tool-stage{flex:1 1 auto;min-height:0;min-width:0;width:100%;display:flex;align-items:flex-start;justify-content:flex-start;overflow:auto;overscroll-behavior:contain;background:#eef2f2;border-radius:14px;padding:15px}
#tableSection .ef-tool-stage .board-shell{flex:none!important;max-height:none!important;overflow:visible!important;margin:0 auto!important}
#tableSection .ef-tool-zoom-toolbar{flex:none;display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;max-width:100%;font:700 12px Lexend,Arial,sans-serif}
#tableSection .ef-tool-stage.ef-tool-hand{cursor:grab;touch-action:none}
#tableSection .ef-tool-stage.ef-tool-hand:active{cursor:grabbing}
#tableSection.ef-fs-editor:fullscreen{background:#fffefa!important}
#tableSection.ef-fs-editor:fullscreen .table-workbench{display:grid!important;flex:1 1 auto!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:hidden!important;grid-template-columns:var(--ef-library-width) minmax(0,1fr) var(--ef-parameters-width)!important;gap:var(--ef-activity-gap)!important}
#tableSection.ef-fs-editor:fullscreen .table-workbench.sidebar-collapsed{grid-template-columns:48px minmax(0,1fr) var(--ef-parameters-width)!important}
#tableSection.ef-fs-editor:fullscreen .table-workbench.parameters-collapsed{grid-template-columns:var(--ef-library-width) minmax(0,1fr) 46px!important}
#tableSection.ef-fs-editor:fullscreen .table-workbench.sidebar-collapsed.parameters-collapsed{grid-template-columns:48px minmax(0,1fr) 46px!important}
#tableSection.ef-fs-editor:fullscreen .table-canvas-area{height:100%!important}
#tableSection.ef-fs-editor:fullscreen .table-parameters-panel:not(.is-collapsed){height:100%!important;min-height:0!important}
#tableSection.ef-fs-editor:fullscreen .table-settings-rail{height:100%!important;min-height:0!important}
#boardShell.ef-fs-preview:fullscreen{zoom:1!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;box-sizing:border-box!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;overflow:auto!important;background:#eef2f2!important}
#boardShell.ef-fs-preview:fullscreen #board{pointer-events:none!important;max-width:100%;max-height:100%;margin:auto;flex:0 1 auto}
@media(max-width:1000px){#tableSection.ef-fs-editor:fullscreen .table-workbench{display:flex!important;flex-direction:column!important;overflow:auto!important}#tableSection.ef-fs-editor:fullscreen .table-settings-rail,#tableSection.ef-fs-editor:fullscreen .table-parameters-panel{height:auto!important;min-height:60px!important;max-height:none!important;flex:none}}
/* Phrase, Semainier et Lecture adaptée réutilisent la scène dimensionnée des Ateliers.
   Le conteneur possède le scroll ; la feuille conserve sa composition native.
   Aucune échelle CSS n'est appliquée directement aux cases ou aux pictos. */
:is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom-viewport{
  min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;
}
:is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom-stage{
  box-sizing:content-box;flex:none;min-width:0;min-height:0;position:relative;
}
:is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom-board{
  box-sizing:border-box;position:absolute;left:0;top:0;transform-origin:top left;
}
:is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom-viewport.ef-tool-hand{
  cursor:grab;touch-action:none;
}
:is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom-viewport.ef-tool-hand:active{
  cursor:grabbing;
}
#weekSection .week-visual-panel:has(> .el-communication-week-viewport){
  display:flex;flex-direction:column;min-height:0;min-width:0;
  height:100%;max-height:100%;overflow:hidden;
  width:100%;max-width:100%;box-sizing:border-box;
}
#weekSection .el-communication-week-viewport{
  display:flex;align-items:flex-start;justify-content:flex-start;
  flex:1 1 0;min-width:0;min-height:0;height:0;
  width:100%;max-width:100%;overflow:auto;
  padding:12px;box-sizing:border-box;background:#eef2f2;border-radius:12px;
}
#albumSection .el-communication-album-viewport{
  display:flex;align-items:flex-start;justify-content:flex-start;
  width:100%;min-width:0;min-height:0;height:auto;grid-row:2;
  overflow:auto;overscroll-behavior:contain;
}
#albumSection .el-communication-album-viewport[hidden]{display:none!important}
#phraseSection #phrasePreviewWrap.el-communication-zoom-viewport{align-items:flex-start;justify-content:flex-start}
@media(min-width:1001px){
  /* Gabarit bureau : la hauteur de référence est celle mesurée sur le Tableau
     (hauteur fenêtre - 220 px). L'intérieur peut défiler, jamais les panneaux. */
  :is(#phraseSection .phrase-main-area,#weekSection .week-main-area){
    box-sizing:border-box;height:max(300px,calc(100dvh - 220px));max-height:max(300px,calc(100dvh - 220px));
    min-height:0;overflow:hidden;
  }
  /* Phrase : même cadre utile que le Tableau. La feuille ne dimensionne
     jamais le viewport : le conteneur prend la place disponible du panneau. */
  #phraseSection .phrase-main-area{
    display:flex!important;flex-direction:column!important;
    height:max(300px,calc(100dvh - 220px))!important;
    max-height:max(300px,calc(100dvh - 220px))!important;
    min-height:0!important;overflow:hidden!important;
  }
  #phraseSection .phrase-main-area > .phrase-preview-panel{
    display:flex!important;flex-direction:column!important;
    flex:1 1 0!important;height:100%!important;min-height:0!important;
    overflow:hidden!important;box-sizing:border-box;
  }
  #phraseSection #phrasePreviewWrap.el-communication-zoom-viewport{
    display:flex!important;flex:1 1 0!important;
    height:0!important;min-height:0!important;max-height:none!important;
    width:100%!important;min-width:0!important;
    align-self:stretch!important;overflow:auto!important;box-sizing:border-box;
  }
  #weekSection .week-main-area{display:flex;flex-direction:column;min-height:0;min-width:0}
  #weekSection .week-visual-panel{min-height:0;min-width:0;flex:1 1 0;overflow:hidden}
  #albumSection .album-preview-panel:has(> #albumPageEditorMount:empty)>.el-communication-album-viewport{grid-row:1}
  #albumSection .album-preview-panel>.el-communication-zoom{grid-row:3}
  #albumSection .album-preview-panel:has(> #albumPageEditorMount:empty)>.el-communication-zoom{grid-row:2}
}
@media print{
  :is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom-stage{width:auto!important;height:auto!important;display:contents!important}
  :is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom-board{position:static!important;display:contents!important;transform:none!important}
}
/* Phrase, Semainier, Lecture adaptée : même barre sous l’aperçu central.
   Seul l’aperçu est zoomé, les bibliothèques et les paramètres restent à 100 %. */
:is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom{
  display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;
  margin:8px auto 2px;max-width:100%;flex:none;font:700 12px Lexend,Arial,sans-serif;
}
:is(#phraseSection,#weekSection,#albumSection) :is(#phrasePreviewWrap,.week-visual-panel,#albumPreviewSpread){min-width:0}
:is(#phraseSection,#weekSection,#albumSection) .ef-tool-hand{cursor:grab;touch-action:none}
:is(#phraseSection,#weekSection,#albumSection) .ef-tool-hand:active{cursor:grabbing}
:is(#phraseSection,#weekSection,#albumSection).ef-fs-editor:fullscreen>.tool-workbench,
#albumSection.ef-fs-editor:fullscreen .album-preview-layout{min-height:0!important;flex:1 1 auto!important;overflow:hidden!important}
:is(#phraseSection,#weekSection).ef-fs-editor:fullscreen>.tool-workbench{display:grid!important;grid-template-columns:var(--ef-library-width,270px) minmax(0,1fr) var(--ef-parameters-width,384px)!important;gap:12px!important}
#albumSection.ef-fs-editor:fullscreen .album-preview-layout{display:grid!important;grid-template-columns:var(--ef-library-width,270px) minmax(0,1fr) var(--ef-parameters-width,384px)!important;gap:12px!important}
:is(#phraseSection,#weekSection,#albumSection).ef-fs-editor:fullscreen :is(.phrase-main-area,.week-main-area,.album-preview-panel){height:100%!important;max-height:none!important;min-height:0!important;overflow:auto!important}
:is(#phrasePreviewPage,#weekSheet,#albumPreviewSpread).ef-fs-preview:fullscreen{transform:none!important;width:100vw!important;height:100dvh!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#eef2f2!important}
@media(max-width:1000px){:is(#phraseSection,#weekSection).ef-fs-editor:fullscreen>.tool-workbench{display:flex!important;flex-direction:column!important;overflow:auto!important}#albumSection.ef-fs-editor:fullscreen .album-preview-layout{grid-template-columns:1fr!important}}
@media print{#tableSection .ef-tool-zoom-toolbar,#tableSection .ef-tool-stage{display:contents!important}#tableSection .ef-tool-stage .board-shell{zoom:1!important}:is(#phraseSection,#weekSection,#albumSection) .el-communication-zoom{display:none!important}}


/* Accès gratuit : état visuel commun des commandes réservées aux abonnés. */
.el-subscriber-locked{opacity:.38!important;background:#f4f4f2!important;color:#627487!important;cursor:not-allowed!important;}
