/* Digital Education v35 — adaptation au téléphone (Android) : barre du haut compacte avec menu, texte et zones tactiles lisibles, tableaux et code qui défilent,
   cartes en une colonne. Tout est limité aux écrans étroits (≤ 860 px) ou tactiles ; l'affichage sur ordinateur n'est pas modifié. */
header#top #nbtn{display:none}
.monly{display:none}
.tw{max-width:100%;-webkit-overflow-scrolling:touch}
.tw,pre,.katex-display,.katex{position:relative}      /* le MathML caché de KaTeX (position absolue) doit être rogné par son conteneur : sinon il élargit la page */
.katex-display{overflow-x:auto;overflow-y:hidden;max-width:100%}
pre{max-width:100%;overflow-x:auto}
img,svg,video{max-width:100%}
@media(max-width:860px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{font-size:16px;overflow-x:hidden;padding-bottom:env(safe-area-inset-bottom)}
  main{width:calc(100% - 1.4rem)!important;min-width:0!important;padding-top:1rem;padding-bottom:3rem}
  h1{font-size:1.55rem;margin:.1rem 0 .8rem}h2{font-size:1.25rem;margin:1.6rem 0 .5rem}h3{font-size:1.05rem}
  /* barre du haut : une ligne (marque, recherche, réglages, menu), puis l'état ; les pages dans le menu */
  header#top{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand btns" "chips chips" "nav nav";gap:.25rem .5rem;padding:.35rem .6rem;align-items:center;max-height:100dvh;overflow-y:auto;box-shadow:0 4px 14px #0002;padding-top:max(.35rem,env(safe-area-inset-top))}
  header#top .hl{grid-area:brand;min-width:0}header#top .hi{grid-area:btns;display:flex;flex-direction:row;gap:.3rem}header#top .hr{grid-area:chips;display:flex;flex-direction:row;flex-wrap:wrap;gap:.3rem;align-items:center}
  header#top nav.hm{grid-area:nav;display:none;grid-template-columns:repeat(2,minmax(0,1fr));gap:.3rem;padding:.3rem 0 .4rem}
  body.bar-open:not(.tb-fixed) header#top nav.hm,body.nav-open.tb-fixed header#top nav.hm{display:grid}      /* « comme sur PC » : les pages apparaissent avec la barre ; « fixe » : derrière le bouton ☰ */
  header#top nav a{justify-content:flex-start;padding:.65rem .75rem;border:1px solid var(--line);border-radius:10px;background:var(--card);font-size:.95rem;white-space:normal}
  header#top nav a.on{box-shadow:inset 0 -3px 0 var(--acc)}
  header#top .hi>*{width:2.75rem!important;height:2.75rem;display:inline-flex;align-items:center;justify-content:center;padding:0}
  body.tb-fixed header#top #nbtn{display:inline-flex}
  .hl .brand{font-size:1rem}.hl .brand img{width:34px;height:34px}
  .hr .ss,.hr .gchip{font-size:.78rem;padding:.2rem .55rem}
  .hr button#sbtn{width:auto}
  #hz{display:none!important}
  #hh{width:5.5rem;height:2rem;font-size:1.05rem;border-radius:0 0 14px 14px;padding-top:env(safe-area-inset-top)}      /* languette en haut au milieu : assez grande pour le doigt */
  html.fx header#top,html header#top{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;filter:none!important;background:var(--bg)!important}      /* pas de flou sur téléphone */
  .hmob{display:none!important}
  .monly{display:flex!important}
  /* cartes, listes, lignes */
  .grid,.cards{grid-template-columns:1fr;gap:.7rem}
  .row{align-items:flex-start;padding:.7rem 0}
  .setrow>span:first-child{min-width:0;flex:1 1 100%}
  .setrow>span:last-child{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;max-width:100%}
  .setbox,.box,.pt,.card{max-width:100%}
  main>.box,main>section.box{padding:.3rem .9rem .9rem}
  /* tableaux, code, formules */
  table{font-size:.85rem}th,td{padding:.3rem .5rem}
  .pt pre,.pb pre{font-size:.8rem;line-height:1.45}
  .pt{padding:.65rem .75rem;margin-left:0;margin-right:0;border-left-width:3px}.pt ul,.pt ol{padding-left:1.2rem}.pt pre{padding-top:2.2rem}
  /* recherche et fenêtres */
  dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0;padding:.7rem}
  #res{max-height:calc(100dvh - 8rem)}
  .dlgh{display:flex;gap:.5rem}.dlgh #q{flex:1;min-width:0}
  .gcard,.gcard.ginit{padding:1.1rem 1rem;border-radius:14px}
  .ginit label:not(.chk){display:grid;gap:.3rem;font:600 .9rem system-ui,sans-serif;color:var(--mut)}
  .ginit input[type=text],.ginit input[type=password]{width:100%;padding:.6rem .75rem;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--fg)}
  #gate{padding:.6rem;align-items:flex-start}
}
@media(pointer:coarse){
  a.btn,select,summary,.seg button,button:not(.swatch):not(.hib){min-height:44px}
  button:not(.swatch):not(.hib),a.btn{padding:.55rem .9rem}
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea{font-size:16px;min-height:44px}
  .chk input[type=checkbox],.chk input[type=radio]{width:22px;height:22px}
}
.katex.kwide{display:inline-block;max-width:100%;overflow-x:auto;overflow-y:hidden;vertical-align:middle}





















































