/* 0.9.297 — Phrase en pictogrammes, correctif du dock de paramètres en paysage.
   La grille historique à onglets verticaux est désactivée uniquement sur mobile.
   Tableau, Lecture adaptée et PC inchangés.
   Base 0.9.296 : interface en deux étapes, sans réécriture du moteur.
   0.9.295 — Phrase en pictogrammes, interface paysage dans la PWA uniquement.
   Même moteur d'albums/pictos/réglages ; l'éditeur individuel partage les styles du Tableau. */
#elMobilePhraseToolbar,.el-mobile-phrase-close {display:none}
html.el-mobile-phrase,html.el-mobile-phrase body{
 width:100%!important;height:100%!important;min-height:0!important;margin:0!important;
 overflow:hidden!important;background:#fffdfa!important;overscroll-behavior:none!important
}
html.el-mobile-phrase main.app{box-sizing:border-box!important;height:100dvh!important;min-height:0!important;
 margin:0!important;padding:0!important;overflow:hidden!important;max-width:none!important;width:100%!important}
html.el-mobile-phrase main.app>.app-header,
html.el-mobile-phrase .module-switcher,
html.el-mobile-phrase #phraseSection>.panel-heading,
html.el-mobile-phrase #phraseSettingsTop,
html.el-mobile-phrase #phraseSection .phrase-preview-toolbar {display:none!important}
html.el-mobile-phrase main.app>.status {display:none!important}
html.el-mobile-phrase .workspace{height:100%!important;min-height:0!important;max-height:100%!important;
 display:block!important;overflow:hidden!important;margin:0!important;padding:0!important}
html.el-mobile-phrase #phraseSection{
 display:flex!important;flex-direction:column!important;gap:5px!important;box-sizing:border-box!important;
 height:100%!important;max-height:100%!important;min-height:0!important;width:100%!important;
 padding:5px!important;margin:0!important;border:0!important;box-shadow:none!important;overflow:hidden!important;
 background:#fffdfa!important;border-radius:0!important
}
html.el-mobile-phrase #elMobilePhraseToolbar{display:flex!important;align-items:center!important;gap:6px!important;
 flex:0 0 37px!important;min-height:37px!important;max-height:37px!important;padding:0 3px 4px!important;
 width:100%!important;overflow-x:auto!important;scrollbar-width:none!important;border-bottom:1px solid #e9dcc0!important}
html.el-mobile-phrase .el-mobile-phrase-action{appearance:none!important;display:inline-flex!important;align-items:center!important;
 justify-content:center!important;flex:0 0 auto!important;min-width:39px!important;min-height:32px!important;
 padding:4px 10px!important;border:1px solid #ddcbab!important;border-radius:10px!important;
 background:#fff!important;color:#1b304c!important;font:800 12px/1.1 inherit!important;white-space:nowrap!important;cursor:pointer!important}
html.el-mobile-phrase .el-mobile-phrase-action.is-active{background:#ffcb26!important;border-color:#b99a2d!important}
html.el-mobile-phrase #phraseSection>.phrase-compose-top{
 display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto!important;
 gap:5px!important;flex:0 0 auto!important;align-items:center!important;
 width:100%!important;min-height:47px!important;max-height:105px!important;
 margin:0!important;padding:4px 7px!important;border:1px solid #ecdfc7!important;border-radius:11px!important;
 background:#fff!important;box-shadow:none!important;box-sizing:border-box!important
}
html.el-mobile-phrase #phraseSection .phrase-compose-top>label{
 display:block!important;min-width:0!important;margin:0!important
}
html.el-mobile-phrase #phraseSection .phrase-compose-top>label>span{display:none!important}
html.el-mobile-phrase #phraseSection #phraseInput{
 display:block!important;box-sizing:border-box!important;width:100%!important;height:37px!important;min-height:37px!important;
 max-height:37px!important;padding:7px 9px!important;margin:0!important;resize:none!important;
 font-size:13px!important;line-height:1.3!important;border-radius:8px!important
}
html.el-mobile-phrase #phraseSection .phrase-compose-top .phrase-actions-row{
 display:flex!important;align-self:center!important;align-items:center!important;min-width:0!important;
 width:auto!important;gap:0!important;margin:0!important;padding:0!important;grid-template-columns:none!important
}
html.el-mobile-phrase #phraseSection #phraseSuggestButton{
 display:inline-flex!important;width:auto!important;min-height:37px!important;height:37px!important;
 padding:4px 10px!important;border-radius:8px!important;font-size:12px!important;white-space:nowrap!important
}
html.el-mobile-phrase #phraseSection #phraseClearButton{display:none!important}
html.el-mobile-phrase #phraseSection .phrase-suggestions:not(:empty){
 grid-column:1/-1!important;min-width:0!important;max-height:43px!important;
 overflow:auto!important;overscroll-behavior:contain!important;margin:0!important;padding:0!important
}
html.el-mobile-phrase #phraseWorkbench,
html.el-mobile-phrase #phraseWorkbench.library-collapsed,
html.el-mobile-phrase #phraseWorkbench.parameters-collapsed,
html.el-mobile-phrase #phraseWorkbench.library-collapsed.parameters-collapsed {
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;
 flex:1 1 0!important;min-height:0!important;max-height:100%!important;width:100%!important;
 gap:0!important;overflow:hidden!important;align-items:stretch!important;margin:0!important;padding:0!important
}
html.el-mobile-phrase:is(.el-mobile-phrase-pictos,.el-mobile-phrase-settings) #phraseWorkbench,
html.el-mobile-phrase:is(.el-mobile-phrase-pictos,.el-mobile-phrase-settings) #phraseWorkbench.library-collapsed,
html.el-mobile-phrase:is(.el-mobile-phrase-pictos,.el-mobile-phrase-settings) #phraseWorkbench.parameters-collapsed,
html.el-mobile-phrase:is(.el-mobile-phrase-pictos,.el-mobile-phrase-settings) #phraseWorkbench.library-collapsed.parameters-collapsed{
 grid-template-columns:minmax(0,2fr) minmax(0,3fr)!important
}
html.el-mobile-phrase #phraseSection .phrase-main-area{
 grid-column:1!important;grid-row:1!important;min-width:0!important;min-height:0!important;
 width:100%!important;max-width:none!important;height:100%!important;margin:0!important;padding:0!important;
 display:flex!important;flex-direction:column!important;overflow:hidden!important
}
html.el-mobile-phrase:not(.el-mobile-phrase-pictos):not(.el-mobile-phrase-settings) #phraseSection .phrase-main-area{grid-column:1/-1!important}
html.el-mobile-phrase #phraseSection .phrase-preview-panel{
 flex:1 1 0!important;display:flex!important;flex-direction:column!important;min-height:0!important;
 max-height:100%!important;overflow:hidden!important;margin:0!important;padding:0!important;width:100%!important;
 border:0!important;box-shadow:none!important
}
html.el-mobile-phrase #phraseSection #phrasePreviewWrap{
 display:flex!important;justify-content:center!important;align-items:center!important;position:relative!important;
 width:100%!important;height:100%!important;min-height:0!important;min-width:0!important;
 max-height:100%!important;flex:1 1 0!important;overflow:auto!important;overscroll-behavior:contain!important;
 margin:0!important;padding:8px!important;box-sizing:border-box!important;
 border:1px solid #ece4d5!important;border-radius:10px!important;background:#f5f2eb!important
}
html.el-mobile-phrase #phrasePreviewPage{
 display:block!important;position:relative!important;flex:0 0 auto!important;
 width:760px!important;min-width:760px!important;max-width:none!important;
 margin:auto!important;box-shadow:0 1px 6px #bcc5d0!important;transform:none!important
}
html.el-mobile-phrase #phrasePreviewPage.phrase-portrait{width:560px!important;min-width:560px!important}
html.el-mobile-phrase #phraseSection.el-phrase-no-items #phrasePreviewWrap::before{
 content:'Saisissez une phrase pour générer une bande de pictogrammes.';
 position:absolute;z-index:1;left:10%;right:10%;text-align:center;
 padding:7px;background:#fffdf9;border:1px solid #e9e0cf;border-radius:10px;
 font-size:12px;font-weight:700;color:#69778d;pointer-events:none
}
html.el-mobile-phrase #phraseSection .phrase-library-rail,
html.el-mobile-phrase #phraseSection .phrase-parameters-panel {
 grid-column:2!important;grid-row:1!important;display:none!important;visibility:visible!important;
 position:relative!important;inset:auto!important;min-width:0!important;min-height:0!important;
 width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;
 padding:7px!important;margin:0!important;border:1px solid #eee3d0!important;border-radius:10px!important;
 overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;
 -webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;background:#fffdfa!important;
 box-shadow:none!important;box-sizing:border-box!important
}
html.el-mobile-phrase.el-mobile-phrase-pictos #phraseSection #phraseLibraryRail,
html.el-mobile-phrase.el-mobile-phrase-settings #phraseSection #phraseParametersPanel{
 display:block!important
}
html.el-mobile-phrase #phraseSection .phrase-rail-header,
html.el-mobile-phrase #phraseSection .phrase-parameters-header{
 display:flex!important;justify-content:space-between!important;align-items:center!important;
 margin:0 0 5px!important;padding:0 0 5px!important;border-bottom:1px solid #eee4d2!important;
 height:auto!important;min-height:30px!important
}
html.el-mobile-phrase #phraseSection .phrase-rail-collapse,
html.el-mobile-phrase #phraseSection .phrase-rail-open,
html.el-mobile-phrase #phraseSection #phraseLibraryOpen,
html.el-mobile-phrase #phraseSection #phraseParametersOpen {display:none!important}
html.el-mobile-phrase #phraseSection .el-mobile-phrase-close{
 display:inline-grid!important;place-items:center!important;height:29px!important;width:29px!important;
 min-height:29px!important;flex:0 0 29px!important;padding:0!important;
 border:1px solid #ead7bb!important;border-radius:8px!important;background:#fff!important;
 color:#22324d!important;font-size:21px!important;line-height:1!important
}
html.el-mobile-phrase #phraseSection #phraseLibraryMount,
html.el-mobile-phrase #phraseSection #phraseLibraryMount .library-panel {
 min-width:0!important;max-width:100%!important;width:100%!important;position:static!important;
 display:block!important;margin:0!important;padding:0!important;height:auto!important;max-height:none!important;
 overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important
}
html.el-mobile-phrase #phraseSection #phraseParametersPanel:not(.is-collapsed) #phraseParametersContent.el-parameter-dock {
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 grid-template-columns:none!important;grid-template-rows:none!important;
 min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
 width:100%!important;gap:6px!important;max-height:none!important;overflow:visible!important
}
html.el-mobile-phrase #phraseSection .el-parameter-tabbar{
 display:flex!important;flex-direction:row!important;order:0!important;grid-column:auto!important;
 grid-row:auto!important;flex:0 0 auto!important;max-width:100%!important;
 width:100%!important;position:sticky!important;top:0!important;z-index:8!important;
 padding:3px!important;gap:3px!important;overflow-x:auto!important;
 background:#fffdfa!important;border:0!important;box-shadow:none!important
}
html.el-mobile-phrase #phraseSection .el-parameter-tabbar>.el-parameter-tab,
html.el-mobile-phrase #phraseSection .el-parameter-tabbar>.el-save-direct-button{
 min-height:34px!important;min-width:34px!important;height:34px!important;width:34px!important;
 flex:0 0 34px!important
}
html.el-mobile-phrase #phraseSection .el-parameter-dock-body{
 display:block!important;position:static!important;order:1!important;grid-column:auto!important;grid-row:auto!important;
 width:100%!important;min-width:0!important;max-width:100%!important;
 max-height:none!important;overflow:visible!important;padding:0!important
}
html.el-mobile-phrase #phraseSection .el-parameter-tab-panel:not([hidden]){
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important;
 min-width:0!important;max-width:100%!important;padding:3px!important
}
html.el-mobile-phrase #phraseSection .el-parameter-tab-panel[hidden]{display:none!important}
html.el-mobile-phrase #phraseSection .phrase-parameter-group{
 box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
 width:100%!important;gap:5px!important;padding:3px!important;margin:0!important
}
html.el-mobile-phrase #phraseSection .phrase-parameter-group select,
html.el-mobile-phrase #phraseSection .phrase-parameter-group input{
 max-width:100%!important;box-sizing:border-box!important
}
html.el-mobile-phrase #phraseSection .phrase-parameter-group .text-style-settings-grid{
 grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0!important;gap:5px!important
}
/* Mobile picto editor uses exactly the same modal/palette as Table (shared stylesheet). */
@media(max-height:390px){
 html.el-mobile-phrase #phraseSection #phraseInput{height:32px!important;min-height:32px!important;max-height:32px!important}
 html.el-mobile-phrase #phraseSection>.phrase-compose-top{min-height:39px!important}
}

/* Smartphone portrait : la composition est pensée pour le paysage. */
@media(orientation:portrait) and (max-width:700px){
 html.el-mobile-phrase #phraseSection::after{
   content:'Tournez le téléphone en paysage pour composer la phrase.';
   position:fixed;inset:0;z-index:80;display:grid;place-items:center;
   padding:20px;text-align:center;background:#fffaf0;color:#142740;
   font-size:17px;font-weight:800;line-height:1.4
 }
}

/* Deux étapes exclusives : composer les choix, puis personnaliser le support.
   Les blocs sont ceux de CAA, pas des duplications de formulaires. */
#elMobilePhraseComposeFooter,#elMobilePhraseClear,#elMobilePhraseValidate{display:none}
html.el-mobile-phrase.el-mobile-phrase-compose #elMobilePhraseToolbar,
html.el-mobile-phrase.el-mobile-phrase-compose #phraseWorkbench{display:none!important}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection>.phrase-compose-top{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;
 flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;
 grid-template-columns:none!important;grid-template-rows:none!important;
 overflow:hidden!important;padding:8px!important;margin:0!important;gap:7px!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection>.phrase-compose-top>label{
 display:block!important;flex:0 0 auto!important;width:100%!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection>.phrase-compose-top>label>span{
 display:block!important;color:#465874!important;font-size:11px!important;font-weight:800!important;margin-bottom:3px!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseInput{
 min-height:43px!important;height:43px!important;max-height:43px!important;font-size:15px!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection .phrase-actions-row{
 display:flex!important;width:100%!important;gap:7px!important;flex:0 0 auto!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestButton{
 flex:1 1 auto!important;min-width:0!important;max-width:none!important;font-size:13px!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #elMobilePhraseClear{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 background:#fff!important;color:#1d304b!important;border:1px solid #e8c66c!important;
 padding:5px 11px!important;min-height:37px!important;border-radius:9px!important;font-weight:800!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestions:not([hidden]){
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 align-content:start!important;align-items:start!important;gap:7px!important;
 flex:1 1 0!important;grid-column:auto!important;min-height:0!important;max-height:none!important;
 height:auto!important;width:100%!important;overflow-y:auto!important;overflow-x:hidden!important;
 touch-action:pan-y!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
 box-sizing:border-box!important;padding:2px!important;margin:0!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestions .phrase-token-row{
 min-width:0!important;max-width:100%!important;box-sizing:border-box!important;padding:7px!important;margin:0!important;
 gap:4px!important;align-self:start!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestions .phrase-token-input{
 font-size:13px!important;min-height:31px!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestions .phrase-match-grid{
 grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestions .phrase-match-option{
 min-height:63px!important;max-width:100%!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #elMobilePhraseComposeFooter{
 display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:space-between!important;
 gap:10px!important;width:100%!important;min-height:44px!important;max-height:54px!important;
 padding:3px 7px!important;margin:0!important;box-sizing:border-box!important;
 background:#fffdfa!important;border-top:1px solid #eadfc7!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #elMobilePhraseComposeCount{
 min-width:0!important;font-size:11px!important;color:#50637f!important;line-height:1.2!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #elMobilePhraseValidate{
 display:inline-flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:center!important;
 background:#ffca22!important;border:1px solid #ecb719!important;color:#192b46!important;
 min-height:37px!important;border-radius:10px!important;font-size:13px!important;font-weight:850!important;
 padding:6px 15px!important;white-space:nowrap!important;cursor:pointer!important
}
html.el-mobile-phrase.el-mobile-phrase-compose #elMobilePhraseValidate:disabled{
 background:#f2ecdc!important;border-color:#eee3cd!important;color:#8390a1!important;cursor:default!important
}
html.el-mobile-phrase.el-mobile-phrase-result #phraseSection>.phrase-compose-top,
html.el-mobile-phrase.el-mobile-phrase-result #elMobilePhraseComposeFooter{display:none!important}
html.el-mobile-phrase.el-mobile-phrase-result #phraseSection #elMobilePhraseToolbar{display:flex!important}
/* Vue de travail : la feuille A4 est recadrée par script AUTOUR des vrais pictos,
   sans dupliquer le rendu ni modifier les réglages de la sortie PDF. */
html.el-mobile-phrase.el-mobile-phrase-result #phrasePreviewWrap{
 display:block!important;overflow:auto!important;overscroll-behavior:contain!important;
 touch-action:pan-x pan-y!important;padding:0!important;text-align:left!important;
 scroll-behavior:auto!important
}
html.el-mobile-phrase.el-mobile-phrase-result #phrasePreviewPage{margin:0!important}
html.el-mobile-phrase.el-mobile-phrase-result .phrase-preview-panel{height:100%!important}
html.el-mobile-phrase.el-mobile-phrase-result #phraseSection .phrase-main-area{height:100%!important}
/* Champ de sélection indiv. et commandes CAA restent ceux de 0.9.295. */
@media (max-width:710px) and (orientation:landscape){
 html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestions .phrase-match-option img{
   height:28px!important;max-width:36px!important
 }
 html.el-mobile-phrase.el-mobile-phrase-compose #phraseSection #phraseSuggestions .phrase-match-option{
   min-height:56px!important
 }
}
