/* ============================================
   SNEAKPEN — mobile d'abord
   Encre et papier · boutons pilule · Space Grotesk
   ============================================ */

/* Reset */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}

/* Comportement « application », pas « page web » :
   pas de pincement pour zoomer, pas de rebond élastique,
   pas de zoom au double-tap, pas de menu de sélection système
   en dehors des champs de saisie. */
html,body{
  overflow-x:hidden;max-width:100vw;
  overscroll-behavior:none;
  touch-action:pan-x pan-y;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
}
body{-webkit-touch-callout:none}
button,.btn-icon,.btn-pill,.ed-btn,.more-item,
.home-tab,.template-card,.sheet-card,.chip,.math-sym{
  touch-action:manipulation;   /* supprime le délai et le zoom du double-tap */
}
input,textarea,[contenteditable="true"]{-webkit-touch-callout:default;-webkit-user-select:text;user-select:text}

/* ---------- Tokens ----------
   Encre et papier, la même palette que la notice d'installation
   (installation/install.css). Pas de couleur d'accent : l'accent EST l'encre,
   et la hiérarchie se fait au contraste. Le bleu d'origine (#2563EB, le bleu
   par défaut de Tailwind) faisait générique.

   Deux règles à tenir :
   · Ne JAMAIS écrire color:#fff sur var(--accent). En thème sombre l'encre
     devient crème, et le texte blanc disparaît. Utiliser --on-accent.
   · La bande d'aperçu reste blanche (#fff) : c'est du papier d'imprimante,
     pas une surface d'interface. */
:root{
  --white:#FFFFFF;
  --bg:#FBF8F1;          /* surfaces : la feuille */
  --bg2:#EFEAE0;         /* fond de l'application : le papier */
  --bg3:#E5DFD2;
  --input:#E9E3D6;
  --hover:#DED7C8;
  --active:#CDC4B2;

  --text:#141209;
  --text2:#4A443A;
  --text3:#7E7565;
  --text4:#9A9182;
  --placeholder:#9A9182;

  --accent:#141209;      /* l'encre */
  --accent-soft:#3A342B;
  --accent-bg:rgba(20,18,9,.06);
  --accent-bg2:rgba(20,18,9,.12);
  --accent-line:rgba(20,18,9,.35);
  --on-accent:#FBF8F1;   /* ce qu'on pose SUR l'encre */

  --border:#DAD3C5;
  --border2:#C3BAA9;

  /* Couleurs de sens, réchauffées pour tenir avec le papier.
     Le blanc reste lisible dessus dans les deux thèmes. */
  --red:#B3402E;
  --red-bg:rgba(179,64,46,.07);
  --green:#3F7A52;
  --green-bg:rgba(63,122,82,.09);
  --orange:#B07A2B;

  --sh-xs:0 1px 2px rgba(0,0,0,.04);
  --sh-sm:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --sh-md:0 4px 12px rgba(0,0,0,.08);
  --sh-lg:0 12px 32px rgba(0,0,0,.12);

  --r-xs:8px;
  --r-sm:12px;
  --r-md:16px;
  --r-lg:20px;
  --r-pill:9999px;

  --heading:'Space Grotesk',-apple-system,'Segoe UI',sans-serif;
  --body:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --mono:'SF Mono','JetBrains Mono','Fira Code',monospace;

  --ease:cubic-bezier(.25,.1,.25,1);
  --spring:cubic-bezier(.34,1.56,.64,1);

  --safe-t:env(safe-area-inset-top,0px);
  --safe-b:env(safe-area-inset-bottom,0px);
  --header:56px;

  /* Échelle interne de composition de la bande — voir la section BANDE.
     Toute longueur en mm de la bande est multipliée par ce facteur. */
  --band-mag:5;
  /* Hauteur réellement visible (hors clavier virtuel), posée par JS */
  --vvh:100dvh;
  /* Hauteur du clavier virtuel, posée par JS. Sert aux surfaces flottantes
     en position:fixed, qui se placent par rapport à la fenêtre de mise en
     page — laquelle ne rétrécit pas quand le clavier monte. */
  --kb:0px;
}

/* Dark — l'encre et le papier s'échangent : le fond devient l'encre,
   et l'accent passe au crème. --on-accent bascule avec lui. */
[data-theme="dark"]{
  --bg:#1A1811;--bg2:#100F0A;--bg3:#252219;
  --input:#252219;--hover:#332F24;--active:#433F33;
  --text:#F3EEE1;--text2:#BFB7A5;--text3:#8A8271;--text4:#6E6656;--placeholder:#6E6656;
  --accent:#F3EEE1;--accent-soft:#D9D2C2;
  --accent-bg:rgba(243,238,225,.10);--accent-bg2:rgba(243,238,225,.18);
  --accent-line:rgba(243,238,225,.35);
  --on-accent:#141209;
  --red:#C0563F;--red-bg:rgba(192,86,63,.14);
  --green:#4E8A63;--green-bg:rgba(78,138,99,.14);
  --orange:#C9923F;
  --border:#2F2C23;--border2:#433F33;
  --sh-xs:0 1px 2px rgba(0,0,0,.3);--sh-sm:0 1px 3px rgba(0,0,0,.4);
  --sh-md:0 4px 12px rgba(0,0,0,.5);--sh-lg:0 12px 32px rgba(0,0,0,.6);
}

/* ---------- Base ---------- */
html{font-size:16px;-webkit-text-size-adjust:100%;height:100%;overflow:hidden}

/* LA FENÊTRE DE MISE EN PAGE EST VERROUILLÉE SUR LA HAUTEUR VISIBLE.
   Le corps gardait `min-height:100dvh` pendant que .view se repliait sur
   --vvh à l'ouverture du clavier. La différence — jusqu'à 336 px sur un
   iPhone — laissait voir le fond du corps entre l'interface et le clavier :
   la fameuse bande, NOIRE en thème sombre (--bg2 y vaut #100F0A).
   Le corps est donc fixé et prend exactement --vvh. Les vues défilent déjà
   en interne (.home-body, .settings-body, .preview-pane), rien ne dépend du
   défilement du document — et comme il ne peut plus défiler, Safari ne peut
   plus pousser l'interface hors de l'écran pour dégager le champ actif. */
body{
  font-family:var(--body);background:var(--bg2);color:var(--text);
  position:fixed;top:0;left:0;width:100%;
  height:var(--vvh,100dvh);
  overflow:hidden;
  -webkit-font-smoothing:antialiased;line-height:1.5;
}
input,button,select,textarea{font-family:var(--body)}
::selection{background:var(--accent-bg2)}

/* Views — la hauteur suit le viewport VISUEL : quand le clavier
   s'ouvre sur mobile, l'interface se replie au lieu de passer dessous. */
/* La hauteur vient du corps, qui porte --vvh : une seule source de vérité. */
.view{display:none;height:100%;overflow:hidden}
.view.active{display:flex;flex-direction:column}

/* =========================================
   BUTTONS
   ========================================= */

/* Icon button – 44px touch target */
.btn-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;border:none;background:transparent;
  color:var(--text3);border-radius:var(--r-sm);cursor:pointer;
  transition:background .15s var(--ease);flex-shrink:0;
}
.btn-icon:active{background:var(--hover);transform:scale(.92)}
.btn-icon svg{width:22px;height:22px}

/* Pill buttons */
.btn-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 18px;border:none;border-radius:var(--r-pill);
  font-size:.85rem;font-weight:600;cursor:pointer;
  transition:all .15s var(--ease);white-space:nowrap;
}
.btn-pill:active{transform:scale(.96)}

.btn-primary-pill{background:var(--accent);color:var(--on-accent)}
.btn-primary-pill:active{background:var(--accent-soft)}
.btn-primary-pill svg{width:16px;height:16px}

.btn-ghost{background:var(--bg3);color:var(--text2);border:1px solid var(--border)}
.btn-ghost:active{background:var(--hover)}

/* Filled button (modals) */
.btn-filled{
  flex:1;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:14px 20px;border:none;border-radius:var(--r-pill);
  background:var(--accent);color:var(--on-accent);font-size:.9rem;font-weight:600;cursor:pointer;
  transition:all .15s var(--ease);
}
.btn-filled:active{transform:scale(.97);background:var(--accent-soft)}

.btn-danger-filled{background:var(--red)}
/* État enfoncé : une nuance plus sombre du --red de la palette. C'était resté
   au #DC2626 d'origine, le seul rouge froid qui subsistait dans l'interface. */
.btn-danger-filled:active{background:#93331F}

/* Outline button */
.btn-outline{
  display:inline-flex;align-items:center;gap:8px;
  padding:12px 18px;border:1.5px solid var(--border);
  border-radius:var(--r-pill);background:var(--bg);
  color:var(--text);font-size:.88rem;font-weight:500;cursor:pointer;
  transition:all .15s var(--ease);
}
.btn-outline:active{transform:scale(.97);background:var(--bg3)}
.btn-outline svg{width:18px;height:18px;color:var(--text3)}

.btn-outline-danger{border-color:rgba(239,68,68,.2);color:var(--red);background:var(--red-bg)}
.btn-outline-danger svg{color:var(--red)}

/* =========================================
   HEADER (shared)
   ========================================= */

.app-header{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:8px 12px;padding-top:calc(8px + var(--safe-t));
  padding-left:calc(12px + env(safe-area-inset-left,0px));
  padding-right:calc(12px + env(safe-area-inset-right,0px));
  background:var(--bg);border-bottom:1px solid var(--border);
  position:sticky;top:0;z-index:100;min-height:var(--header);flex-shrink:0;
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
}
/* Sans min-width:0 le titre pousse la barre au-delà de l'écran et
   le bouton PDF sort du cadre : c'est ce qui le rendait invisible. */
.header-left{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}
.header-right{display:flex;align-items:center;gap:2px;flex:0 0 auto}

/* Brand
   Le logo est un PNG détouré (encre sur fond transparent) posé en MASQUE :
   la couleur vient de background, donc du thème. Un <img> aurait imposé un
   second fichier pour le mode sombre, ou un filtre qui délave la teinte.
   Le rapport vient du fichier lui-même : 811 x 148. */
.brand{display:flex;align-items:center;gap:10px}
.brand-logo{
  display:block;height:19px;aspect-ratio:811/148;
  background:var(--text);
  -webkit-mask:url(../icons/logo.png) no-repeat center/contain;
          mask:url(../icons/logo.png) no-repeat center/contain;
  /* L'élément CONTIENT le mot « SneakPen », repoussé hors cadre. Sans ce
     texte, la page n'affichait aucun nom quand le CSS ne chargeait pas, et
     n'en donnait aucun aux moteurs de recherche. aria-label prime pour les
     lecteurs d'écran, ce texte ne les gêne donc pas. */
  text-indent:-999em;overflow:hidden;white-space:nowrap;
}

.header-title{font-family:var(--heading);font-size:1.05rem;font-weight:600;color:var(--text)}

/* =========================================
   HOME
   ========================================= */

/* La vue est en overflow:hidden et occupe exactement la hauteur visible :
   c'est CE conteneur qui doit défiler. Sans overflow-y, la liste de notes
   était simplement rognée et rien ne bougeait au doigt.
   min-height:0 est une précaution : il garantit qu'un enfant flex peut se
   réduire sous la taille de son contenu, même si les règles d'overflow
   changent plus tard. */
.home-body{
  flex:1 1 auto;min-height:0;
  overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding:0 20px 100px;
  padding-bottom:calc(100px + var(--safe-b));
  max-width:640px;margin:0 auto;width:100%;
  position:relative;
}

.home-hero{padding:24px 0 20px}
.home-hero h2{
  font-family:var(--heading);font-size:1.5rem;font-weight:700;
  color:var(--text);letter-spacing:-.02em;line-height:1.2;margin-bottom:6px;
}
.home-hero p{font-size:.9rem;color:var(--text3);line-height:1.45}

/* Search */
.search-bar{
  display:flex;align-items:center;gap:10px;
  padding:11px 16px;background:var(--input);
  border:none;border-radius:var(--r-pill);margin-bottom:16px;
  transition:box-shadow .2s var(--ease);
}
.search-bar:focus-within{box-shadow:0 0 0 2px var(--accent-bg2),0 0 0 1px var(--accent)}
.search-bar svg{width:18px;height:18px;color:var(--text4);flex-shrink:0}
.search-bar input{
  flex:1;min-width:0;background:none;border:none;outline:none;
  color:var(--text);font-size:.9rem;
}
.search-bar input::placeholder{color:var(--placeholder)}

/* Home tabs */
.home-tabs{
  display:flex;gap:4px;margin-bottom:16px;
  background:var(--bg3);border-radius:var(--r-pill);padding:4px;
}
.home-tab{
  flex:1;display:flex;align-items:center;justify-content:center;gap:6px;
  padding:10px 12px;border:none;background:transparent;
  color:var(--text3);font-size:.84rem;font-weight:600;
  border-radius:var(--r-pill);cursor:pointer;
  transition:all .2s var(--ease);
}
.home-tab svg{width:16px;height:16px}
.home-tab.active{background:var(--bg);color:var(--text);box-shadow:var(--sh-sm)}

/* Panels */
.home-panel{display:none}
.home-panel.active{display:block}

/* Sheets grid */
.sheets-grid{display:flex;flex-direction:column;gap:8px}

.sheet-card{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;background:var(--bg);
  border:1px solid var(--border);border-radius:var(--r-md);
  cursor:pointer;transition:all .15s var(--ease);
}
.sheet-card:active{transform:scale(.985);background:var(--bg3)}

.sheet-card-info{flex:1;min-width:0;padding-right:8px}
.sheet-card-title{
  font-size:.93rem;font-weight:600;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font-family:var(--heading);
}
.sheet-card-meta{font-size:.74rem;color:var(--text4);margin-top:2px}

.sheet-card-actions{display:flex;gap:2px}
.sheet-card-actions .btn-icon{width:36px;height:36px;color:var(--text4)}
.sheet-card-actions .btn-icon svg{width:16px;height:16px}

/* Empty state */
.empty-state{text-align:center;padding:48px 20px}
.empty-icon svg{width:56px;height:56px;margin-bottom:16px;opacity:.4}
.empty-state h3{font-family:var(--heading);font-size:1.05rem;font-weight:600;margin-bottom:4px}
.empty-state p{font-size:.85rem;color:var(--text4)}

/* Templates grid */
.templates-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}

.template-card{
  display:flex;flex-direction:column;align-items:center;
  padding:20px 12px 16px;background:var(--bg);
  border:1px solid var(--border);border-radius:var(--r-md);
  cursor:pointer;transition:all .15s var(--ease);text-align:center;
}
.template-card:active{transform:scale(.97);background:var(--bg3)}
.template-icon{
  width:44px;height:44px;display:flex;align-items:center;justify-content:center;
  background:var(--accent-bg);border-radius:var(--r-sm);margin-bottom:10px;
}
.template-icon svg{width:22px;height:22px}
.template-name{font-size:.85rem;font-weight:600;color:var(--text);font-family:var(--heading)}
.template-desc{font-size:.72rem;color:var(--text4);margin-top:2px;line-height:1.3}

/* FAB */
.fab{
  position:fixed;bottom:24px;right:20px;
  bottom:calc(24px + var(--safe-b) + var(--kb,0px));
  width:56px;height:56px;border:none;border-radius:50%;
  background:var(--accent);color:var(--on-accent);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 16px rgba(0,0,0,.22);
  cursor:pointer;transition:all .15s var(--ease);z-index:50;
}
.fab:active{transform:scale(.9)}
.fab svg{width:24px;height:24px}

/* =========================================
   EDITOR
   ========================================= */

/* Save dot */
/* =========================================
   CHROME DE L'ÉDITEUR — DEUX RANGÉES FIXES

   Règle de base : RIEN ne défile latéralement. Tout ce qui ne tient pas
   dans la rangée 2 part dans la feuille « ⋯ ».

   Rangée 1 : retour · nom + place utilisée · annuler · PDF, puis le filet
              de progression sur toute la largeur.
   Rangée 2 : gras · italique · puces · alignement · A− taille A+ · ⋯

   L'ancienne zone haute faisait 229 px sur 4 rangées empilées (en-tête,
   barre d'outils qui défilait, réglette de taille, préréglages XS→XL +
   colonnes, jauge). Tout ça tient maintenant en deux rangées.
   ========================================= */

/* ---------- Rangée 1 ---------- */
.ed-head{
  display:flex;align-items:center;gap:2px;flex-shrink:0;
  padding:6px 6px;padding-top:calc(6px + var(--safe-t));
  padding-left:calc(6px + env(safe-area-inset-left,0px));
  padding-right:calc(6px + env(safe-area-inset-right,0px));
  background:var(--bg);
}
/* min-width:0 est indispensable : sans lui un flex item refuse de passer
   sous la largeur de son contenu et le nom long pousse le bouton PDF dehors. */
.ed-title{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px;padding:0 4px}
.ed-name{
  font-family:var(--heading);font-size:1rem;font-weight:650;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  background:none;border:none;outline:none;padding:0;width:100%;text-align:left;
}
.ed-status{
  display:flex;align-items:center;gap:5px;
  font-size:.72rem;color:var(--text3);white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
.ed-dot{width:7px;height:7px;border-radius:50%;background:var(--text4);flex:none;transition:background .2s var(--ease)}
.ed-dot.saved{background:var(--green)}
.ed-dot.dirty{background:var(--orange)}
.ed-dot.failed{background:var(--red)}
.ed-status .over{color:var(--red);font-weight:700}

/* Filet de progression des 160 mm, sous la rangée 1, pleine largeur. */
.ed-progress{height:3px;background:var(--bg3);flex-shrink:0;overflow:hidden}
.ed-progress-fill{
  height:100%;width:0;background:var(--accent);
  transition:width .18s var(--ease),background .18s var(--ease);
}
.ed-progress-fill.warn{background:var(--orange)}
.ed-progress-fill.full{background:var(--red)}
/* Secousse quand la saisie est refusee : seul retour visuel autre que le
   message. L'animation zoneShake est conservee de l'ancienne jauge. */
.ed-progress-fill.shake{animation:zoneShake .38s var(--ease)}

/* ---------- Rangée 2 ---------- */
/* Pas d'overflow-x : la rangée doit tenir telle quelle sur le plus petit
   écran visé (320 px). Les éléments se serrent, ils ne défilent pas. */
.ed-bar{
  display:flex;align-items:center;gap:2px;flex-shrink:0;
  padding:5px 6px;
  padding-left:calc(6px + env(safe-area-inset-left,0px));
  padding-right:calc(6px + env(safe-area-inset-right,0px));
  background:var(--bg);border-bottom:1px solid var(--border);
}
.ed-btn{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;min-width:38px;height:38px;padding:0 2px;border:none;
  background:transparent;color:var(--text2);font-size:.95rem;
  border-radius:var(--r-xs);cursor:pointer;
  transition:background .12s var(--ease),color .12s var(--ease);
}
.ed-btn:active{background:var(--hover)}
.ed-btn.active{background:var(--accent-bg);color:var(--accent)}
.ed-btn svg{width:19px;height:19px}
.ed-btn b,.ed-btn i{font-family:var(--heading);font-size:1.05rem;font-weight:700}
.ed-btn i{font-weight:500}

/* Pousse le groupe de taille et le ⋯ vers la droite. */
.ed-spacer{flex:1 1 auto;min-width:2px}

/* Groupe de taille : A− valeur A+, en pilule. */
.ed-size{
  display:inline-flex;align-items:center;flex:0 0 auto;
  border:1px solid var(--border);border-radius:var(--r-pill);
  padding:1px;background:var(--bg);
}
.ed-size button{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border:none;background:transparent;
  color:var(--text2);border-radius:var(--r-pill);cursor:pointer;
  font-family:var(--heading);font-size:.9rem;font-weight:600;
}
.ed-size button:active{background:var(--hover)}
.ed-size button:disabled{opacity:.35;cursor:default}
.ed-pt{
  min-width:46px;text-align:center;font-size:.8rem;font-weight:650;
  color:var(--accent);font-variant-numeric:tabular-nums;
  white-space:nowrap;padding:0 2px;
}

/* ---------- Écrans étroits ---------- */
/* iPhone SE : 320 px. On resserre au lieu de laisser défiler. */
@media(max-width:374px){
  .ed-bar{gap:0;padding:5px 2px}
  .ed-btn{min-width:34px}
  .ed-btn svg{width:18px;height:18px}
  .ed-size button{width:30px;height:32px}
  .ed-pt{min-width:38px;font-size:.74rem}
  .ed-name{font-size:.94rem}
}

/* =========================================
   FEUILLE « ⋯ » — tout le reste des outils
   Même patron que les autres modales (.modal / .modal-sheet).
   ========================================= */
.more-group{margin-bottom:18px}
.more-group:last-child{margin-bottom:4px}
.more-title{
  font-size:.68rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--text3);margin:0 0 8px 2px;
}
.more-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.more-item{
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  gap:7px;padding:13px 3px 10px;min-height:74px;
  background:var(--bg3);border:1px solid var(--border);
  border-radius:var(--r-sm);color:var(--text);
  font-size:.68rem;font-weight:600;line-height:1.15;text-align:center;
  cursor:pointer;transition:all .12s var(--ease);
}
.more-item:active{transform:scale(.95);background:var(--hover)}
.more-item svg{width:20px;height:20px;flex:none}
.more-item .more-glyph{
  font-family:var(--heading);font-size:1.05rem;font-weight:700;
  line-height:20px;height:20px;display:block;
}
.more-item.active{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.more-item-danger{color:var(--red)}
.more-item-danger svg{color:var(--red)}
.more-item:disabled{opacity:.4;cursor:default}
@media(max-width:339px){
  .more-grid{grid-template-columns:repeat(3,1fr)}
}

/* Rangée de symboles, dépliée depuis la tuile « Symboles ». */
.more-symbols{
  display:none;flex-wrap:wrap;gap:4px;
  margin-top:10px;padding:10px;background:var(--bg2);
  border:1px solid var(--border);border-radius:var(--r-sm);
}
.more-symbols.open{display:flex}

/* Ligne libre dans la feuille (le sélecteur de taille de passage). */
.more-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.more-row .setting-select{flex:1 1 auto;min-width:0}
.more-row .size-hint{font-size:.74rem;color:var(--text3)}

.math-sym{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:32px;height:32px;padding:0 4px;border:1px solid var(--border);
  background:var(--bg);color:var(--text2);font-size:.88rem;
  border-radius:var(--r-xs);cursor:pointer;font-family:serif;
  transition:all .1s var(--ease);
}
.math-sym:hover{background:var(--accent-bg);border-color:var(--accent);color:var(--accent)}
.math-sym:active{transform:scale(.9)}

/* Fullscreen editor — sur --vvh comme le reste, pas sur 100dvh : dvh ignore
   le clavier, donc le plan de travail serait passé dessous. Le bouton est
   masqué sous 1024 px, mais un iPad avec clavier atteint ce cas. */
.view-fullscreen{
  position:fixed!important;top:0;left:0;width:100%;
  height:var(--vvh,100dvh);z-index:500;
}
.view-fullscreen .ed-head{display:none}
/* Plus de hauteur codée en dur : le plan de travail prend ce qui reste.
   L'ancien `- 80px` supposait la hauteur de l'ancien chrome à quatre
   rangées et devenait faux à chaque changement de barre. */
.view-fullscreen .editor-workspace{flex:1 1 auto;min-height:0}

.size-hint{
  font-size:.7rem;color:var(--text4);white-space:nowrap;
  font-variant-numeric:tabular-nums;min-width:82px;
}

@keyframes zoneShake{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-3px)}
  75%{transform:translateX(3px)}
}

/* =========================================
   EDITOR TABS & WORKSPACE
   ========================================= */

.editor-workspace{display:flex;flex:1;overflow:hidden;position:relative;min-height:0}

.preview-pane{display:flex;flex:1;overflow-y:auto;background:var(--bg2);padding:12px;position:relative;flex-direction:column;min-height:0}

/* La barre de zoom a été RETIRÉE. Elle était en `position:absolute` dans
   .preview-pane, qui défile : un élément absolu y défile avec le contenu au
   lieu de rester collé au bord visible. Mesuré sur une bande de 220 mm : en
   haut de la bande elle était à 12 px du bas, en bas de la bande elle se
   retrouvait 641 px AU-DESSUS de l'écran — et entre les deux, en plein
   milieu du papier. La bande s'ajuste seule à la largeur (fitZoom).
   Ne pas la remettre sans la sortir du volet qui défile. */

/* =========================================
   BANDE SNEAKPEN — gabarit figé 40 mm × 220 mm

   La bande est composée à une échelle interne AGRANDIE
   (--band-mag) puis ramenée à sa taille d'affichage par
   un transform.

   Pourquoi : iOS Safari zoome de force sur tout champ
   éditable dont la police CALCULÉE est inférieure à 16 px.
   Notre texte fait 4 à 13 px — le téléphone zoomait donc
   à chaque fois qu'on touchait la zone d'écriture.
   À l'échelle 5, même le minimum (3 pt = 4 px) devient
   20 px calculés : iOS ne zoome plus jamais, et c'est
   l'application qui pilote son propre zoom.

   transform (et non zoom) : c'est une opération de peinture,
   elle ne modifie pas la taille de police calculée que
   Safari inspecte.
   ========================================= */
/* La réserve de 68 px au bas du volet existait pour dégager la barre de zoom.
   La barre a été retirée : il ne reste que le retrait de sécurité du bas
   d'écran (encoche, barre d'accueil). */
.preview-scroll{
  width:100%;display:flex;justify-content:center;
  padding-bottom:calc(12px + var(--safe-b));
}

/* Réserve la place VISUELLE de la bande (le transform, lui,
   ne consomme aucune place dans le flux). */
.band-frame{
  position:relative;flex:none;
  width:calc(40mm * var(--band-zoom, 1));
  height:calc(220mm * var(--band-zoom, 1));
  background:#fff;box-shadow:var(--sh-md);
  border:1px solid var(--border);border-radius:2px;
}

.preview-paper{
  position:absolute;top:0;left:0;
  width:calc(40mm * var(--band-mag));
  height:calc(220mm * var(--band-mag));
  transform:scale(calc(var(--band-zoom, 1) / var(--band-mag)));
  transform-origin:top left;
  background:#fff;color:#111;overflow:hidden;
}

/* Repères (coupe / pli / stops / biseaux) — générés depuis js/band.js */
.band-chrome{position:absolute;inset:0;pointer-events:none;z-index:2}
.band-chrome .band-svg{
  display:block;
  width:calc(40mm * var(--band-mag));
  height:calc(220mm * var(--band-mag));
}
.preview-paper[data-marks="off"] .band-chrome{display:none}

/* Zone de texte : 30 → 190 mm de haut, et 5 → 35 mm de large.
   Les 5 mm de chaque côté sont une MARGE DE SÉCURITÉ D'IMPRESSION : le texte
   courait auparavant d'un bord à l'autre des 40 mm, et toute imprimante a une
   bande non imprimable de 3 à 5 mm — le début et la fin de chaque ligne
   étaient rognés. Ces valeurs viennent de SPEC.zoneX / SPEC.zoneW dans
   js/band.js : les changer ici seul ferait diverger l'aperçu du PDF. */
.preview-content{
  position:absolute;top:calc(30mm * var(--band-mag));
  left:calc(5mm * var(--band-mag));
  width:calc(30mm * var(--band-mag));
  height:calc(160mm * var(--band-mag));
  padding:0;font-family:var(--body);
  font-size:30px;   /* posé par JS : pt -> px × --band-mag */
  line-height:1.15;column-count:1;column-gap:calc(.5mm * var(--band-mag));
  overflow:hidden;outline:none;cursor:text;z-index:1;
  -webkit-user-select:text;user-select:text;
  /* DÉCLARÉ EXPLICITEMENT, ne pas retirer.
     Le navigateur applique break-word d'office aux zones éditables, mais
     PAS au clone de mesure ni à la boîte de rendu PDF, qui ne le sont pas.
     Sans cette ligne, un mot long se coupait à l'écran et pas dans le PDF :
     la mise en page du fichier exporté ne correspondait plus à l'aperçu,
     et la jauge sous-estimait le remplissage. */
  overflow-wrap:break-word;
}
.preview-paper[data-marks="on"] .preview-content{
  outline:calc(.3mm * var(--band-mag)) dashed var(--accent-line);
  outline-offset:calc(-.15mm * var(--band-mag));
}
/* contenteditable laisse souvent un <br> résiduel : :empty ne suffit pas,
   c'est JS qui pose .is-empty */
.preview-content.is-empty::before{
  /* Gris chaud : ce texte est posé sur la bande, qui reste blanche. Un gris
     froid y jurait depuis le passage à l'encre et au papier. */
  content:attr(data-placeholder);color:#A39A88;pointer-events:none;font-style:italic;
}
/* Boîte de rasterisation PDF + boîte de mesure : hors flux de la bande */
.pdf-zone{position:static!important;top:auto!important;left:auto!important;outline:none!important}
/* Espacements en em : la mise en page reste juste de 3 pt à 10 pt.
   Les filets sont en mm, jamais en px : sous 0,125 mm ils disparaissent
   sur une tête thermique 203 dpi. */
.preview-content h1{font-size:1.45em;font-weight:700;margin:.35em 0 .12em;
  border-bottom:calc(.15mm * var(--band-mag)) solid #333;padding-bottom:.08em;break-after:avoid}
.preview-content h2{font-size:1.25em;font-weight:600;margin:.3em 0 .1em;break-after:avoid}
.preview-content h3{font-size:1.1em;font-weight:600;margin:.25em 0 .08em;break-after:avoid}
.preview-content p{margin:.06em 0}
.preview-content ul,.preview-content ol{padding-left:1.15em;margin:.06em 0}
.preview-content li{margin:0}
.preview-content blockquote{margin:.1em 0 .1em .6em;padding-left:.4em;
  border-left:calc(.15mm * var(--band-mag)) solid #999}
.preview-content hr{border:none;border-top:calc(.15mm * var(--band-mag)) solid #999;margin:.3em 0}
.preview-content .katex{font-size:1em}
.preview-content .katex-display{margin:.2em 0}
/* Une formule ne doit jamais élargir la bande */
.preview-content .math-rendered{max-width:100%;overflow:hidden}

/* =========================================
   SETTINGS
   ========================================= */

/* Même correctif que .home-body : les réglages non plus ne défilaient pas. */
.settings-body{
  flex:1 1 auto;min-height:0;
  overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding:8px 20px 20px;padding-bottom:calc(24px + var(--safe-b));
  max-width:560px;margin:0 auto;width:100%;
}
.settings-group{margin-top:24px}
.settings-group-title{
  font-family:var(--heading);font-size:.72rem;font-weight:700;
  color:var(--text4);text-transform:uppercase;letter-spacing:.06em;
  margin-bottom:8px;padding-left:4px;
}

.settings-card{
  background:var(--bg);border:1px solid var(--border);
  border-radius:var(--r-md);overflow:hidden;
}
.setting-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:15px 16px;gap:12px;
}
.setting-row+.setting-row{border-top:1px solid var(--border)}

/* Le libellé et sa description sont deux <span>, donc en ligne : ils se
   retrouvaient collés sur la même ligne, qui débordait ensuite sous le
   sélecteur. Le margin-top de la description n'avait aucun effet, un span
   étant inline. On empile explicitement. */
.setting-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.setting-label{font-size:.92rem;font-weight:500;color:var(--text)}
.setting-desc{font-size:.78rem;color:var(--text4);line-height:1.35}

.setting-select{
  flex:none;   /* sans ça il se comprimait quand la description est longue */
  padding:7px 28px 7px 10px;background:var(--input);border:1px solid var(--border);
  color:var(--text);font-size:.86rem;border-radius:var(--r-xs);outline:none;
  -webkit-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239A9182' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 8px center;
}

.settings-actions{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.settings-footer{text-align:center;padding:28px 0 8px;color:var(--text4);font-size:.78rem}

/* =========================================
   MODAL (bottom sheet)
   ========================================= */

/* bottom:var(--kb) : la feuille se pose sur le clavier au lieu de passer
   dessous. inset:0 fixerait bottom:0, donc le bas de l'écran. */
.modal{position:fixed;inset:0;bottom:var(--kb,0px);z-index:1000;display:flex;align-items:flex-end;justify-content:center}
.modal-backdrop{
  position:absolute;inset:0;background:rgba(0,0,0,.3);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  animation:fadeIn .2s var(--ease);
}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

.modal-sheet{
  position:relative;background:var(--bg);
  border-radius:var(--r-lg) var(--r-lg) 0 0;
  box-shadow:var(--sh-lg);width:100%;max-height:90dvh;
  overflow-y:auto;animation:slideUp .3s var(--spring);
}
.modal-sheet-sm{max-width:100%}
@keyframes slideUp{from{transform:translateY(100%)}to{transform:translateY(0)}}

.modal-handle{
  width:36px;height:4px;background:var(--border2);
  border-radius:2px;margin:8px auto 0;
}

.modal-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px 10px;
}
.modal-header h3{font-family:var(--heading);font-size:1.05rem;font-weight:650}
.modal-close{
  width:32px;height:32px;background:var(--bg3);border-radius:50%;
}
.modal-close svg{width:16px;height:16px}

.modal-body{padding:0 20px 12px}
.modal-actions{
  display:flex;gap:10px;padding:12px 20px;
  padding-bottom:calc(12px + var(--safe-b));
  border-top:1px solid var(--border);
}

/* Fields */
.field{margin-bottom:14px}
.field label{
  display:block;font-size:.7rem;font-weight:700;color:var(--text4);
  text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px;
}
.field textarea{
  width:100%;padding:10px 14px;background:var(--input);
  border:1.5px solid var(--border);color:var(--text);
  font-size:.9rem;font-family:var(--mono);border-radius:var(--r-sm);
  outline:none;resize:vertical;line-height:1.5;
  transition:border-color .15s var(--ease);
}
.field textarea:focus{border-color:var(--accent)}

/* Math preview */
.math-preview{
  min-height:52px;padding:12px;background:var(--bg3);
  border-radius:var(--r-sm);display:flex;align-items:center;
  justify-content:center;font-size:1.2rem;overflow-x:auto;
  border:1px solid var(--border);color:var(--text);
}
.math-preview .katex-error{color:var(--red);font-size:.82rem}

/* Snippet tabs */
.snippet-tabs{
  display:flex;gap:4px;margin-bottom:8px;overflow-x:auto;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-bottom:2px;
}
.snippet-tabs::-webkit-scrollbar{display:none}
.snippet-tab{
  padding:6px 14px;border:none;background:var(--bg3);
  color:var(--text3);font-size:.76rem;font-weight:600;
  border-radius:var(--r-pill);cursor:pointer;white-space:nowrap;
  transition:all .12s var(--ease);flex-shrink:0;
}
.snippet-tab.active{background:var(--accent-bg);color:var(--accent)}

.snippet-panel{display:none;flex-wrap:wrap;gap:5px}
.snippet-panel.active{display:flex}

.chip{
  padding:6px 11px;background:var(--bg3);border:1px solid var(--border);
  color:var(--text2);font-size:.78rem;border-radius:var(--r-pill);
  cursor:pointer;font-family:serif;
  transition:all .1s var(--ease);
}
.chip:active{background:var(--accent-bg);border-color:var(--accent);color:var(--accent);transform:scale(.93)}

/* Confirm */
.confirm-body{padding:24px 20px;padding-bottom:calc(20px + var(--safe-b))}
.confirm-body h3{font-family:var(--heading);font-size:1.1rem;font-weight:650;margin-bottom:6px}
.confirm-body p{color:var(--text3);font-size:.9rem;margin-bottom:20px;line-height:1.45}
.confirm-actions{display:flex;gap:10px}
.confirm-actions .btn-outline,.confirm-actions .btn-filled{flex:1;justify-content:center}

/* =========================================
   TOAST
   ========================================= */

#toast-container{
  position:fixed;bottom:calc(24px + var(--safe-b) + var(--kb,0px));left:50%;
  transform:translateX(-50%);z-index:2000;
  display:flex;flex-direction:column;gap:8px;
  pointer-events:none;width:calc(100% - 40px);max-width:340px;
}
.toast{
  padding:13px 20px;background:var(--text);border:none;
  border-radius:var(--r-pill);color:var(--bg);
  font-size:.86rem;font-weight:500;box-shadow:var(--sh-md);
  animation:toastIn .3s var(--spring) forwards;
  pointer-events:auto;text-align:center;
}
.toast.toast-success{background:var(--green);color:#fff}
.toast.toast-error{background:var(--red);color:#fff}
.toast.toast-out{animation:toastOut .25s var(--ease) forwards}
@keyframes toastIn{from{opacity:0;transform:translateY(12px) scale(.95)}to{opacity:1;transform:none}}
@keyframes toastOut{from{opacity:1;transform:none}to{opacity:0;transform:translateY(12px) scale(.95)}}

/* =========================================
   LOADING
   ========================================= */

.loading-overlay{
  position:fixed;inset:0;bottom:var(--kb,0px);background:rgba(0,0,0,.45);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  z-index:3000;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:16px;color:#fff;
  font-size:.92rem;font-weight:500;
}
.loading-spinner{
  width:32px;height:32px;border:3px solid rgba(255,255,255,.2);
  border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* =========================================
   IMPRESSION DEPUIS LE NAVIGATEUR
   La bande ne s'imprime jamais depuis le DOM : le seul
   chemin fiable est le PDF 40 × 220 mm. Si quelqu'un
   lance Ctrl+P hors de l'éditeur, on l'explique.
   ========================================= */

@media print{
  body>*{display:none!important}
  body::after{
    content:"SneakPen — utilise le bouton PDF pour obtenir la bande de 220 x 40 mm, puis imprime ce PDF a taille reelle (100 %).";
    display:block;padding:24mm 20mm;font-family:Arial,sans-serif;
    font-size:11pt;line-height:1.6;color:#000;
  }
  @page{margin:0}
}

/* =========================================
   COMPOSANTS COMPLÉMENTAIRES
   ========================================= */

.noscript{
  padding:16px 20px;margin:16px;background:var(--red-bg);
  border:1px solid var(--red);border-radius:var(--r-md);
  color:var(--red);font-size:.9rem;text-align:center;
}

/* Écran d'échec : affiché seulement si un fichier de l'app n'a pas pu
   se charger. Il remplace un message technique incompréhensible par
   une explication et un bouton qui répare vraiment. */
.fatal-screen{
  position:fixed;inset:0;z-index:5000;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:14px;padding:32px 24px;text-align:center;
  background:var(--bg);color:var(--text);
}
.fatal-screen h2{font-family:var(--heading);font-size:1.15rem;font-weight:700}
.fatal-screen p{font-size:.9rem;color:var(--text3);line-height:1.5;max-width:34ch}
.fatal-screen code{
  font-family:var(--mono);font-size:.76rem;color:var(--text4);
  background:var(--bg3);padding:8px 12px;border-radius:var(--r-xs);
  max-width:100%;overflow-wrap:anywhere;
}
.fatal-screen .btn-filled{flex:none;min-width:220px;margin-top:6px}

/* Glyphes de la barre d'outils (plus d'inline style) */
.more-glyph sup,.more-glyph sub{font-size:.62em}
.tb-highlight{font-weight:700;font-size:14px;background:#FBBF24;color:#111;padding:0 3px;border-radius:2px}
.tb-color{font-weight:700;font-size:15px;border-bottom:3px solid var(--accent);line-height:1.1}
.tb-sigma{font-family:'Times New Roman',serif;font-style:italic;font-size:15px}
.tb-pi{font-family:serif;font-size:14px}
input[type="color"]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}

/* Jauge : dépassement explicite plutôt que silencieux */
.toast{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.toast-actions{display:flex;gap:6px;flex-shrink:0}
.toast-action{
  border:none;background:rgba(255,255,255,.22);color:inherit;
  padding:5px 12px;border-radius:var(--r-pill);
  font-size:.8rem;font-weight:700;cursor:pointer;flex-shrink:0;
  touch-action:manipulation;
}
.toast-action:hover{background:rgba(255,255,255,.34)}

/* Stockage */
.setting-row-stack{flex-direction:column;align-items:stretch;gap:10px}
.storage-bar{height:5px;background:var(--bg3);border-radius:3px;overflow:hidden}
.storage-bar-fill{height:100%;background:var(--accent);border-radius:3px;transition:width .3s var(--ease)}
.storage-bar-fill.warn{background:var(--orange)}
.storage-bar-fill.full{background:var(--red)}

/* Modèles */
.templates-hint{margin-top:12px;font-size:.75rem;color:var(--text4);text-align:center}
.template-icon-custom{background:var(--green-bg);color:var(--green)}
.template-card.holding{transform:scale(.96);border-color:var(--red);background:var(--red-bg)}
.empty-icon svg{color:var(--border2)}

/* Aperçu de formule */
.math-preview-hint{color:var(--text4);font-size:.85rem}
.math-preview-error{color:var(--red);font-size:.82rem;word-break:break-word}

/* =========================================
   AIDE « COMMENT ÇA MARCHE »
   ========================================= */

.modal-sheet-help{max-width:640px}
.help-body{padding-bottom:20px}
.help-layout{display:flex;gap:20px;align-items:flex-start}
.help-band{flex:none;background:#fff;border:1px solid var(--border);border-radius:6px;padding:4px}
.help-band svg{display:block;width:26mm;height:143mm}

.help-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px;flex:1;min-width:0}
.help-steps li{display:flex;gap:10px;font-size:.86rem;line-height:1.5;color:var(--text2)}
.help-steps b{color:var(--text)}
.help-step-n{
  flex:none;width:22px;height:22px;border-radius:50%;
  background:var(--accent);color:var(--on-accent);font-size:.72rem;font-weight:700;
  display:flex;align-items:center;justify-content:center;margin-top:1px;
}
.help-stop{color:var(--red)}
.help-note{
  margin-top:18px;padding:12px 14px;background:var(--accent-bg);
  border-radius:var(--r-sm);font-size:.82rem;line-height:1.55;color:var(--text2);
}

@media(max-width:560px){
  .help-layout{flex-direction:column;align-items:center}
  .help-band svg{width:20mm;height:110mm}
}

/* =========================================
   ACCESSIBILITÉ
   ========================================= */

:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.preview-content:focus-visible{outline:none}
.sheet-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
}

/* =========================================
   SCROLLBAR
   ========================================= */

::-webkit-scrollbar{width:3px;height:3px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

/* =========================================
   RESPONSIVE
   ========================================= */

@media(min-width:640px){
  .templates-grid{grid-template-columns:repeat(3,1fr)}
}
@media(min-width:768px){
  .modal{align-items:center}
  .modal-sheet{border-radius:var(--r-lg);max-width:480px}
  .modal-sheet-sm{max-width:380px}
  .modal-handle{display:none}
  .modal-sheet{animation:modalPop .25s var(--spring)}
  @keyframes modalPop{from{opacity:0;transform:scale(.92) translateY(10px)}to{opacity:1;transform:none}}
}
/* =========================================
   MOBILE — cible principale
   ========================================= */

@media(max-width:1023px){
  #btn-fullscreen{display:none}

  /* Cibles tactiles : rien en dessous de 40 px */
  .btn-icon{width:42px;height:42px}
  .btn-icon svg{width:21px;height:21px}
  .ed-btn{min-width:40px;height:40px}
  .more-item{min-height:78px}
  .math-sym{min-width:36px;height:36px}
  .header-right .btn-icon{width:38px;height:38px}
  .btn-primary-pill{padding:8px 14px}

  /* Clavier ouvert : on rend la place à la bande. Les réglages de
     composition ne servent pas pendant la frappe. */
  /* Les deux rangees restent VISIBLES clavier ouvert : c'est tout
     l'interet d'un chrome fixe. Avant, trois barres disparaissaient
     en cours de frappe et la mise en page sautait. */
  /* Le retrait du volet ne change PAS avec le clavier : fitZoom se calcule
     sur la largeur disponible, donc toucher au padding faisait sauter la
     taille du papier au moment précis où on commençait à écrire. */

  /* La barre d'outils défile : on le signale par un dégradé au bord. */
}

/* Sur écran étroit la barre de composition passe sur deux lignes plutôt
   que de défiler : le choix des colonnes restait hors champ. */
@media(max-width:560px){
}

@media(max-width:480px){
  .app-header{padding-left:calc(8px + env(safe-area-inset-left,0px));
              padding-right:calc(8px + env(safe-area-inset-right,0px))}
  .size-hint{display:none}
  .home-body{padding:0 14px 100px;padding-bottom:calc(100px + var(--safe-b))}
  .home-hero{padding:16px 0 14px}
  .home-hero h2{font-size:1.3rem}
  .settings-body{padding:8px 14px 20px;padding-bottom:calc(24px + var(--safe-b))}
  .btn-primary-pill{padding:8px 12px;font-size:.8rem;gap:4px}
  .preview-pane{padding:8px}
}
@media(min-width:1024px){
  .preview-pane .preview-scroll{flex:1;overflow-y:auto;display:flex;justify-content:center;align-items:flex-start;padding:16px}
  .templates-grid{grid-template-columns:repeat(3,1fr)}
}

/* =========================================
   iOS — JAMAIS MOINS DE 16 px DANS UN CHAMP DE SAISIE

   Safari agrandit de force TOUTE la page dès qu'on touche un champ dont la
   police calculée est inférieure à 16 px, et ne la remet jamais droite.
   C'est ce qui faisait « zoomer dans le papier » : le champ Titre tombait à
   15,20 px sous 480 px de large, et la recherche à 14,40 px partout.

   La zone d'écriture, elle, n'a jamais été concernée : l'échelle interne
   --band-mag la maintient à 20 px calculés même au minimum de 3 pt.
   Les <input type="color"> n'ouvrent pas de clavier et ne déclenchent pas
   l'agrandissement : ils restent à leur taille.

   Ce bloc est volontairement en DERNIER : il doit l'emporter sur les
   réglages des media queries ci-dessus, à spécificité égale.
   ========================================= */
@media(max-width:900px){
  .ed-name,
  .search-bar input,
  input[type="text"],input[type="search"],input[type="number"],
  input[type="email"],input[type="url"],input[type="tel"],
  input[type="password"],textarea{
    font-size:16px;
  }
}
