/* Ali Gator · « Écrans » v245 (10/11/2026) — l’atelier repensé pour les écrans étroits : téléphone, pliable ouvert, tablette.

   Retour de Dali sur la v244 : en portrait, document ouvert, « rien d’ergonomique ». La mise en page empilée de
   l’atelier (volet Documents de 260 px en haut, puis le document, puis l’assistant, le tout sur une longue page à
   faire défiler) venait de l’application d’origine ; la v243/v244 l’avait rhabillée sans la repenser.

   Ce que fait cette couche, sans toucher à l’application ni aux couches précédentes :
   1. Atelier jusqu’à 1099 px de large : l’atelier tient dans l’écran, plus de longue page à faire défiler.
      - jusqu’à 850 px : le document prend la place ; la saisie de l’assistant reste ancrée en bas, et la
        conversation se déplie par-dessus (toucher la barre « Assistant document ») ;
      - de 851 à 1099 px : document à gauche, assistant à droite (plus de troisième colonne écrasée).
   2. Le volet Documents : une barre compacte tant qu’aucun document n’est ouvert, puis un tiroir (bouton de
      l’en-tête) qui redonne aussi la liste des pages, absente jusqu’ici sous 850 px.
   3. Barres d’outils de l’éditeur resserrées, cibles tactiles plus grandes, comparaison empilée.
   4. Saisies à 16 px sur écran tactile : l’iPhone ne zoome plus tout seul quand on touche un champ.
   5. « Aperçu de secours » : la mention passe sous la page au lieu de recouvrir le document.

   Technique : tout vit dans « @layer gm-patch », déclaré avant « gm » par moderne-v244.css : ces règles !important
   passent devant la couche moderne et devant les règles !important hors @layer des couches plus anciennes.
   La disposition compacte de l’atelier s’appuie sur :has() ; sans ce sélecteur (navigateurs d’avant 2022-2023),
   le bloc entier est ignoré et l’atelier garde sa disposition précédente.
   Le script ecrans-v245.js complète la feuille (panneau de l’assistant, tiroir, zoom ajusté à l’écran).

   Cohabitation : la couche « atelier-ergo-v245 » (mise en ligne le même jour par une autre session : page ajustée à la
   largeur, cibles tactiles, volet entre 851 et 1100 px) reste en place et se charge AVANT celle-ci. Les deux vivent
   dans « gm-patch » ; les règles d’ici, plus spécifiques, l’emportent là où les deux se recouvrent (sous 1100 px).
   Au-dessus de 1100 px, cette couche ne change rien à l’atelier.

   Retour arrière : retirer ecrans-v245.css et ecrans-v245.js d’index.html. */

@layer gm-patch {

/* =====================================================================
   1. PARTOUT
   ===================================================================== */

/* Écran tactile : un champ en dessous de 16 px fait zoomer la page sur iPhone à chaque saisie */
@media (pointer:coarse){
  html:root body :is(input:not([type=checkbox],[type=radio],[type=range],[type=file],[type=color],[type=button],[type=submit]),textarea,select){font-size:16px!important}
}

/* Saisie de l’assistant sur écran tactile : des listes à 16 px qui gardent leur place, des cibles plus grandes */
@media (pointer:coarse){
  html:root body aside.assistant-panel :is(.composer-tools,.composer-caption) > label{height:38px!important;padding:0 2px 0 12px!important;gap:6px!important;font-size:13px!important}
  html:root body aside.assistant-panel :is(.composer-tools,.composer-caption) select{height:36px!important;padding:0 20px 0 2px!important}
  html:root body aside.assistant-panel > .composer-area > .composer-tools > label{flex:1.35 1 0!important;min-width:0!important}
  html:root body aside.assistant-panel > .composer-area > .composer-caption > label{flex:1 1 0!important;min-width:0!important}
  html:root body aside.assistant-panel :is(.composer-tools,.composer-caption) select{flex:1 1 auto!important;width:100%!important;min-width:0!important;max-width:none!important}
  html:root body aside.assistant-panel .composer-tools > .icon-button{width:38px!important;height:38px!important}
  html:root body aside.assistant-panel section.single-smart .single-smart-heading{min-height:40px!important}
  html:root body aside.assistant-panel section.single-smart .single-smart-switch{box-sizing:content-box!important;padding:9px 6px!important;margin:-9px -6px!important}
}
/* panneau étroit et tactile : la portée sur sa ligne, le rendu et le plan JSON sur la suivante */
@media (pointer:coarse){
  html:root body aside.assistant-panel > .composer-area{container-type:inline-size;container-name:gecomp}
}
@container gecomp (max-width:400px){
  @media (pointer:coarse){
    html:root body aside.assistant-panel > .composer-area > .composer-tools > label{flex:1 1 100%!important}
  }
}
/* la mention « enregistre tout seul » ne se replie plus sur deux lignes : sans la place, elle s’efface
   (jusqu’à 1250 px de large, là où le panneau de l’assistant est étroit ; au-delà, rien ne change) */
@media (max-width:1250px){
  html:root body aside.assistant-panel .single-smart .single-smart-disclosure > strong{display:flex!important;flex:1 1 auto!important;flex-wrap:wrap!important;align-items:center!important;min-width:0!important;height:20px!important;line-height:20px!important;overflow:hidden!important;white-space:nowrap!important}
  html:root body aside.assistant-panel .single-smart.is-enabled .single-smart-disclosure > strong::after{flex:none!important;line-height:1.3!important}
}

/* « Aperçu de secours » : sous la page, plus jamais sur le texte du document */
html:root body .pdf-sheet > .pdf-preview-notice{left:50%!important;right:auto!important;top:calc(100% + 10px)!important;bottom:auto!important;transform:translateX(-50%)!important;z-index:2!important;display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important;width:max-content!important;max-width:calc(100% - 4px)!important;padding:4px 5px 4px 13px!important;border:1px solid var(--gm-line)!important;border-radius:999px!important;background:#fff!important;box-shadow:var(--gm-sh-1)!important;font-size:12.5px!important;line-height:1.2!important;white-space:nowrap!important;color:var(--gm-ink-3)!important}
html:root body .pdf-sheet > .pdf-preview-notice > button{display:inline-flex!important;align-items:center!important;gap:6px!important;height:30px!important;padding:0 11px!important;border-radius:999px!important;background:var(--gm-green-softer)!important;color:var(--gm-green-2)!important;font-size:12.5px!important;font-weight:600!important;white-space:nowrap!important}
html:root body .pdf-stage:has(.pdf-preview-notice){padding-bottom:62px!important}

/* Modification directe d’un texte : un seul contour, celui de la bulle */
html:root body .agde-ed .agde-ta{outline:0!important}

/* Le bouton du volet Documents n’a de sens que dans l’atelier */
html:root body .app-shell:not(:has(> .workspace)) > .app-header .mobile-documents{display:none!important}

@supports selector(:has(a)){

/* =====================================================================
   2. ATELIER COMPACT — commun (jusqu’à 1099 px de large, au moins 480 px de haut)
   La coquille prend exactement la hauteur de l’écran ; chaque zone défile chez elle.
   ===================================================================== */
@media (max-width:1099px) and (min-height:480px){
  html:root body{--ge-dock:0px;--ge-dock-gap:0px}
  html:root body .app-shell:has(> .workspace){height:100vh!important;height:100dvh!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
  html:root body .app-shell:has(> .workspace) > .app-header{position:relative!important;top:auto!important;flex:none!important;height:60px!important;min-height:60px!important;padding:0 10px 0 6px!important}
  html:root body .app-shell:has(> .workspace) > .app-header > .home-brand{margin-left:0!important}
  html:root body .app-shell:has(> .workspace) > .app-header .header-actions{gap:8px!important}
  html:root body .app-shell:has(> .workspace) > .app-header :is(.icon-button,.agv-sound){width:40px!important;height:40px!important;min-width:40px!important}
  html:root body .app-shell:has(> .workspace) > .app-header .button.quiet{height:40px!important;min-height:40px!important}
  html:root body .app-shell:has(> .workspace) > .app-header .mobile-documents{display:inline-flex!important;align-items:center!important;justify-content:center!important}
  html:root body .app-shell:has(> .workspace) > .app-header .mobile-documents[aria-expanded=true]{background:var(--gm-green-soft)!important;border-color:rgba(12,130,89,.34)!important;color:var(--gm-green)!important}
  html:root body .app-shell:has(> .workspace) > .app-header .mobile-documents[aria-expanded=true] svg{color:var(--gm-green)!important}

  html:root body .app-shell > .workspace{position:relative!important;display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;flex:1 1 0!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:8px!important;gap:8px!important;overflow:hidden!important}
  html:root body .workspace > .editor-main{flex:1 1 0!important;width:auto!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;border-radius:20px!important;overflow:hidden!important}
  /* accueil de l’atelier (aucun document) : le contenu défile dans son panneau */
  html:root body .workspace > .editor-main:not(:has(> .pdf-stage)){overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}

  /* ---------- 2.1 l’éditeur, resserré ---------- */
  html:root body .editor-main > .document-heading{flex:none!important;flex-wrap:nowrap!important;align-items:center!important;height:auto!important;min-height:0!important;padding:8px 8px 8px 14px!important;gap:8px!important}
  html:root body .document-heading > .row:first-child{flex:1 1 auto!important;min-width:0!important;gap:6px!important}
  html:root body .document-heading .collapse-button{display:none!important}
  html:root body .document-heading .document-name{flex:1 1 auto!important;min-width:0!important}
  html:root body .document-heading .document-name > h1{margin:0!important;font-size:16px!important;line-height:21px!important;letter-spacing:-.02em!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html:root body .document-heading .document-name > span{display:block!important;margin:1px 0 0!important;font-size:12.5px!important;line-height:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html:root body .document-heading .document-name > span > i{display:inline-block!important;vertical-align:1px!important;margin:0 7px 0 2px!important}
  html:root body .document-heading .document-name > span > .dot-divider{display:inline!important;margin:0 6px!important}
  html:root body .document-heading > .row:last-child{flex:none!important;gap:2px!important}
  html:root body .document-heading > .row:last-child > .icon-button{display:inline-flex!important;width:40px!important;height:40px!important;min-width:40px!important}
  html:root body .document-heading .export-wrap{margin-left:4px!important}
  html:root body .document-heading .export-wrap > .button.primary{height:40px!important;min-height:40px!important;padding:0 15px 0 13px!important;font-size:14.5px!important;gap:8px!important}

  /* le menu Exporter tient toujours dans le panneau : il défile s’il est plus haut que la place disponible */
  html:root body .document-heading .export-wrap > .export-menu{width:min(310px,calc(100vw - 28px))!important;max-height:calc(100vh - 140px - var(--ge-dock) - var(--ge-dock-gap))!important;max-height:calc(100dvh - 140px - var(--ge-dock) - var(--ge-dock-gap))!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html:root body .document-heading .export-wrap > .export-menu > :is(button,a){min-height:44px!important}

  html:root body .editor-main > .document-toolbar{flex:none!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;height:auto!important;min-height:0!important;padding:6px 8px 6px 10px!important;gap:6px 8px!important}
  html:root body .document-toolbar > .view-switch{flex:0 1 auto!important;min-width:0!important;height:38px!important;padding:3px!important;gap:0!important}
  html:root body .document-toolbar > .view-switch > button{height:32px!important;min-height:0!important;padding:0 10px!important;font-size:13.5px!important;line-height:1!important;white-space:nowrap!important}
  html:root body .document-toolbar > .viewer-controls{flex:none!important;margin-left:auto!important;gap:2px!important;align-items:center!important}
  html:root body .document-toolbar > .viewer-controls > .icon-button{width:38px!important;height:38px!important;min-width:38px!important;border-radius:12px!important}
  html:root body .document-toolbar > .viewer-controls > .eraser-launch{height:38px!important;min-width:38px!important;margin:0 4px 0 0!important}
  html:root body .document-toolbar > .viewer-controls > .toolbar-divider{margin:0 4px!important}
  html:root body .document-toolbar > .viewer-controls > .zoom-value{min-width:46px!important;text-align:center!important}

  html:root body .editor-main > .pdf-stage{flex:1 1 0!important;min-height:0!important;height:auto!important;padding:14px 12px 18px!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html:root body .editor-main > .pdf-stage:has(.pdf-preview-notice){padding-bottom:62px!important}
  /* comparaison avant / après : l’une sous l’autre plutôt que deux pages rognées côte à côte */
  html:root body .editor-main > .pdf-stage.comparison-stage{flex-direction:column!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:18px!important}

  html:root body .editor-main > .document-footer{flex:none!important;flex-wrap:nowrap!important;align-items:center!important;height:auto!important;min-height:40px!important;padding:2px 8px 2px 12px!important;gap:8px!important}
  html:root body .document-footer > span:first-child{flex:1 1 0!important;min-width:0!important;display:block!important;--agde-fs:12.5px;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html:root body .document-footer > span:first-child > svg{display:inline-block!important;vertical-align:-2px!important;margin-right:7px!important}
  html:root body .document-footer > .row{flex:none!important;gap:2px!important}
  html:root body .document-footer > .row > .icon-button{width:36px!important;height:36px!important;min-width:36px!important}
  html:root body .document-footer > .type-badge{flex:none!important}

  /* atelier ouvert depuis un lot : le fil « Retour au lot » et le bandeau de modification manuelle prennent moins de hauteur */
  html:root body .editor-main > nav.batch-workshop-path{flex:none!important;min-height:0!important;padding:6px 8px!important;gap:6px!important}
  html:root body nav.batch-workshop-path > .batch-back-link{flex:none!important;min-height:38px!important;height:38px!important;padding:0 12px 0 9px!important}
  html:root body nav.batch-workshop-path > .batch-path-document{flex:1 1 0!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  html:root body .editor-main > .manual-lot-banner{flex:none!important;min-height:0!important;padding:5px 8px 5px 14px!important;gap:8px!important}
  html:root body .manual-lot-banner > .manual-lot-actions > .button{min-height:36px!important;height:36px!important;white-space:nowrap!important}

  /* ---------- 2.2 volet Documents : barre compacte tant qu’aucun document n’est ouvert ---------- */
  html:root body .workspace:has(> .sidebar-frame > .without-document){flex-direction:column!important}
  html:root body .workspace > .sidebar-frame:has(> .without-document){flex:none!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;overflow:visible!important;transition:none!important;pointer-events:auto!important}
  html:root body .workspace.sidebar-collapsed > .sidebar-frame:has(> .without-document){display:none!important}
  html:root body .sidebar-frame > .project-sidebar.without-document{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;padding:8px!important;gap:8px!important;border-radius:20px!important;overflow:hidden!important}
  html:root body .project-sidebar.without-document > .new-document{order:1!important;flex:none!important;align-self:center!important;width:auto!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 18px 0 14px!important}
  html:root body .project-sidebar.without-document > .documents-disclosure{order:2!important;flex:1 1 0!important;min-width:0!important;width:auto!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 12px 0 10px!important;border-radius:14px!important;background:var(--gm-sunken)!important;font-size:14px!important}
  html:root body .project-sidebar.without-document > .sidebar-bottom{order:3!important;flex:none!important;margin:0!important;padding:0!important;border:0!important}
  html:root body .project-sidebar.without-document > .sidebar-bottom > .text-button{height:44px!important;min-height:44px!important;margin:0!important;padding:0 14px!important;border-radius:14px!important;gap:8px!important;font-size:14px!important;white-space:nowrap!important}
  html:root body .project-sidebar.without-document > .sidebar-bottom > :not(.text-button){display:none!important}
  html:root body .project-sidebar.without-document > .page-list{display:none!important}
  html:root body .project-sidebar.without-document > .project-list-collapse{order:4!important;flex:1 1 100%!important;width:100%!important;min-width:0!important;margin:0!important;max-height:none!important;transition:none!important;filter:none!important}
  html:root body .project-sidebar.without-document > .project-list-collapse:not(.is-expanded){display:none!important}
  html:root body .project-sidebar.without-document > .project-list-collapse > .project-list{max-height:min(34vh,300px)!important;max-height:min(34dvh,300px)!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}

  /* ---------- 2.3 volet Documents : tiroir dès qu’un document est ouvert ---------- */
  html:root body .workspace > .agx-scrim{display:none!important}
  html:root body .workspace > .sidebar-frame:has(> .has-document){position:absolute!important;inset:0!important;z-index:60!important;display:flex!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;padding:8px!important;overflow:hidden!important;background:rgba(11,20,16,.34)!important;border-radius:0!important;transition:none!important;pointer-events:auto!important}
  html:root body .workspace.sidebar-collapsed > .sidebar-frame:has(> .has-document){display:none!important}
  html:root body .sidebar-frame > .project-sidebar.has-document{display:flex!important;flex-direction:column!important;flex:none!important;width:min(336px,calc(100% - 44px))!important;height:100%!important;min-height:0!important;max-height:none!important;padding:12px 12px 0!important;border-radius:20px!important;box-shadow:0 30px 70px -20px rgba(8,40,28,.55),0 0 0 1px rgba(15,61,46,.08)!important;overflow:hidden!important;opacity:1!important;visibility:visible!important}
  html:root body .project-sidebar.has-document > .new-document{align-self:stretch!important;width:auto!important;height:46px!important;min-height:46px!important;margin:0 0 12px!important;justify-content:center!important}
  html:root body .project-sidebar.has-document > :is(.documents-disclosure,.page-list > .pages-disclosure){min-height:40px!important;font-size:14px!important}
  html:root body .project-sidebar.has-document .pages-disclosure{min-height:40px!important;font-size:14px!important}
  html:root body .project-sidebar.has-document > .project-list-collapse.is-expanded{flex:0 1 auto!important;max-height:42%!important;min-height:0!important}
  html:root body .project-sidebar.has-document > .project-list-collapse > .project-list{max-height:none!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html:root body .project-sidebar.has-document > .page-list{display:flex!important;flex:1 1 0!important;min-height:58px!important}
  html:root body .project-sidebar.has-document > .page-list.is-collapsed{flex-grow:0!important}
  html:root body .project-sidebar.has-document .thumbnails{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;padding:12px 4px 16px!important}
  html:root body .project-sidebar.has-document > .sidebar-bottom{flex:none!important;margin-top:auto!important;padding:10px 4px 12px!important}
  html:root body .project-sidebar.has-document > .sidebar-bottom > .text-button{min-height:40px!important;font-size:14px!important}
  html:root body .project-sidebar.has-document > .sidebar-bottom > .original-note{display:flex!important;margin-top:8px!important}
  html:root body .project-sidebar.has-document > .sidebar-bottom > .build-label{display:none!important}
  html:root body .project-sidebar .project-item{min-height:48px!important}
  html:root body .project-sidebar .project-entry > .project-delete{width:44px!important;min-width:44px!important}
}

/* =====================================================================
   3. JUSQU’À 850 px : le document d’abord, l’assistant ancré en bas
   ===================================================================== */
@media (max-width:850px) and (min-height:480px){
  html:root body .app-shell > .workspace{flex-direction:column!important}
  /* hauteur de la barre de l’assistant, connue de toute la page (l’éditeur lui laisse la place ; la barre « Valider tout » se pose au-dessus) */
  html:root body:has(.app-shell > .workspace > .assistant-panel){--ge-dock:104px;--ge-dock-gap:8px}
  html:root body:has(.app-shell > .workspace > .assistant-panel > .conversation > :is(.suggestions,.thinking,.proposal-card)){--ge-dock:150px}
  html:root body .workspace > .editor-main{margin-bottom:calc(var(--ge-dock) + var(--ge-dock-gap))!important}

  /* modification directe : « Annuler tout / Valider tout » flotte en bas, sous le pouce, au lieu de couvrir le haut de la page */
  html:root body > .agde-bar{left:50%!important;right:auto!important;top:auto!important;bottom:calc(var(--ge-dock) + var(--ge-dock-gap) + 60px)!important;transform:translateX(-50%)!important;max-width:calc(100vw - 24px)!important;white-space:nowrap!important}
  html:root body > .agde-toast{left:50%!important;right:auto!important;top:auto!important;bottom:calc(var(--ge-dock) + var(--ge-dock-gap) + 116px)!important;transform:translateX(-50%)!important}
  html:root body > .agde-bar .agde-b{min-height:40px!important}

  /* ---------- 3.1 le panneau : une barre ancrée, qui se déplie par-dessus le document ---------- */
  html:root body .workspace > .assistant-panel{position:absolute!important;left:8px!important;right:8px!important;top:auto!important;bottom:8px!important;z-index:30!important;display:flex!important;flex-direction:column!important;width:auto!important;min-width:0!important;max-width:none!important;height:var(--ge-dock)!important;min-height:0!important;max-height:calc(100% - 16px)!important;margin:0!important;border-radius:20px!important;overflow:hidden!important;contain:layout paint;transition:height .32s cubic-bezier(.2,.8,.2,1),box-shadow .3s ease!important}
  html:root body .workspace > .assistant-panel:has(form.composer:focus-within){height:calc(var(--ge-dock) + 44px)!important}
  html[data-ge-sheet=open]:root body .workspace > .assistant-panel{height:min(70vh,660px)!important;height:min(70dvh,660px)!important;box-shadow:0 -18px 50px -18px rgba(8,40,28,.4),0 0 0 1px rgba(15,61,46,.1)!important}

  /* la barre du haut : poignée + titre, toute la barre se touche */
  html:root body .assistant-panel > .assistant-tabs{position:relative!important;flex:none!important;height:40px!important;min-height:40px!important;padding:0 6px 0 4px!important;gap:2px!important;border-bottom:1px solid transparent!important;cursor:pointer!important;-webkit-tap-highlight-color:transparent}
  html:root body .assistant-panel > .assistant-tabs::before{content:""!important;position:absolute!important;left:50%!important;top:5px!important;width:36px!important;height:4px!important;margin-left:-18px!important;border-radius:2px!important;background:var(--gm-line-2)!important;pointer-events:none!important}
  html:root body .assistant-panel > .assistant-tabs > button{height:40px!important;min-height:40px!important;border:0!important;box-shadow:none!important;background:transparent!important}
  html:root body .assistant-panel > .assistant-tabs > button::before,html:root body .assistant-panel > .assistant-tabs > button::after{display:none!important}
  html:root body .assistant-panel > .assistant-tabs > button:first-child{flex:1 1 auto!important;justify-content:flex-start!important;padding:6px 10px 0!important;font-size:14px!important;font-weight:600!important;color:var(--gm-ink)!important}
  html:root body .assistant-panel > .assistant-tabs > button:last-child{flex:none!important;width:40px!important;padding:0!important;justify-content:center!important;border-radius:12px!important}
  /* le chevron : vers le haut = déplier, vers le bas = replier */
  html:root body .assistant-panel > .assistant-tabs::after{content:""!important;position:absolute!important;right:56px!important;top:50%!important;width:9px!important;height:9px!important;margin-top:-2px!important;border:solid var(--gm-ink-3)!important;border-width:2px 0 0 2px!important;border-radius:1px!important;transform:rotate(45deg)!important;transition:transform .3s cubic-bezier(.2,.8,.2,1)!important;pointer-events:none!important}
  html[data-ge-sheet=open]:root body .assistant-panel > .assistant-tabs::after{margin-top:-7px!important;transform:rotate(225deg)!important}
  html[data-ge-sheet=open]:root body .assistant-panel > .assistant-tabs{height:46px!important;min-height:46px!important;border-bottom-color:var(--gm-line)!important}
  html[data-ge-sheet=open]:root body .assistant-panel > .assistant-tabs > button{height:46px!important;min-height:46px!important}
  /* quelque chose attend d’être lu (proposition, police manquante, point relevé) : une pastille sur la barre */
  html:not([data-ge-sheet=open]):root body .assistant-panel:has(> .conversation > :is(.proposal-card,.polices-bloc,.document-warnings)) > .assistant-tabs > button:first-child::after{content:""!important;display:block!important;position:static!important;flex:none!important;width:8px!important;height:8px!important;margin:0 0 0 8px!important;border:0!important;border-radius:50%!important;background:var(--gm-orange)!important;box-shadow:0 0 0 3px rgba(249,138,31,.2)!important;opacity:1!important;transform:none!important}

  /* ---------- 3.2 replié : une ligne d’état (suggestions, travail en cours, dernier message) + la saisie ---------- */
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation{flex:none!important;display:block!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0 8px!important;overflow:hidden!important;scroll-behavior:auto!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > *{display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > :is(.block-inspector,.history-panel,.panel-bottom){display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .suggestions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important;width:auto!important;max-width:none!important;height:46px!important;margin:0!important;padding:0 2px 8px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;animation:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .suggestions::-webkit-scrollbar{display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .suggestions > button{flex:none!important;width:auto!important;max-width:none!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0 14px 0 12px!important;border-radius:999px!important;font-size:13.5px!important;white-space:nowrap!important;animation:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .suggestions > button > svg:last-child{display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .thinking{display:flex!important;align-items:center!important;gap:10px!important;height:38px!important;min-height:0!important;margin:0 2px 8px!important;padding:0 14px!important;border:0!important;border-radius:999px!important;background:var(--gm-violet-soft)!important;color:var(--gm-violet-ink)!important;font-size:13.5px!important;white-space:nowrap!important;overflow:hidden!important;box-shadow:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .thinking > span{flex:1 1 0!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .thinking small{display:none!important}

  /* replié, une proposition attend : son titre et, si rien ne s’y oppose, le bouton pour la valider (toucher la ligne déplie le détail) */
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card{display:flex!important;align-items:center!important;gap:8px!important;height:38px!important;min-height:0!important;margin:0 2px 8px!important;padding:0 3px 0 6px!important;border:0!important;border-radius:999px!important;background:var(--gm-lime-soft)!important;box-shadow:inset 0 0 0 1px rgba(44,74,9,.14)!important;overflow:hidden!important;cursor:pointer!important;animation:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > *{display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-heading{display:flex!important;flex:1 1 0!important;align-items:center!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-heading > .row{display:flex!important;flex:1 1 0!important;align-items:center!important;gap:8px!important;min-width:0!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card .proposal-icon{flex:none!important;width:26px!important;height:26px!important;border-radius:50%!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-heading > .row > div{flex:1 1 0!important;min-width:0!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card .proposal-heading .eyebrow{display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card .proposal-heading h3{margin:0!important;font-size:13.5px!important;font-weight:600!important;line-height:1.2!important;color:var(--gm-lime-ink)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-heading > .review-dot{display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-actions{display:flex!important;flex:none!important;align-items:center!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-actions > :not(.button.primary){display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-actions > .button.primary{width:auto!important;height:32px!important;min-height:32px!important;margin:0!important;padding:0 14px 0 11px!important;border-radius:999px!important;font-size:13px!important;white-space:nowrap!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .proposal-card > .proposal-actions > .button.primary:disabled{display:none!important}
  /* replié, un plan JSON est en cours de saisie : une ligne le rappelle, la toucher déplie le panneau */
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area > .json-editor{display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area:has(> .json-editor)::before{content:"Plan JSON en cours de saisie — touchez pour continuer"!important;display:flex!important;align-items:center!important;height:56px!important;padding:0 16px!important;border:1px dashed var(--gm-line-3)!important;border-radius:18px!important;font-size:14px!important;color:var(--gm-ink-3)!important;cursor:pointer!important}

  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area{flex:none!important;display:block!important;margin:0!important;padding:0 8px 8px!important;border:0!important;background:transparent!important;box-shadow:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area > :not(form.composer,.json-editor){display:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area > form.composer{display:flex!important;flex-direction:row!important;align-items:flex-end!important;gap:6px!important;width:auto!important;min-height:56px!important;margin:0!important;padding:5px 6px 5px 16px!important;border-radius:18px!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area > form.composer > textarea{flex:1 1 auto!important;align-self:stretch!important;min-width:0!important;width:auto!important;height:44px!important;min-height:44px!important;max-height:44px!important;margin:0!important;padding:11px 0!important;line-height:22px!important;resize:none!important;border:0!important;background:transparent!important;box-shadow:none!important;outline:0!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area > form.composer:focus-within > textarea{height:88px!important;min-height:88px!important;max-height:88px!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area > form.composer > .composer-bottom{flex:none!important;display:flex!important;align-items:center!important;width:auto!important;min-height:0!important;margin:0!important;padding:0 0 1px!important;border:0!important;background:transparent!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .composer-area > form.composer > .composer-bottom > span{display:none!important}
  html:root body .assistant-panel form.composer .send-button{width:44px!important;height:44px!important;min-width:44px!important}

  /* ---------- 3.3 déplié : la conversation au-dessus, la saisie complète en bas ---------- */
  html[data-ge-sheet=open]:root body .assistant-panel > .conversation{flex:1 1 0!important;min-height:0!important;max-height:none!important;padding:16px 16px 12px!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html[data-ge-sheet=open]:root body .assistant-panel :is(.history-panel){flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html[data-ge-sheet=open]:root body .assistant-panel > .composer-area{flex:none!important;padding:10px 12px 12px!important}
  html[data-ge-sheet=open]:root body .assistant-panel .suggestions{width:auto!important;max-width:none!important}
  html[data-ge-sheet=open]:root body .assistant-panel .suggestions > button{width:100%!important;max-width:none!important;min-height:44px!important;font-size:14px!important}
  html[data-ge-sheet=open]:root body .assistant-panel .assistant-intro > p{font-size:14px!important}
}
@supports selector(:nth-child(1 of a)){
@media (max-width:850px) and (min-height:480px){
  /* replié : le dernier message de l’assistant sert de ligne d’état (« Version 3 enregistrée… ») */
  html:root body:has(.app-shell > .workspace > .assistant-panel > .conversation > .chat-entry.assistant:nth-last-child(1 of .chat-entry)){--ge-dock:150px}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation:not(:has(> .thinking)) > .chat-entry.assistant:nth-last-child(1 of .chat-entry){display:flex!important;align-items:center!important;gap:10px!important;height:38px!important;min-height:0!important;max-width:none!important;margin:0 2px 8px!important;padding:0 14px 0 8px!important;border:0!important;border-radius:999px!important;background:var(--gm-green-softer)!important;box-shadow:none!important;animation:none!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .chat-entry.assistant:nth-last-child(1 of .chat-entry) > p{flex:1 1 0!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:13.5px!important;line-height:1.2!important;color:var(--gm-green-2)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .chat-entry.assistant:nth-last-child(1 of .chat-entry) > .small-ai{flex:none!important}
}
}

/* =====================================================================
   4. DE 851 À 1099 px : document à gauche, assistant à droite
   ===================================================================== */
@media (min-width:851px) and (max-width:1099px) and (min-height:480px){
  html:root body .app-shell > .workspace:not(:has(> .sidebar-frame > .without-document)){flex-direction:row!important}
  html:root body .workspace > .assistant-panel{position:relative!important;flex:none!important;width:clamp(330px,36vw,384px)!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;border-radius:20px!important;overflow:hidden!important}
  html:root body .assistant-panel > .conversation{flex:1 1 0!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html:root body .assistant-panel > .composer-area{flex:none!important}
  html:root body .assistant-panel .assistant-intro > h2{font-size:19px!important}
  /* modification directe : la barre « Valider tout » en bas de la colonne du document */
  html:root body > .agde-bar{left:calc((100vw - clamp(330px,36vw,384px) - 8px) / 2)!important;right:auto!important;top:auto!important;bottom:60px!important;transform:translateX(-50%)!important;white-space:nowrap!important}
  html:root body > .agde-toast{left:calc((100vw - clamp(330px,36vw,384px) - 8px) / 2)!important;right:auto!important;top:auto!important;bottom:116px!important;transform:translateX(-50%)!important}
  html:root body > .agde-bar .agde-b{min-height:40px!important}
}
/* deux colonnes sur un écran bas (pliable ou tablette couchés) : l’accueil de l’assistant va à l’essentiel */
@media (min-width:851px) and (max-width:1099px) and (min-height:480px) and (max-height:780px){
  html:root body .assistant-panel .assistant-intro > p{display:none!important}
  html:root body .assistant-panel > .conversation{padding:12px 14px 10px!important}
  html:root body .assistant-panel > .composer-area{padding:8px 12px 10px!important;gap:6px!important}
  html:root body .assistant-panel > .composer-area > .configure-link{min-height:0!important}
}

/* =====================================================================
   5. ÉCRAN TRÈS BAS (téléphone couché) : la page défile, chaque bloc garde une hauteur utile
   ===================================================================== */
@media (max-width:1099px) and (max-height:479px){
  html:root body .app-shell:has(> .workspace){height:auto!important;min-height:100vh!important;min-height:100dvh!important;overflow:visible!important}
  html:root body .app-shell:has(> .workspace) > .app-header{height:56px!important;min-height:56px!important}
  html:root body .app-shell:has(> .workspace) > .app-header .mobile-documents{display:inline-flex!important;align-items:center!important;justify-content:center!important}
  html:root body .app-shell > .workspace{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;height:auto!important;min-height:0!important;max-height:none!important;padding:8px!important;gap:8px!important;overflow:visible!important}
  html:root body .workspace > .sidebar-frame{flex:none!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;margin:0!important;overflow:visible!important;transition:none!important;pointer-events:auto!important}
  html:root body .workspace.sidebar-collapsed > .sidebar-frame{display:none!important}
  html:root body .sidebar-frame > .project-sidebar{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;padding:8px!important;gap:8px!important;border-radius:20px!important;overflow:hidden!important}
  html:root body .project-sidebar > .new-document{order:1!important;flex:none!important;width:auto!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 18px 0 14px!important}
  html:root body .project-sidebar > .documents-disclosure{order:2!important;flex:1 1 0!important;min-width:0!important;width:auto!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 12px 0 10px!important;border-radius:14px!important;background:var(--gm-sunken)!important;font-size:14px!important}
  html:root body .project-sidebar > .sidebar-bottom{order:3!important;flex:none!important;margin:0!important;padding:0!important;border:0!important}
  html:root body .project-sidebar > .sidebar-bottom > .text-button{height:44px!important;min-height:44px!important;margin:0!important;padding:0 14px!important;border-radius:14px!important;font-size:14px!important;white-space:nowrap!important}
  html:root body .project-sidebar > .sidebar-bottom > :not(.text-button),html:root body .project-sidebar > .page-list{display:none!important}
  html:root body .project-sidebar > .project-list-collapse{order:4!important;flex:1 1 100%!important;width:100%!important;min-width:0!important;margin:0!important;max-height:none!important;transition:none!important;filter:none!important}
  html:root body .project-sidebar > .project-list-collapse:not(.is-expanded){display:none!important}
  html:root body .project-sidebar > .project-list-collapse > .project-list{max-height:118px!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html:root body .workspace > .editor-main{flex:none!important;width:auto!important;min-width:0!important;height:calc(100vh - 16px)!important;height:calc(100dvh - 16px)!important;min-height:320px!important;max-height:none!important;margin:0!important;border-radius:20px!important;overflow:hidden!important}
  html:root body .workspace > .editor-main:not(:has(> .pdf-stage)){height:auto!important;min-height:0!important;overflow:visible!important}
  html:root body .editor-main > .document-heading{min-height:0!important;padding:6px 8px 6px 14px!important}
  html:root body .document-heading .collapse-button{display:none!important}
  html:root body .document-heading .document-name > h1{font-size:16px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  html:root body .editor-main > .document-toolbar{min-height:0!important;padding:4px 8px 4px 10px!important;flex-wrap:nowrap!important}
  html:root body .editor-main > .pdf-stage{flex:1 1 0!important;min-height:0!important;padding:12px!important}
  html:root body .workspace > .assistant-panel{flex:none!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;border-radius:20px!important}
  html:root body .assistant-panel > .conversation{max-height:none!important;min-height:0!important;overflow:visible!important}
}

}

/* =====================================================================
   6. TÉLÉPHONE (jusqu’à 540 px) : chaque bouton garde sa place
   ===================================================================== */
@media (max-width:540px) and (min-height:480px){
  html:root body .app-shell:has(> .workspace) > .app-header{height:56px!important;min-height:56px!important;padding:0 8px 0 4px!important}
  html:root body .app-shell:has(> .workspace) > .app-header .header-actions{gap:6px!important}
  html:root body .app-shell > .workspace{padding:6px!important;gap:6px!important}
  html:root body .workspace > .assistant-panel{left:6px!important;right:6px!important;bottom:6px!important;max-height:calc(100% - 12px)!important}
  html:root body:has(.app-shell > .workspace > .assistant-panel){--ge-dock-gap:6px}
  html:root body .editor-main > .document-heading{padding:6px 6px 6px 12px!important;gap:4px!important}
  html:root body .document-heading > .row:last-child > .icon-button{width:36px!important;min-width:36px!important}
  html:root body .document-heading .export-wrap > .button.primary{padding:0 13px 0 11px!important}
  html:root body .editor-main > .document-toolbar{padding:6px!important}
  html:root body .document-toolbar > .view-switch > button{padding:0 10px!important;font-size:13px!important}
  html:root body .document-toolbar > .viewer-controls > .icon-button{width:36px!important;min-width:36px!important}
  /* une seule rangée d’outils : le pourcentage et la remise à zéro du zoom laissent la place (− et + restent) */
  html:root body .document-toolbar > .viewer-controls > .zoom-value,html:root body .document-toolbar > .viewer-controls > .icon-button[title="Réinitialiser le zoom"]{display:none!important}
  html:root body .document-toolbar > .viewer-controls > .toolbar-divider{margin:0 2px!important}
  html:root body .editor-main > .pdf-stage{padding:10px 8px 14px!important}
  /* atelier ouvert depuis un lot, sur téléphone : le bouton du bandeau prend la ligne (son titre, coupé, n’apportait rien) */
  html:root body .editor-main > .manual-lot-banner{padding:5px 6px!important}
  html:root body .manual-lot-banner > div:first-child{display:none!important}
  html:root body .manual-lot-banner > .manual-lot-actions{flex:1 1 auto!important;width:auto!important}
  html:root body .manual-lot-banner > .manual-lot-actions > .button{flex:1 1 0!important;min-width:0!important;padding:0 10px!important;font-size:13.5px!important}
  /* l’indice du pied de page tient en entier plutôt que d’être coupé */
  html:root body .document-footer > span[data-agde-hint]::after{content:"Clic : modifier"!important}
  html:root body .document-footer > span[data-agde-hint="touch"]::after{content:"Touchez : modifier"!important}
  html:root body .project-sidebar.without-document > .sidebar-bottom > .text-button{width:44px!important;padding:0!important;justify-content:center!important;gap:0!important;font-size:0!important}
  html:root body .project-sidebar.without-document > .sidebar-bottom > .text-button > svg{width:18px!important;height:18px!important}
}


/* =====================================================================
   7. ACCUEIL — « Vos documents » sur écran étroit
   ===================================================================== */
@media (max-width:850px){
  /* le titre de la liste reste à gauche, la recherche prend toute la largeur */
  html:root body .document-library > .library-heading{align-items:stretch!important}
  html:root body .document-library > .library-heading > :first-child{align-self:flex-start!important}
}
@media (max-width:600px){
  /* une ligne par document : le nom sur une seule ligne (coupé proprement), « Reprendre » à droite, la version et la date dessous */
  html:root body .document-grid > .document-tile{padding:10px 12px!important;gap:10px!important}
  html:root body .document-tile > .document-tile-open{grid-template-columns:minmax(0,1fr) auto!important;column-gap:8px!important;row-gap:5px!important;min-width:0!important}
  html:root body .document-tile > .document-tile-open > :first-child{display:block!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important;word-break:normal!important}
  html:root body .document-tile > .document-tile-open > .document-tile-footer{grid-column:2!important;grid-row:1!important;align-self:center!important;padding:0 2px 0 8px!important}
  html:root body .document-tile > .document-tile-open > .document-tile-meta{grid-column:1 / -1!important;grid-row:2!important;min-width:0!important;overflow:hidden!important}
  /* tableurs et présentations (sans case à cocher) : leur icône s’aligne sur celle des PDF */
  html:root body .document-tile.home-office-row > .document-tile-top{min-width:80px!important;justify-content:flex-end!important}
}

/* =====================================================================
   8. LOTS
   ===================================================================== */
/* correction de la v244 : hors mode MAX, le chat du lot affichait deux icônes l’une sous l’autre
   (la couche moderne forçait l’affichage de celle du mode MAX, que l’application masque) */
html:root body .lxc:not(.is-max) .lxc-max-hero{display:none!important}

@media (max-width:600px){
  /* « Vos références » : le titre, puis le bouton sur toute la largeur (le bouton écrasait le titre) */
  html:root body section.batch-attachments{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;padding:18px 18px 16px!important}
  html:root body section.batch-attachments > h2{align-self:flex-start!important;width:auto!important;white-space:nowrap!important}
  html:root body section.batch-attachments > button{width:100%!important;height:auto!important;min-height:44px!important;padding:8px 14px!important;white-space:normal!important;text-align:center!important}
  /* « Ajouter depuis Google Drive » et « Importer un dossier » (Android) : l’un sous l’autre plutôt que de déborder de l’écran */
  html:root body .google-drive-control{flex-wrap:wrap!important;gap:8px!important}
  html:root body .google-drive-control > *{flex:1 1 180px!important;min-width:0!important}
  /* « Mode intelligent » : la description sur toute la largeur, l’interrupteur dessous */
  html:root body section.batch-smart-mode{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important;padding:16px 18px!important}
  html:root body section.batch-smart-mode > label.batch-smart-switch{align-self:flex-start!important;margin-left:54px!important}
}

/* =====================================================================
   8 bis. PARAMÈTRES sur téléphone
   correction de la v243/v244 : le texte agrandi des onglets poussait « Maintenance » et « Garde-fous & règles »
   hors de l’écran, sans moyen de les atteindre. La rangée d’onglets défile maintenant au doigt.
   ===================================================================== */
@media (max-width:540px){
  html:root body .settings-nav{flex-wrap:nowrap!important;gap:4px!important;padding:8px 30px 8px 8px!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:none;scroll-snap-type:x proximity!important;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent)!important;mask-image:linear-gradient(90deg,#000 calc(100% - 36px),transparent)!important}
  html:root body .settings-nav::-webkit-scrollbar{display:none!important}
  html:root body .settings-nav > button{flex:none!important;min-width:72px!important;padding:9px 10px!important;font-size:12.5px!important;scroll-snap-align:start!important}
}

/* =====================================================================
   9. ÉCRAN D’OUVERTURE — portrait large (pliable ouvert, tablette) : les illustrations reviennent à droite,
   au lieu d’un demi-écran vide ; le texte leur laisse la place.
   ===================================================================== */
@media (min-width:600px){
  html:root body .gt3.is-portrait{--ge-art:clamp(170px,29vw,250px)}
  html:root body .gt3.is-portrait .gt3-art{display:block!important;bottom:auto!important;width:var(--ge-art)!important;margin-top:calc(var(--ge-art) * -.56)!important}
  html:root body .gt3.is-portrait .gt3-ali .gt3-art{top:calc(25% + 22px)!important;right:calc(var(--gt-pad) + 6px)!important}
  html:root body .gt3.is-portrait .gt3-ari .gt3-art{top:75%!important;right:calc(var(--gt-pad) + 6px)!important}
  html:root body .gt3.is-portrait .gt3-in,html:root body .gt3.is-portrait.hover-ali .gt3-in,html:root body .gt3.is-portrait.hover-ari .gt3-in{right:calc(var(--gt-pad) + var(--ge-art) + 22px)!important}
}

@supports selector(:has(a)){
/* petit téléphone (jusqu’à 400 px de large) : onglets et outils sur une seule rangée */
@media (max-width:400px) and (min-height:480px){
  html:root body .document-toolbar > .view-switch > button{padding:0 8px!important;font-size:12.5px!important}
  html:root body .document-toolbar > .viewer-controls{gap:0!important}
  html:root body .document-toolbar > .viewer-controls > .eraser-launch{min-width:36px!important;padding:0 9px!important;margin:0!important}
  html:root body .document-toolbar > .viewer-controls > .toolbar-divider{margin:0 1px!important}
  html:root body .document-heading .document-name > h1{font-size:15px!important}
}
@media (max-width:380px) and (min-height:480px){
  html:root body .document-toolbar > .viewer-controls > .icon-button[data-agx-fit]{display:none!important}
}
/* écran peu haut (iPhone dans Safari, iPhone SE) : les suggestions restent dans le panneau déplié, le document gagne leur place */
@media (max-width:850px) and (min-height:480px) and (max-height:700px){
  html:root body:has(.app-shell > .workspace > .assistant-panel > .conversation > .suggestions):not(:has(.app-shell > .workspace > .assistant-panel > .conversation > :is(.thinking,.proposal-card))){--ge-dock:104px}
  html:not([data-ge-sheet=open]):root body .assistant-panel > .conversation > .suggestions{display:none!important}
}
}

/* le tiroir et son voile apparaissent en douceur (hors WebKit : un parent animé au-dessus de la liste des pages
   y fait parfois disparaître les vignettes — voir sidebar-v224.css) */
@supports not (font:-apple-system-body){
  @media (max-width:1099px) and (min-height:480px){
    html:root body .workspace > .sidebar-frame:has(> .has-document){animation:ge-voile .22s ease both!important}
  }
}

}

@keyframes ge-voile{from{background-color:rgba(11,20,16,0)}}
