:root{
  --ink:#1a1a1a;          /* texte courant : NOIR */
  --ink-soft:#4a4a4a;
  --muted:#5b6472;        /* gris secondaire — assombri pour le contraste WCAG AA (>=4.5:1) */
  --navy:#1C2A6B;         /* bleu foncé marine — accents/brand */
  --blue:#3A57D0;         /* bleu royal — boutons/CTA/actif */
  --blue-pale:#EBF0FB;    /* bleu très clair — décor */
  --gray-pale:#F4F5F7;    /* gris très clair — décor */
  --gray-panel:#F7F8FA;
  --line:#e6e8ec;
  --line-2:#d8dbe2;
  --gold:#C7A33E;         /* OR VRAI — accent parcimonieux */
  --white:#ffffff;        /* ZONE D'ÉDITION : blanc pur */
  --danger:#c0392b;
  --warn:#b7791f;
  --ok:#1f7a4d;
  --shadow:0 8px 30px rgba(28,42,107,.07);
}
body.dark{
  --ink:#eef1f7; --ink-soft:#c4ccda; --muted:#8b94a8;
  --navy:#9fb0e8; --blue:#6f8ef0; --blue-pale:#1b2230; --gray-pale:#161b25;
  --gray-panel:#141923; --line:#2a3340; --line-2:#36404f; --white:#0f141c;
  --shadow:0 10px 40px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--gray-pale); color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:14px;
}
button{font:inherit; cursor:pointer}
/* Accessibilité : lien d'évitement (visible seulement au focus clavier) */
.lxb-skip{position:absolute; left:8px; top:-48px; z-index:200; background:var(--blue); color:#fff; padding:10px 16px; border-radius:8px; font-size:14px; font-weight:600; text-decoration:none; transition:top .15s ease}
.lxb-skip:focus{top:8px; outline:2px solid #fff; outline-offset:2px}

.lxb{
  height:100vh; display:grid;
  grid-template-rows:auto auto 1fr auto;
  background:var(--gray-pale);
}

/* ---- Barre du haut ---- */
.lxb-top{
  display:flex; align-items:center; gap:14px; padding:7px 14px;
  background:var(--white); border-bottom:1px solid var(--line);
}
/* Accessibilité : boutons du nav agrandis (handicap / malvoyants) + focus clavier visible — nav BLANC */
.lxb-top .lxb-menu>button{font-size:15px; padding:7px 12px; font-weight:500; color:var(--ink)}
.lxb-top .lxb-lang button{font-size:13px; padding:6px 13px}
.lxb-top .lxb-btn{font-size:14px; padding:8px 14px}
.lxb-top .lxb-menu>button:focus-visible, .lxb-top .lxb-btn:focus-visible, .lxb-top .lxb-lang button:focus-visible{outline:2px solid var(--blue); outline-offset:2px}
.lxb-brand{display:flex; align-items:center; gap:9px; text-decoration:none; margin-right:16px; padding-right:16px; border-right:1px solid var(--line)}
.lxb-brand:hover{opacity:.88}
.lxb-logo{height:58px; width:auto; display:block}
.lxb-product{font-weight:600; color:var(--navy); font-size:15px}
body.dark .lxb-product{color:var(--navy)}
.lxb-menus{display:flex; gap:2px}
.lxb-menu{position:relative}
.lxb-menu>button{
  background:transparent; border:0; color:var(--ink); padding:5px 9px;
  border-radius:6px; font-size:13px;
}
.lxb-menu>button:hover{background:var(--gray-pale)}
.lxb-dropdown{
  position:absolute; top:100%; left:0; min-width:210px; z-index:50;
  background:var(--white); border:1px solid var(--line); border-radius:10px;
  box-shadow:var(--shadow); padding:6px; display:none;
}
.lxb-menu.open .lxb-dropdown{display:block}
.lxb-dropdown button{
  display:block; width:100%; text-align:left; background:transparent; border:0;
  color:var(--ink); padding:7px 10px; border-radius:7px; font-size:13px;
}
.lxb-dropdown button:hover{background:var(--blue-pale)}
.lxb-actions{margin-left:auto; display:flex; align-items:center; gap:8px}
/* Bouton Recompiler + menu d'options (façon Overleaf) */
.lxb-compile{position:relative; display:inline-flex; align-items:stretch; border-radius:10px; box-shadow:0 0 0 2px var(--gold), 0 2px 12px rgba(199,163,62,.40)}
.lxb-compile #btnCompile{border-top-right-radius:0; border-bottom-right-radius:0; font-size:15px; font-weight:700; padding:11px 18px}
.lxb-compile .lxb-rb-toggle{border-top-left-radius:0; border-bottom-left-radius:0; display:flex; align-items:center; justify-content:center; height:auto; align-self:stretch; padding:0 11px; min-width:0; border-left:1px solid rgba(255,255,255,.35); font-size:13px; line-height:1}
/* Barre du bouton Recompiler dans le volet droit, JUSTE au-dessus de PDF / Journal */
.lxb-pdf-actions{display:flex; align-items:center; justify-content:flex-start; padding:9px 12px; background:var(--gray-panel); border-bottom:1px solid var(--line); overflow:visible; flex:none}
.lxb-pdf-actions .lxb-compile{align-items:stretch}
/* Accessibilité : focus clavier visible sur toute la page */
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible{outline:2px solid var(--blue); outline-offset:2px}
.lxb-compile-menu{left:auto; right:0; min-width:248px}
.lxb-rb-menu.open>.lxb-compile-menu{display:block}
.lxb-dd-h{font-size:10.5px; color:var(--muted); padding:7px 10px 3px; text-transform:uppercase; letter-spacing:.05em; font-weight:600}
.lxb-dd-sep{height:1px; background:var(--line); margin:5px 4px}
.lxb-compile-menu button{position:relative; padding-right:26px}
.lxb-compile-menu button.is-on{color:var(--blue); font-weight:600}
.lxb-compile-menu button.is-on::after{content:"✓"; position:absolute; right:10px; color:var(--blue)}
.lxb-compile-menu button[disabled]{opacity:.4; cursor:default}
.lxb-lang{display:inline-flex; border:1px solid var(--line-2); border-radius:999px; overflow:hidden}
.lxb-lang button{background:transparent; border:0; padding:4px 11px; font-size:12px; color:var(--ink)}
.lxb-lang button.active{background:var(--blue); color:#fff}
.lxb-btn{
  border:1px solid var(--line-2); background:var(--white); color:var(--ink);
  padding:6px 12px; border-radius:8px; font-size:13px;
}
.lxb-btn:hover{border-color:var(--blue)}
.lxb-btn.primary{background:var(--blue); border-color:var(--blue); color:#fff}
.lxb-btn.primary:hover{filter:brightness(1.05)}
.lxb-btn.navy{background:var(--navy); border-color:var(--navy); color:#fff}
.lxb-btn.ghost{background:transparent}
.lxb-btn.small{padding:4px 9px; font-size:12px; border-radius:7px}

/* ---- Ruban ---- */
.lxb-ribbon{
  display:flex; align-items:center; gap:3px; flex-wrap:wrap;
  padding:5px 12px; background:var(--gray-panel); border-bottom:1px solid var(--line);
}
.lxb-ribbon button{
  min-width:42px; height:40px; padding:0 11px; border:1px solid var(--line-2);
  background:var(--white); color:var(--navy); border-radius:8px; font-size:18px;
}
.lxb-ribbon button:hover{background:var(--blue-pale); border-color:var(--blue); color:var(--navy)}
/* Jeu d'icônes SVG homogène (trait régulier, même taille optique) — fini les emoji */
.lxb-ribbon button svg, .lxb-rb-toggle svg{width:19px; height:19px; display:inline-block; vertical-align:-4px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round}
/* Gouttière d'erreurs (point rouge sur la ligne fautive) */
.lxb-err-gutter{width:16px}
.CodeMirror .lxb-err-mark{color:var(--danger); font-size:14px; line-height:1; text-align:center; cursor:pointer}
/* Recherche multi-fichiers (tout le livre) */
.lxb-search{position:fixed; top:64px; left:50%; transform:translateX(-50%); z-index:300; width:min(720px,92vw); max-height:72vh; display:flex; flex-direction:column; background:var(--white); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); overflow:hidden}
.lxb-search[hidden]{display:none}
.lxb-search-bar{display:flex; align-items:center; gap:10px; padding:10px 12px; border-bottom:1px solid var(--line)}
.lxb-search-bar input{flex:1; border:1px solid var(--line-2); border-radius:8px; padding:10px 12px; font:inherit; font-size:15px; background:var(--white); color:var(--ink)}
.lxb-search-count{font-size:13px; color:var(--muted); white-space:nowrap}
.lxb-search-results{overflow:auto; padding:6px}
.lxb-search-fname{font-size:12px; font-weight:700; color:var(--navy); padding:7px 8px 3px}
.lxb-search-hit{display:block; width:100%; text-align:left; background:transparent; border:0; border-radius:6px; padding:6px 8px; font-size:13px; color:var(--ink-soft); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer}
.lxb-search-hit:hover{background:var(--blue-pale)}
.lxb-search-hit mark{background:#ffe58a; color:#1a1a1a; border-radius:2px; padding:0 1px}
.lxb-search-ln{display:inline-block; min-width:34px; color:var(--muted); font-variant-numeric:tabular-nums; margin-right:8px}
.lxb-search-empty{padding:18px; text-align:center; color:var(--muted)}
/* SyncTeX : surlignage de la ligne source + flash sur le PDF */
.CodeMirror .lxb-syncline{background:rgba(58,87,208,.16)}
.lxb-pdf-flash{position:absolute; z-index:4; pointer-events:none; background:rgba(247,201,72,.40); border:1.5px solid #d4af37; border-radius:3px; box-shadow:0 0 0 2px rgba(212,175,55,.25); animation:lxbflash 1.9s ease forwards}
@keyframes lxbflash{0%{opacity:0}12%{opacity:1}70%{opacity:1}100%{opacity:0}}
.lxb-ribbon .sep{width:1px; height:18px; background:var(--line-2); margin:0 4px}
.lxb-spacer{flex:1}
.lxb-count{color:var(--muted); font-size:12px}

/* ---- Corps 3 volets ---- */
.lxb-body{
  display:grid;
  grid-template-columns:var(--col-left,300px) 7px minmax(220px,1fr) 7px var(--col-right,440px);
  grid-row:3; min-height:0; background:var(--gray-pale); gap:0;
}
/* Lignes de grille FIXES pour les 4 bandes de .lxb (haut / ruban / corps / pied).
   Sans ca, masquer le ruban en mode Word/Plume (display:none) decale .lxb-body HORS
   de la rangee 1fr (auto-placement) -> le corps s'effondre a la hauteur du contenu,
   ce qui vidait l'editeur en plein ecran. On epingle chaque bande a sa rangee. */
.lxb-top{grid-row:1}
.lxb-ribbon{grid-row:2}
.lxb-foot{grid-row:4}
.lxb-split{background:var(--line); cursor:col-resize; position:relative; touch-action:none; z-index:5}
.lxb-split:hover,.lxb-split.dragging{background:var(--blue)}
.lxb-split::before{content:""; position:absolute; top:0; bottom:0; left:-5px; right:-5px}
/* Poignée visible : on voit qu'on peut glisser le mur pour agrandir la zone de conversation. */
.lxb-split::after{content:""; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:3px; height:42px; border-radius:3px; background:rgba(11,31,77,.22); transition:background .15s}
.lxb-split:hover::after,.lxb-split.dragging::after{background:#fff}

/* Volet gauche */
.lxb-left{display:flex; flex-direction:column; min-height:0; background:var(--gray-panel); border-right:1px solid var(--line)}
.lxb-tabs{display:flex; border-bottom:1px solid var(--line)}
.lxb-tab{flex:1; background:transparent; border:0; padding:11px 4px; font-size:14px; color:var(--muted); border-bottom:2px solid transparent}
.lxb-tab.active{color:var(--ink); border-bottom-color:var(--blue); font-weight:500}
.lxb-tabpane{padding:10px; overflow:auto; min-height:0; flex:1}
.lxb-tabpane[hidden]{display:none}
.lxb-outline a{display:block; padding:4px 6px; border-radius:6px; color:var(--ink); text-decoration:none; font-size:13px; cursor:pointer}
.lxb-outline a:hover{background:var(--blue-pale)}
.lxb-outline a.lvl-part{font-weight:600; color:var(--navy); margin-top:6px}
.lxb-outline a.lvl-chapter{padding-left:14px; color:var(--ink-soft)}
.lxb-outline a.lvl-section{padding-left:14px; color:var(--ink-soft)}
.lxb-outline a.lvl-subsection{padding-left:26px; color:var(--muted); font-size:12px}
.lxb-files .file{display:flex; align-items:center; gap:6px; padding:5px 7px; border-radius:6px; font-size:13px; color:var(--ink-soft)}
.lxb-files .file.active{background:var(--blue-pale); color:var(--navy)}
.lxb-ia-head{display:flex; align-items:center; gap:8px; font-weight:600; color:var(--ink); margin-bottom:8px}
.lxb-ia-spark{color:var(--gold)}
.lxb-ia-cube{width:26px; height:26px; object-fit:contain; display:inline-block; flex:none}
.lxb-ia-title{font-weight:700; color:var(--navy); font-size:15px}
.lxb-ia-actions{display:flex; gap:6px; margin-bottom:10px}
.lxb-ia-list{display:flex; flex-direction:column; gap:7px}
.lxb-ia-card{background:var(--white); border:1px solid var(--line); border-left:3px solid var(--blue); border-radius:0 8px 8px 0; padding:7px 9px}
.lxb-ia-card.warn{border-left-color:var(--gold)}
.lxb-ia-card.err{border-left-color:var(--danger)}
.lxb-ia-card .k{font-size:10px; text-transform:uppercase; letter-spacing:.3px; color:var(--muted)}
.lxb-ia-card .m{font-size:12.5px; color:var(--ink); margin:3px 0 6px}
.lxb-ia-card .row{display:flex; gap:6px}
.lxb-ia-card .row button{font-size:11px; padding:3px 9px; border-radius:6px; border:1px solid var(--line-2); background:var(--white); color:var(--ink-soft)}
.lxb-ia-card .row button.go{background:var(--blue); border-color:var(--blue); color:#fff}
.lxb-ia-note{margin-top:10px; font-size:11px; color:var(--muted); line-height:1.4}

/* Volet central — ZONE D'ÉDITION BLANCHE */
.lxb-center{display:flex; flex-direction:column; min-width:0; min-height:0; background:var(--white); border-right:1px solid var(--line)}
.lxb-center-head{display:flex; align-items:center; gap:10px; padding:6px 12px; border-bottom:1px solid var(--line); background:var(--white)}
.lxb-codetabs{display:inline-flex; border:1px solid var(--line-2); border-radius:999px; overflow:hidden}
.lxb-ctab{background:transparent; border:0; padding:8px 16px; font-size:14px; color:var(--ink-soft)}
.lxb-ctab.active{background:var(--blue); color:#fff}
.lxb-breadcrumb{font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lxb-editor-wrap{position:relative; flex:1; min-height:0; overflow:hidden; background:var(--white)}
.lxb-editor-wrap .CodeMirror{height:100%; font-family:"Cascadia Code","Fira Code",ui-monospace,monospace; font-size:13.5px; background:var(--white); color:var(--ink)}
.lxb-visual{position:absolute; inset:0; overflow:auto; padding:26px 34px; background:var(--white); color:var(--ink); line-height:1.7; display:none}
.lxb-visual h1{font-size:22px} .lxb-visual h2{font-size:18px} .lxb-visual h3{font-size:16px}
.lxb-visual .callout{border-left:3px solid var(--navy); background:var(--blue-pale); padding:10px 12px; margin:12px 0; border-radius:0 6px 6px 0}
.lxb-visual .eq{margin:10px 0; text-align:center}
.lxb-log{border-top:1px solid var(--line); background:var(--gray-panel); max-height:170px; display:flex; flex-direction:column}
.lxb-log-head{display:flex; align-items:center; justify-content:space-between; padding:6px 12px; font-size:12px; font-weight:500}
.lxb-log-head button{background:transparent; border:0; font-size:16px; color:var(--muted)}
.lxb-diags{overflow:auto; padding:0 12px 10px}
.lxb-diag{display:flex; gap:8px; padding:5px 6px; border-radius:6px; font-size:12.5px; cursor:pointer}
.lxb-diag:hover{background:var(--white)}
.lxb-diag .badge{flex:none; font-size:10px; padding:1px 6px; border-radius:5px}
.lxb-diag.err .badge{background:#fdecea; color:var(--danger)}
.lxb-diag.warn .badge{background:#fdf6e3; color:var(--warn)}
.lxb-diag .loc{color:var(--muted); flex:none}

/* Volet droit — PDF */
.lxb-right{display:flex; flex-direction:column; min-height:0; background:var(--gray-pale)}
.lxb-pdf-head{display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; padding:6px 12px; border-bottom:1px solid var(--line); background:var(--gray-panel)}
.lxb-pdf-title{font-size:12px; color:var(--ink-soft)}
.lxb-pdf-tools{display:flex; align-items:center; gap:4px; font-size:12px; color:var(--muted)}
.lxb-pdf-tools button{background:var(--white); border:1px solid var(--line-2); min-width:36px; height:34px; padding:0 9px; border-radius:7px; color:var(--navy); cursor:pointer; font-size:16px; font-weight:600}
.lxb-pdf-tools button:hover{background:var(--blue-pale); border-color:var(--blue); color:var(--navy)}
.lxb-pginput{font-size:14px; height:34px}
.lxb-pgtot, #pdfZoom{font-size:13px; color:var(--ink-soft); font-weight:600}
.lxb-pdf-tools .psep{width:1px; height:15px; background:var(--line-2); display:inline-block; margin:0 2px}
.lxb-pginfo{font-size:11px; color:var(--muted); min-width:46px; text-align:center}
.lxb-pdf-pane{flex:1; overflow:auto; padding:14px; display:flex; flex-direction:column; align-items:center; gap:12px}
.lxb-pdf-empty{margin:auto; color:var(--muted); font-size:13px; text-align:center; max-width:200px}
#pdfPages{display:flex; flex-direction:column; gap:12px; align-items:center}
#pdfPages canvas{background:#fff; box-shadow:var(--shadow); border:1px solid var(--line); display:block}
#pdfPages .pdfpage-ph{background:#fff; box-shadow:var(--shadow); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:11px; min-height:60px}
/* PDF cliquable : couche de liens (annotations) superposée à chaque page, comme Overleaf */
.pdf-annot{position:absolute; top:0; left:0; width:100%; height:100%; z-index:2}
.pdf-annot .pdf-link{position:absolute; display:block; cursor:pointer; background:transparent; border-radius:2px; transition:background .12s ease, box-shadow .12s ease}
.pdf-annot .pdf-link:hover{background:rgba(37,99,235,.16); box-shadow:0 0 0 1px rgba(37,99,235,.45)}
.lxb-pginput{width:44px; text-align:center; border:1px solid var(--line-2); border-radius:5px; font-size:11px; padding:2px 3px; background:var(--white); color:var(--ink)}
.lxb-pgtot{font-size:11px; color:var(--muted)}

/* Statut */
.lxb-status{display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; padding:6px 14px; background:var(--white); border-top:1px solid var(--line); font-size:12px; color:var(--muted)}
/* Footer : statut à gauche, compte + abonnement à droite */
.lxb-foot-l{display:flex; align-items:center; gap:10px; justify-self:start; font-size:12px}
.lxb-foot-r{display:flex; align-items:center; justify-content:center; gap:20px; justify-self:center; font-size:13.5px}
.lxb-plan{color:var(--ink-soft); font-weight:500}
.lxb-plan b{color:var(--navy); font-weight:700}
.lxb-foot-link{background:transparent; border:0; color:var(--blue); font-size:13.5px; font-weight:600; cursor:pointer; text-decoration:none; padding:4px 8px; border-radius:6px}
.lxb-foot-link:hover{text-decoration:underline; background:var(--blue-pale)}
.lxb-foot-link:focus-visible{outline:2px solid var(--blue); outline-offset:2px}
@media (max-width:760px){ .lxb-status{grid-template-columns:1fr} .lxb-foot-l{display:none} .lxb-foot-r{justify-self:center} }
.lxb-subpop{position:fixed; right:14px; bottom:36px; z-index:120; width:330px; background:var(--white); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:14px 16px}
.lxb-subpop[hidden]{display:none}
.lxb-subpop-h{font-weight:700; color:var(--navy); margin-bottom:6px}
.lxb-subpop-p{font-size:13px; color:var(--ink); line-height:1.5; margin:0 0 12px}
.lxb-subpop-acts{display:flex; gap:8px; justify-content:flex-end}
/* ---- Footer LANXAS : logo officiel + barre or + boutons obligatoires (2 lignes) ---- */
.lxbk-footer{background:var(--white); border-top:1px solid var(--line); padding:18px 28px}
.lxbk-footer .foot-bottom{display:flex; flex-direction:column; gap:12px}
.lxbk-footer .foot-row{display:flex; align-items:center; gap:18px; flex-wrap:wrap; justify-content:center}
.lxbk-footer .foot-logo{display:inline-flex; align-items:center; flex:none}
.lxbk-footer .foot-logo img{height:30px; width:auto; display:block}
.lxbk-footer .foot-bar{flex:none; width:2px; height:26px; border-radius:2px; background:linear-gradient(180deg,#f3d984,#C7A33E)}
.lxbk-footer .foot-links{display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px 16px}
.lxbk-footer .foot-links a{font-size:14px; color:var(--ink); text-decoration:none; font-weight:600; padding:4px 8px; border-radius:6px}
.lxbk-footer .foot-links a:hover{color:var(--blue); text-decoration:underline; background:var(--blue-pale)}
.lxbk-footer .foot-links a:focus-visible{outline:2px solid var(--blue); outline-offset:2px}
.lxbk-footer .foot-copy{font-size:13px; color:var(--ink-soft); text-align:center; border-top:1px solid var(--line); padding-top:12px}
@media (max-width:600px){ .lxbk-footer .foot-bar{display:none} }

/* Volet IA = chat */
.lxb-tabpane[data-pane="ia"]:not([hidden]){display:flex; flex-direction:column; min-height:0}
.lxb-chat{flex:1; min-height:0; overflow:auto; display:flex; flex-direction:column; gap:8px; padding:2px}
.lxb-chat-empty{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:14px; min-height:150px}
.lxb-empty-spark{font-size:30px; color:var(--gold); margin-bottom:12px; line-height:1}
/* Cube de l'IA White, entouré d'un trait très fin en or. */
.lxb-empty-cube{width:78px; height:78px; display:flex; align-items:center; justify-content:center; margin-bottom:16px; border:1px solid var(--gold); border-radius:50%; background:#fff; box-shadow:0 2px 14px rgba(11,31,77,.07)}
.lxb-empty-cube img{width:48px; height:48px; object-fit:contain; display:block}
.lxb-empty-cube.noimg{font-size:30px; color:var(--gold); border-color:var(--gold)}
.lxb-empty-title{font-size:21px; font-weight:700; color:var(--navy); letter-spacing:.2px}
/* Images réaffichées dans Visuel / Plume après rechargement */
.vfig{margin:14px auto; text-align:center}
.vfig img{max-width:85%; height:auto; border-radius:6px; box-shadow:0 1px 8px rgba(11,31,77,.08)}
.vfig figcaption{font-size:13px; color:var(--muted); margin-top:6px; font-style:italic}
.vmiss{display:inline-block; padding:8px 12px; border:1px dashed var(--gold); border-radius:6px; color:var(--muted); font-size:13px}
.plm-img{border-radius:6px}
/* En-tête IA : boutons icônes (nouvelle conv / archives) */
.lxb-ia-headspacer{flex:1}
.lxb-ia-iconbtn{background:transparent; border:1px solid var(--line-2); color:var(--navy); width:30px; height:30px; border-radius:8px; font-size:15px; line-height:1; cursor:pointer}
.lxb-ia-iconbtn:hover{background:var(--blue-pale); border-color:var(--blue)}
/* Archive des conversations */
.lxb-ia-archive{background:var(--white); border:1px solid var(--line); border-radius:10px; margin-bottom:8px; max-height:240px; overflow:auto; padding:6px}
.lxb-ia-archive[hidden]{display:none}
.lxb-ia-archive-h{font-size:11px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; padding:5px 6px}
.lxb-ia-archive-empty{padding:16px; text-align:center; color:var(--muted); font-size:13px}
.lxb-ia-rec{display:flex; align-items:center; gap:4px; border-radius:8px}
.lxb-ia-rec:hover,.lxb-ia-rec.active{background:var(--blue-pale)}
.lxb-ia-rec-t{flex:1; text-align:left; background:transparent; border:0; color:var(--ink); font-size:13px; padding:8px 9px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lxb-ia-rec-x{background:transparent; border:0; color:var(--muted); cursor:pointer; font-size:12px; padding:7px 9px; border-radius:6px}
.lxb-ia-rec-x:hover{color:var(--danger)}
.lxb-msg{font-size:12.5px; line-height:1.5; border-radius:10px; padding:7px 10px; max-width:96%; white-space:pre-wrap; word-wrap:break-word; overflow-wrap:anywhere}
.lxb-msg.user{align-self:flex-end; background:var(--blue); color:#fff; border-bottom-right-radius:3px}
.lxb-msg.ai{align-self:flex-start; background:#e9f1ff; color:var(--navy); border:1px solid #cfe0ff; border-bottom-left-radius:3px}
.lxb-msg .ins{display:inline-block; margin-top:8px; font-size:12.5px; font-weight:600; padding:6px 12px; border:1px solid var(--blue); border-radius:7px; background:var(--blue); color:#fff; cursor:pointer}
.lxb-msg .ins:hover{filter:brightness(1.05)}
.lxb-msg .ins.undo{background:var(--white); color:var(--navy); border-color:var(--line-2)}
.lxb-msg .ins.undo:hover{border-color:var(--navy); filter:none}
.lxb-msg-code{margin:8px 0 2px; padding:9px 11px; background:var(--gray-panel); border:1px solid var(--line); border-radius:8px; font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace; font-size:12px; line-height:1.45; white-space:pre-wrap; word-break:break-word; color:var(--ink); max-height:300px; overflow:auto}
.lxb-chatform{display:flex; gap:8px; align-items:flex-end; padding:12px 2px 4px; margin-top:8px; border-top:1px solid var(--line)}
.lxb-chatform textarea{flex:1; resize:none; border:1.5px solid var(--line-2); border-radius:16px; padding:13px 16px; font:inherit; font-size:14.5px; background:var(--white); color:var(--ink); max-height:170px; line-height:1.5; box-shadow:0 1px 3px rgba(28,42,107,.05); transition:border-color .12s ease, box-shadow .12s ease}
.lxb-chatform textarea:focus{outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(58,87,208,.13)}
.lxb-chatform button{flex:none; width:46px; height:46px; border-radius:50%; border:0; background:var(--blue); color:#fff; font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:filter .12s ease, transform .12s ease}
.lxb-chatform button:hover{filter:brightness(1.08); transform:translateY(-1px)}
/* Petites icônes du composer IA : ＋ (joindre), 🎤 (parler), 🔊 (lecture vocale) */
.lxb-chatform .lxb-chat-ic{width:46px; height:46px; background:var(--gray-pale); color:var(--navy); font-size:21px; border:1px solid var(--line-2)}
.lxb-chatform .lxb-chat-ic:hover{background:#fff; border-color:var(--blue); filter:none}
.lxb-chatform .lxb-chat-ic.on{background:var(--blue); color:#fff; border-color:var(--blue); box-shadow:0 0 0 3px rgba(58,87,208,.18)}
.lxb-chatform .lxb-chat-ic.rec{background:var(--danger); color:#fff; border-color:var(--danger); animation:lxb-recpulse 1s ease-in-out infinite}
@keyframes lxb-recpulse{0%,100%{box-shadow:0 0 0 0 rgba(214,69,69,.5)}50%{box-shadow:0 0 0 6px rgba(214,69,69,0)}}
.lxb-ia-plusmenu{display:flex; flex-direction:column; gap:2px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:6px; margin:0 2px 6px}
.lxb-ia-plusmenu[hidden]{display:none}
.lxb-ia-plusmenu button{display:flex; align-items:center; gap:9px; width:100%; text-align:left; background:transparent; border:0; border-radius:8px; padding:9px 11px; font-size:13.5px; color:var(--ink); cursor:pointer}
.lxb-ia-plusmenu button:hover{background:var(--gray-pale)}
.lxb-msg-pdf{display:inline-block; margin-top:8px; font-size:12px; font-weight:600; color:var(--navy); background:var(--gray-pale); border:1px solid var(--line); border-radius:7px; padding:4px 10px; cursor:pointer}
.lxb-msg-pdf:hover{border-color:var(--blue); background:#fff}

/* Volet droit : onglets PDF / Journal */
.lxb-rtabs{display:inline-flex; gap:4px}
.lxb-rtab{background:transparent; border:1px solid transparent; padding:8px 16px; font-size:14px; font-weight:600; color:var(--ink-soft); border-radius:7px; cursor:pointer}
.lxb-rtab.active{background:var(--white); color:var(--navy); border:1px solid var(--blue)}
.lxb-logbadge{display:inline-block; min-width:16px; padding:0 5px; border-radius:999px; background:var(--danger); color:#fff; font-size:10px; line-height:16px; text-align:center; vertical-align:1px}
.lxb-logbadge[hidden]{display:none}
.lxb-pdf-pane[hidden]{display:none}
.lxb-log-pane{flex:1; min-height:0; overflow:auto; padding:10px; display:flex; flex-direction:column; gap:8px; background:var(--gray-pale)}
.lxb-log-pane[hidden]{display:none}
.lxb-logerr{background:#fdecea; color:var(--danger); border:1px solid #f3c0bd; border-radius:8px; padding:8px 10px; font-size:12.5px; font-weight:500}
.lxb-logerr[hidden]{display:none}
.lxb-logdiags{display:flex; flex-direction:column; gap:5px}
.lxb-lograw{flex:1; min-height:140px; overflow:auto; background:#0d1117; color:#d6deeb; font-family:"Cascadia Code",ui-monospace,monospace; font-size:11px; line-height:1.45; padding:10px; border-radius:8px; white-space:pre-wrap; margin:0}

/* Flèche de compilation qui TOURNE pendant la compilation (dynamisme élégant) */
.lxb-cspin{display:inline-block; transform-origin:50% 50%}
@keyframes lxb-spin{to{transform:rotate(360deg)}}
.lxb-btn.compiling .lxb-cspin{animation:lxb-spin .8s linear infinite}
.lxb-btn.compiling{opacity:.92}

/* En-tête du Journal : Retour au PDF + onglets (Tous / Erreurs / Alertes / Informations) */
.lxb-log-head{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.lxb-log-back{display:inline-flex; align-items:center; gap:6px; background:var(--white); border:1px solid var(--line); color:var(--navy); font-weight:600; font-size:13px; padding:7px 13px; border-radius:8px; cursor:pointer}
.lxb-log-back:hover{border-color:var(--blue); background:var(--gray-pale)}
.lxb-log-filters{display:flex; gap:4px; flex-wrap:wrap}
.lxb-logtab{background:transparent; border:1px solid transparent; border-bottom:2px solid transparent; padding:6px 11px; font-size:13px; font-weight:600; color:var(--muted); border-radius:6px 6px 0 0; cursor:pointer}
.lxb-logtab:hover{color:var(--navy)}
.lxb-logtab.active{color:var(--navy); border-bottom-color:var(--blue)}
.lxb-lc{display:inline-block; min-width:16px; text-align:center; font-size:11px; font-weight:700; color:#fff; background:var(--danger); border-radius:9px; padding:0 5px; margin-left:3px}
.lxb-logtab[data-logf="warning"] .lxb-lc{background:#b7791f}
.lxb-lc[hidden]{display:none}

/* Plein écran de l'éditeur (mode « zen ») : volets latéraux masqués, éditeur pleine largeur */
.lxb-emax{background:transparent; border:1px solid var(--line-2); color:var(--ink-soft); border-radius:7px; width:32px; height:32px; font-size:15px; cursor:pointer; flex:none; margin-left:6px}
.lxb-emax:hover{border-color:var(--blue); color:var(--navy)}
body.lxb-zen .lxb-emax{color:var(--blue); border-color:var(--blue); background:var(--blue-pale)}
body.lxb-zen .lxb-left, body.lxb-zen .lxb-right, body.lxb-zen .lxb-split{display:none !important}
/* En plein ecran (zen) la grille passe a UNE seule colonne : sinon les pistes
   left/right/split de la grille restent reservees -> l'editeur (et l'iframe Word)
   se retrouve decale/vide avec une ligne parasite. 1fr = l'editeur occupe tout. */
/* En plein ecran (zen), .lxb-body passe de la grille 5 colonnes a un simple FLEX :
   le seul volet visible (.lxb-center) prend toute la largeur ET toute la hauteur
   (align-items:stretch par defaut). La grille laissait des pistes vides (ligne parasite)
   et la hauteur s'effondrait quand les volets gauche/droite etaient masques. */
body.lxb-zen .lxb-body{display:flex !important}
body.lxb-zen .lxb-center{border-right:0; min-height:0; min-width:0; flex:1 1 auto}

/* Onglet « Word » : vrai éditeur OnlyOffice */
.word-wrap{position:absolute; inset:0; display:flex; flex-direction:column; background:var(--white)}
.word-wrap[hidden]{display:none}
.word-editor{flex:1; min-height:0; width:100%; display:none}
.word-editor iframe{width:100%; height:100%; border:0}
.word-empty{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; text-align:center; padding:30px}
.word-empty-ic{font-size:54px; line-height:1}
.word-empty-t{font-size:18px; font-weight:700; color:var(--navy); max-width:460px}
.word-empty-sub{font-size:13px; color:var(--muted); max-width:430px}

/* Glisser-déposer d'un projet .zip */
.lxb{position:relative}
.lxb-drop{position:absolute; inset:0; z-index:100; background:rgba(28,42,107,.16); display:flex; align-items:center; justify-content:center}
.lxb-drop[hidden]{display:none}
.lxb-drop-card{background:var(--white); border:2px dashed var(--blue); border-radius:16px; padding:30px 46px; text-align:center; box-shadow:var(--shadow); pointer-events:none}
.lxb-drop-ic{font-size:34px; color:var(--blue); line-height:1}
.lxb-drop-title{font-size:18px; font-weight:600; color:var(--navy); margin-top:10px}
.lxb-drop-sub{font-size:13px; color:var(--ink-soft); margin-top:5px}

/* ---- Ruban : menus déroulants (Styles, A4, Marges, Interligne, Colonnes) ---- */
.lxb-rb-menu{position:relative;display:inline-flex}
.lxb-rb-toggle{min-width:auto;height:28px;padding:0 9px;border:1px solid transparent;background:transparent;color:var(--ink-soft);border-radius:7px;font-size:12.5px;white-space:nowrap}
.lxb-rb-toggle:hover{background:var(--white);border-color:var(--line-2);color:var(--ink)}
.lxb-rb-menu.open .lxb-rb-toggle{background:var(--white);border-color:var(--blue);color:var(--ink)}
.lxb-rb-drop{position:absolute;top:calc(100% + 4px);left:0;min-width:200px;z-index:60;background:var(--white);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px;display:none}
.lxb-rb-menu.open .lxb-rb-drop{display:block}
.lxb-rb-drop button{display:block;width:100%;text-align:left;background:transparent;border:0;color:var(--ink);padding:7px 10px;border-radius:7px;font-size:13px;height:auto;min-width:0}
.lxb-rb-drop button:hover{background:var(--blue-pale);color:var(--navy)}
.lxb-rb-fx i{font-style:italic;font-family:Georgia,"Times New Roman",serif}
.lxb-rb-fx span{font-size:11px;vertical-align:sub}

/* ---- IA : bouton Analyser + actions rapides (chips) ---- */
.lxb-ia-scan{margin-left:auto;font-size:13px;padding:6px 14px;border:1px solid var(--line-2);border-radius:999px;background:var(--white);color:var(--blue);cursor:pointer;font-weight:600}
.lxb-ia-scan:hover{border-color:var(--blue)}
#iaSuggestions{flex-direction:row;flex-wrap:wrap;gap:6px;margin-bottom:8px;flex:none}
#iaSuggestions:empty{display:none}
.lxb-quick{font-size:13.5px;padding:8px 15px;border:1px solid var(--line-2);border-radius:999px;background:var(--blue-pale);color:var(--navy);cursor:pointer;font-weight:600}
.lxb-quick:hover{border-color:var(--blue);background:#e2ebfb}
.lxb-quick.err{background:#fdecea;color:var(--danger);border-color:#f3c0bd}

/* ---- Mode Visuel : encadré bleu (tcolorbox), alignements, colonnes ---- */
.lxb-visual h1{color:var(--navy);margin:18px 0 10px}
.lxb-visual h2{color:var(--ink);margin:16px 0 8px}
.lxb-visual h3{color:var(--ink);margin:14px 0 6px}
.lxb-visual p{margin:9px 0}
.lxb-visual .callout{border:1px solid #cdddfb;border-left:4px solid var(--blue);background:var(--blue-pale);padding:12px 16px;margin:14px 0;border-radius:0 10px 10px 0}
.lxb-visual .callout-t{font-weight:700;color:var(--navy);margin-bottom:4px}
.lxb-visual .callout p:first-child{margin-top:0}
.lxb-visual .callout p:last-child{margin-bottom:0}
.lxb-visual .al-c{text-align:center}
.lxb-visual .al-r{text-align:right}
.lxb-visual .al-l{text-align:left}
.lxb-visual .al-j{text-align:justify}
.lxb-visual .vq{border-left:3px solid var(--line-2);padding-left:14px;color:var(--ink-soft);font-style:italic;margin:10px 0}
.lxb-visual .vcols{column-count:2;column-gap:28px}
.lxb-visual .katex-display{margin:14px 0}

/* ---- Panneau Projets ---- */
.lxb-proj-head{display:flex;gap:6px;align-items:center;margin-bottom:9px}
.lxb-proj-new{flex:1;background:var(--blue);color:#fff;border:0;border-radius:8px;padding:7px 10px;font-size:12.5px;font-weight:600;cursor:pointer}
.lxb-proj-new:hover{filter:brightness(1.05)}
.lxb-conv-row{display:flex;gap:6px;margin:6px 0 8px}
.lxb-conv-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;background:#eef4ff;border:1px solid #cfe0ff;color:var(--navy);border-radius:8px;padding:8px 6px;font-size:12.5px;font-weight:600;cursor:pointer}
.lxb-conv-btn:hover{background:#fff;border-color:var(--blue)}
.lxb-proj-imp{border:1px solid var(--line-2);background:var(--white);color:var(--ink-soft);border-radius:8px;padding:7px 11px;font-size:13px;cursor:pointer}
.lxb-proj-imp:hover{border-color:var(--blue);color:var(--ink)}
.lxb-projlist{display:flex;flex-direction:column;gap:6px}
.lxb-proj{display:flex;align-items:center;gap:6px;padding:7px 8px;border:1px solid var(--line);border-radius:9px;background:var(--white);cursor:pointer}
.lxb-proj:hover{border-color:var(--blue)}
.lxb-proj.active{border-color:var(--blue);background:var(--blue-pale)}
.lxb-proj-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.lxb-proj-name{font-size:13px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lxb-proj.active .lxb-proj-name{color:var(--navy)}
.lxb-proj-meta{font-size:10.5px;color:var(--muted)}
.lxb-proj-acts{display:flex;gap:3px;flex:none}
.lxb-proj-acts button{background:transparent;border:1px solid transparent;font-size:17px;padding:5px 7px;border-radius:7px;color:var(--muted);cursor:pointer;line-height:1}
.lxb-proj-acts button:hover{background:var(--gray-pale);border-color:var(--line-2)}
.lxb-proj-acts .lxb-pa-ren{color:#16a34a}                 /* crayon VERT */
.lxb-proj-acts .lxb-pa-ren:hover{background:#e7f7ec;border-color:#16a34a}
.lxb-proj-acts .lxb-pa-del{color:#dc2626}                 /* corbeille ROUGE */
.lxb-proj-acts .lxb-pa-del:hover{background:#fdecea;border-color:#dc2626}
.lxb-files .file-bin{color:var(--muted);cursor:default;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lxb-files .file-bin:hover{background:var(--gray-pale)}

/* ============ PLUME — éditeur visuel type Word ============ */
.plm-ribbon{display:flex;align-items:stretch;gap:0;flex-wrap:nowrap;overflow-x:auto;padding:6px 8px;background:linear-gradient(180deg,#fff,#f4f6fb);border-bottom:1px solid var(--line)}
.plm-ribbon[hidden]{display:none}
.plm-ribbon::-webkit-scrollbar{height:7px}
.plm-ribbon::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:4px}
.plm-grp{display:flex;align-items:center;gap:3px;padding:0 9px;border-right:1px solid var(--line);flex-wrap:nowrap;flex:none}
.plm-grp:last-child{border-right:0}
.plm-grp-end{margin-left:auto;border-right:0}
.plm-b{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:56px;height:54px;padding:4px 8px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--ink);cursor:pointer}
.plm-b:hover{background:#fff;border-color:var(--line-2);box-shadow:0 2px 8px rgba(28,42,107,.08)}
.plm-b:active{background:var(--blue-pale)}
.plm-b .ic{font-size:19px;line-height:1;height:20px;display:flex;align-items:center}
.plm-b .lb{font-size:10.5px;color:var(--ink-soft);white-space:nowrap}
.plm-b .plm-aicon{font-weight:800;border-bottom:3px solid var(--blue);padding-bottom:1px}
.plm-sel{height:34px;border:1px solid var(--line-2);border-radius:8px;background:#fff;color:var(--ink);font:inherit;font-size:13px;padding:0 8px;cursor:pointer;max-width:160px}
.plm-sel-sm{max-width:110px}
.plm-b.plm-ia{min-width:64px;height:54px;background:linear-gradient(180deg,#eef3ff,#e3ecff);border-color:#cdddfb}
.plm-b.plm-ia:hover{border-color:var(--blue);box-shadow:0 0 0 3px rgba(58,87,208,.15)}
.plm-cube{width:26px;height:26px;object-fit:contain;filter:drop-shadow(0 1px 3px rgba(28,42,107,.35))}
.plm-b.plm-confort.on{background:var(--blue-pale);border-color:var(--blue)}

/* zone d'écriture : page A4 blanche centrée */
.plm-wrap{position:absolute;inset:0;display:none;flex-direction:column;background:var(--gray-pale)}
.plm-banner{font-size:11.5px;color:var(--ink-soft);background:var(--blue-pale);border-bottom:1px solid var(--line);padding:6px 14px;line-height:1.4}
.plm-scroll{flex:1;min-height:0;overflow:auto;padding:22px 16px 80px;display:flex;justify-content:center}
.plm-page{width:min(820px,100%);min-height:60vh;background:#fff;color:#111;border:1px solid var(--line);box-shadow:0 10px 40px rgba(28,42,107,.10);border-radius:3px;padding:54px 64px;font-family:Georgia,"Times New Roman",serif;font-size:16px;line-height:1.75;outline:none;height:max-content}
.plm-page:focus{box-shadow:0 10px 40px rgba(58,87,208,.18)}
.plm-page h1{font-size:26px;color:var(--navy);font-family:Inter,system-ui,sans-serif;margin:6px 0 14px}
.plm-page h2{font-size:21px;color:var(--ink);font-family:Inter,system-ui,sans-serif;margin:20px 0 8px}
.plm-page h3{font-size:17px;color:var(--ink);font-family:Inter,system-ui,sans-serif;margin:16px 0 6px}
.plm-page h4{font-size:15px;color:var(--ink-soft);font-family:Inter,system-ui,sans-serif;margin:14px 0 6px}
.plm-page p{margin:0 0 11px}
.plm-page ul,.plm-page ol{margin:0 0 11px;padding-left:26px}
.plm-page blockquote{border-left:3px solid var(--line-2);margin:11px 0;padding:2px 14px;color:var(--ink-soft);font-style:italic}
.plm-page a{color:var(--blue);text-decoration:underline}
.plm-page img{max-width:100%}
.plm-callout{border:1px solid #cdddfb;border-left:4px solid var(--blue);background:var(--blue-pale);padding:12px 16px;margin:14px 0;border-radius:0 10px 10px 0}
.plm-callout-t{font-weight:700;color:var(--navy);font-family:Inter,system-ui,sans-serif;margin-bottom:5px}
.plm-math{display:inline-block;cursor:pointer;padding:0 2px}
.plm-math:hover{background:var(--blue-pale);border-radius:4px}
/* Plume = comme Word : ZÉRO code visible. Le LaTeX technique (préambule, \lanxasinput,
   \cleardoublepage, \listoffigures…) reste DANS le document (il compile) mais n'est JAMAIS
   affiché dans Plume. Conservé dans le DOM (data-raw) pour ne rien perdre à l'enregistrement. */
.plm-raw, .plm-rawblock{display:none !important}
/* Éléments de livre rendus proprement dans Plume (façon Word) */
.plm-pagebreak{text-align:center; color:var(--muted); font-size:11px; letter-spacing:.14em; text-transform:uppercase; border-top:1px dashed var(--gold); border-bottom:1px dashed var(--gold); padding:5px 0; margin:16px 0; user-select:none}
.plm-toc{display:flex; align-items:center; gap:8px; color:var(--navy); font-weight:600; font-size:14px; background:var(--gray-pale); border:1px solid var(--line); border-left:3px solid var(--blue); border-radius:8px; padding:10px 14px; margin:12px 0; user-select:none}
.plm-fn{color:var(--blue); font-weight:700; cursor:help; font-size:.7em; vertical-align:super; user-select:none}
.plm-sympal{display:grid; grid-template-columns:repeat(8,1fr); gap:3px; width:240px; max-height:250px; overflow:auto}
.plm-symbtn{font-size:16px; line-height:1; padding:7px 0; border:1px solid transparent; border-radius:6px; background:#fff; cursor:pointer; color:var(--ink)}
.plm-symbtn:hover{background:var(--gray-pale); border-color:var(--blue)}
.plm-table{border-collapse:collapse;margin:12px auto}
.plm-table td{border:1px solid var(--line-2);padding:5px 10px;min-width:48px}

/* palette de couleurs */
.plm-pal{position:fixed;z-index:200;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:8px;display:grid;grid-template-columns:repeat(6,1fr);gap:5px;width:210px}
.plm-sw{width:24px;height:24px;border:1px solid var(--line-2);border-radius:6px;cursor:pointer;padding:0}
.plm-sw:hover{transform:scale(1.12);border-color:var(--blue)}

/* barre IA White flottante */
.plm-iabar{position:absolute;left:50%;transform:translateX(-50%);bottom:16px;width:min(680px,92%);display:flex;align-items:flex-end;gap:8px;background:#fff;border:1px solid #cdddfb;border-radius:16px;box-shadow:0 16px 50px rgba(28,42,107,.22);padding:9px 12px;z-index:40}
.plm-iabar[hidden]{display:none}
.plm-iabar.busy{box-shadow:0 0 0 3px rgba(58,87,208,.2),0 16px 50px rgba(28,42,107,.22)}
.plm-iabar-cube{width:34px;height:34px;object-fit:contain;flex:none;filter:drop-shadow(0 1px 4px rgba(28,42,107,.35))}
.plm-iabar textarea{flex:1;resize:none;border:0;outline:none;font:inherit;font-size:14px;line-height:1.4;max-height:90px;background:transparent;color:var(--ink)}
.plm-iabar-btn{flex:none;width:36px;height:36px;border:1px solid var(--line-2);background:#fff;border-radius:10px;font-size:16px;cursor:pointer;color:var(--ink-soft)}
.plm-iabar-btn:hover{border-color:var(--blue);color:var(--ink)}
.plm-iabar-btn.send{background:var(--blue);border-color:var(--blue);color:#fff}
.plm-iabar-btn.on{background:var(--blue-pale);border-color:var(--blue);color:var(--navy)}
.plm-iabar-btn.rec{background:#fdecea;border-color:#f3c0bd;color:var(--danger);animation:plmpulse 1.1s infinite}
@keyframes plmpulse{0%,100%{opacity:1}50%{opacity:.45}}
.plm-iatoast{position:absolute;left:50%;transform:translateX(-50%);bottom:64px;z-index:50;max-width:min(680px,92%);background:var(--navy);color:#fff;font-size:13px;line-height:1.4;padding:9px 14px;border-radius:10px;box-shadow:0 10px 30px rgba(28,42,107,.3);display:none}

/* mode CONFORT (dyslexie + fort contraste) */
body.plm-confort-on .plm-page{font-family:"Trebuchet MS","Verdana","Inter",sans-serif;font-size:19px;line-height:2.1;letter-spacing:.04em;word-spacing:.10em;background:#fbf7ee;color:#15233d}
body.plm-confort-on .plm-page p{margin-bottom:16px}
body.plm-confort-on .plm-iabar textarea{font-size:16px}

@media (max-width:960px){
  .lxb-body{grid-template-columns:1fr}
  .lxb-left,.lxb-right,.lxb-split{display:none}
}
