:root {
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f4f5f7;
  --card: #ffffff;
  --accent: #3d5a80;
  --accent-dark: #2e4560;
  --ok: #2e7d32;
  --warn: #b26a00;
  --err: #b3261e;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; -webkit-font-smoothing: antialiased;
}
#root { height: 100%; }
.center-msg { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--muted); }

button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
input[type="text"], input[type="number"], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label .hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.field-row { display: flex; gap: 12px; }
.field-row > div { flex: 1; }

.btn {
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn.danger { color: var(--err); }
.btn.danger:hover { border-color: var(--err); }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Connexion ---------- */
.login-wrap { display: flex; height: 100%; align-items: center; justify-content: center; }
.login-card {
  background: var(--card); border-radius: 16px; padding: 36px; width: 360px;
  box-shadow: 0 8px 40px rgba(31, 36, 48, .10);
}
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card .sub { color: var(--muted); margin-bottom: 18px; }
.login-card .btn { width: 100%; margin-top: 18px; padding: 11px; }
.login-error { color: var(--err); margin-top: 12px; font-size: 13px; }

/* ---------- Barre supérieure ---------- */
.topnav {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 12px 20px; position: sticky; top: 0; z-index: 20;
}
.topnav .brand { font-weight: 700; font-size: 15px; }
.topnav .brand span { color: var(--accent); }
.topnav .spacer { flex: 1; }
.topnav .who { color: var(--muted); font-size: 13px; }

/* ---------- Tableau de bord ---------- */
.dash { max-width: 1000px; margin: 0 auto; padding: 28px 20px; }
.dash h2 { font-size: 18px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.pcard .name { font-weight: 700; font-size: 16px; }
.pcard .meta { color: var(--muted); font-size: 12px; }
.pcard .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pcard.new {
  border-style: dashed; align-items: center; justify-content: center;
  color: var(--muted); min-height: 140px; cursor: pointer; text-align: center;
}
.pcard.new:hover { color: var(--accent); border-color: var(--accent); }
.pcard.new .plus { font-size: 34px; line-height: 1; font-weight: 300; }

/* ---------- Éditeur ---------- */
.editor { display: flex; height: calc(100% - 49px); }
.steps {
  width: 240px; background: var(--card); border-right: 1px solid var(--line);
  padding: 18px 0; display: flex; flex-direction: column; flex-shrink: 0;
}
.steps .pname { padding: 0 18px 12px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.steps .pname .slug { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.step {
  display: flex; gap: 12px; align-items: center; padding: 11px 18px;
  border: none; background: none; text-align: left; width: 100%; color: var(--ink);
}
.step:hover { background: var(--bg); }
.step.active { background: #eef2f8; box-shadow: inset 3px 0 0 var(--accent); }
.step .n {
  width: 26px; height: 26px; border-radius: 50%; background: var(--bg);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--muted); flex: none;
}
.step.active .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.step .t { font-weight: 600; font-size: 13.5px; }
.step .d { color: var(--muted); font-size: 11.5px; }
.steps .bottom { margin-top: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.savestate { font-size: 12px; color: var(--muted); text-align: center; min-height: 16px; }
.savestate.saving { color: var(--warn); }

.panel { flex: 1; overflow-y: auto; padding: 26px 30px 80px; }

/* aperçu smartphone — 1:1 SANS mise à l'échelle (les transformations
   d'échelle débordent selon les navigateurs) : l'écran interne fait
   exactement la taille intérieure du cadre, comme un téléphone compact. */
.phone-prev {
  width: 350px; flex: none; border-left: 1px solid var(--line);
  background: #f0f1f3; padding: 20px 14px; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.phone-frame {
  width: 305px; height: 640px; flex: none;
  border: 9px solid #23262e; border-radius: 32px; overflow: hidden;
  background: #fff; box-shadow: 0 12px 40px rgba(31, 36, 48, .22);
}
.phone-frame iframe { width: 287px; height: 622px; border: none; display: block; }
.prev-hint { font-size: 12px; color: var(--muted); text-align: center; }
.prev-langs { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.plang {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 3px 8px; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--muted);
}
.plang.on { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 1150px) { .phone-prev { display: none; } }
.panel h2 { font-size: 18px; margin-bottom: 4px; }
.panel .lead { color: var(--muted); margin-bottom: 18px; }
.box {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; margin-bottom: 16px;
}
.box h3 { font-size: 14px; margin-bottom: 4px; }
/* l'indication d'un titre de section se collait au titre */
.box h3 .hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 8px; }

/* multilingue */
.ml { display: flex; flex-direction: column; gap: 6px; }
.ml .one { display: flex; align-items: center; gap: 8px; }
.ml .tag {
  min-width: 34px; text-align: center; font-size: 11px; font-weight: 700;
  color: var(--accent); background: #eef2f8; border-radius: 6px; padding: 4px 0;
  text-transform: uppercase;
}

/* couleurs */
.colors { display: flex; gap: 18px; flex-wrap: wrap; }
.colorpick { display: flex; align-items: center; gap: 10px; }
.colorpick input[type="color"] {
  width: 46px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 2px; background: #fff; cursor: pointer;
}
.preview-phone {
  width: 220px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 4px 18px rgba(31,36,48,.10); flex: none;
}
.preview-phone .ph-hero { padding: 18px 12px; color: #fff; text-align: center; font-weight: 700; }
.preview-phone .ph-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.preview-phone .ph-card {
  background: #fff; border-radius: 9px; padding: 9px 10px; font-size: 12px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.09);
}
.preview-phone .ph-num {
  width: 22px; height: 22px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
}

/* uploads & médias */
.dropzone {
  border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); color: var(--accent); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb { position: relative; width: 130px; }
.thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); }
.thumb .bar { display: flex; gap: 4px; margin-top: 4px; justify-content: center; }
.thumb .bar button {
  border: 1px solid var(--line); background: #fff; border-radius: 6px;
  padding: 2px 7px; font-size: 12px;
}
.thumb .bar button:hover { border-color: var(--accent); color: var(--accent); }
.thumb input.tc { margin-top: 4px; padding: 4px 6px; font-size: 12px; text-align: center; }

/* langues */
.lang-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-weight: 600;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* listes parcours / poi */
.rowitem {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 8px;
}
.rowitem .grow { flex: 1; min-width: 0; }
.rowitem .t { font-weight: 600; }
.rowitem .s { color: var(--muted); font-size: 12px; }
.rowitem .kc {
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg); flex: none;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.rowitem.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.iconbtn {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  width: 28px; height: 28px; font-size: 14px; line-height: 1;
}
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }

.audio-lang { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.audio-lang audio { height: 32px; flex: 1; }

.toggle { display: flex; align-items: center; gap: 10px; }
.toggle input { width: auto; }

.pubbanner {
  background: #e8f5e9; color: var(--ok); border-radius: 10px; padding: 12px 16px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pubbanner a { color: inherit; font-weight: 700; }

.pwd-reveal {
  background: #eef2f8; border: 1px dashed var(--accent); border-radius: 10px;
  padding: 14px; margin: 12px 0; font-size: 15px;
}
.pwd-reveal code { font-size: 17px; font-weight: 700; letter-spacing: 1px; }

table.users { width: 100%; border-collapse: collapse; }
table.users th, table.users td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.users th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

.muted { color: var(--muted); }
.mt { margin-top: 14px; }

/* choix du mode de défilement des photos */
.modes { display: flex; gap: 12px; flex-wrap: wrap; }
.modes .mode {
  flex: 1; min-width: 240px; display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  cursor: pointer; font-weight: 400; margin: 0;
}
.modes .mode.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #f6f8fb; }
.modes .mode input { width: auto; margin-top: 3px; }
.modes .mode small { color: var(--muted); }

.thumb .tcrow {
  display: flex; align-items: center; gap: 5px; margin-top: 4px;
  font-size: 11px; color: var(--muted); justify-content: center;
}
.thumb .tcrow .tc { width: 54px; margin-top: 0; }

/* placement sur le plan */
.plan-pick {
  position: relative; margin-top: 8px; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; cursor: crosshair; max-width: 640px;
}
.plan-pick img { width: 100%; display: block; }
.plan-dot {
  position: absolute; transform: translate(-50%, -50%);
  min-width: 26px; height: 26px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}

/* toast de conseil */
.toast {
  position: fixed; right: 20px; bottom: 20px; max-width: 380px; z-index: 100;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 13px 16px;
  font-size: 13px; line-height: 1.45; opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s; box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: none; }

/* ---------- statistiques ---------- */
.statcards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.statcard {
  flex: 1 1 150px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
}
.statcard b { display: block; font-size: 30px; line-height: 1.1; color: var(--accent); }
.statcard span { font-size: 12.5px; color: var(--muted); }

.statrow { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.statlabel { flex: 0 0 46%; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statbar { flex: 1; height: 10px; background: #eef1f5; border-radius: 5px; overflow: hidden; }
.statbar span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.statval { flex: 0 0 42px; text-align: right; font-size: 13px; font-weight: 700; }

/* histogramme des visites par jour */
.daychart {
  display: flex; align-items: flex-end; gap: 4px; height: 130px;
  padding-top: 8px; overflow-x: auto;
}
.daybar {
  flex: 1 1 22px; max-width: 44px;      /* un seul jour ne doit pas remplir la largeur */
  display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; height: 100%; gap: 4px;
}
.daybar span {
  width: 100%; min-height: 3px; background: var(--accent);
  border-radius: 4px 4px 0 0;
}
.daybar em { font-size: 10px; color: var(--muted); font-style: normal; }

/* cartel : les champs sont courts, on les met côte à côte quand la place
   le permet. Chaque .cfield contient SON libellé et SES champs de langue —
   sans cette encapsulation la grille séparerait l'étiquette de son champ. */
.cartelgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0 22px; align-items: start;
}
.cartelgrid .cfield { min-width: 0; }            /* autorise le rétrécissement */
.cartelgrid .cfield label { margin-top: 12px; }
.cartelgrid .cfield input { min-width: 0; }

/* ---------- adaptation tablette / téléphone ----------
   L'éditeur est pensé pour un écran large, mais il doit rester utilisable
   sur une tablette en salle ou sur un téléphone : la colonne d'étapes
   devient une barre horizontale et le contenu passe pleine largeur. */
@media (max-width: 900px) {
  .editor { flex-direction: column; height: auto; }
  .steps {
    width: 100%; flex-direction: row; align-items: center;
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 8px 10px; gap: 6px; overflow-x: auto; position: sticky; top: 49px; z-index: 15;
    background: var(--card);
  }
  .steps::-webkit-scrollbar { display: none; }
  .steps .pname { display: none; }               /* le nom du projet est déjà en haut */
  .step {
    width: auto; flex: none; padding: 8px 12px; border-radius: 9px; gap: 8px;
  }
  .step.active { box-shadow: none; }
  .step .d { display: none; }                    /* on garde le titre de l'étape */
  .step .t { white-space: nowrap; font-size: 13px; }
  .steps .bottom {
    margin-top: 0; margin-left: auto; flex-direction: row;
    align-items: center; gap: 8px;
    /* La barre défile horizontalement : sans cet ancrage, « Publier »
       — l'action la plus importante — sortirait de l'écran. */
    position: sticky; right: 0; padding: 0 0 0 12px; background: var(--card);
    box-shadow: -10px 0 10px -7px rgba(31, 36, 48, .18);
  }
  .steps .bottom .savestate { display: none; }
  .steps .bottom a.btn { display: none; }        /* l'export reste sur grand écran */
  .steps .bottom .btn.primary { white-space: nowrap; padding: 8px 14px; }
  /* En colonne, c'est la PAGE qui défile : laisser en plus le panneau
     scroller donnait deux ascenseurs imbriqués et des écrans blancs. */
  .panel { padding: 18px 16px 60px; overflow-y: visible; }
  html, body, #root { height: auto; }
}

@media (max-width: 620px) {
  /* la barre du haut se cassait sur deux lignes */
  .topnav { padding: 10px 12px; gap: 10px; }
  .topnav .brand, .topnav .btn { white-space: nowrap; }
  .topnav .who { display: none; }
  .panel { padding: 14px 12px 60px; }
  .box { padding: 14px; }
  .field-row { flex-direction: column; gap: 0; }
  /* une ligne « fichier + lecteur + bouton » ne tient pas sur un téléphone */
  .audio-lang { flex-wrap: wrap; }
  .audio-lang audio { flex: 1 0 100%; order: 3; }
  .rowitem { flex-wrap: wrap; }
  .rowitem .grow { flex: 1 0 100%; }
  .colors { flex-direction: column; gap: 10px; }
  .statlabel { flex: 0 0 100%; }
  .statrow { flex-wrap: wrap; }
}

/* ---------- camembert des langues ---------- */
.donutwrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.donut { width: 140px; height: 140px; flex: none; }
.donut .dseg { transition: opacity .15s; }
.donutwrap:hover .dseg { opacity: .55; }
.donutwrap .dseg:hover { opacity: 1; }
/* Le texte porte l'encre, jamais la couleur de la série */
.donut .d-num { font-size: 26px; font-weight: 700; fill: var(--ink); }
.donut .d-lab { font-size: 11px; fill: var(--muted); }

.dlegend { list-style: none; flex: 1 1 220px; min-width: 200px; }
.dlegend li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.dlegend li:last-child { border-bottom: none; }
.dchip { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.dname { flex: 1; }
.dpct { font-weight: 700; font-variant-numeric: tabular-nums; }
.dcount { color: var(--muted); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- éditeur de nœuds (boîtiers de salle) ---------- */
.nebox { padding: 0; overflow: hidden; }
.ne { display: grid; grid-template-columns: 168px 1fr 260px; height: 520px; }
.ne-palette { border-right: 1px solid var(--line); padding: 12px 10px; overflow-y: auto; background: #fafbfc; }
.ne-ptitle { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
             color: var(--muted); margin: 10px 0 6px; }
.ne-ptitle:first-child { margin-top: 0; }
.ne-add {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 5px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 13px; text-align: left; color: var(--ink);
}
.ne-add:hover { border-color: var(--accent); color: var(--accent); }
.ne-add span { width: 20px; text-align: center; color: var(--muted); }

/* toile : quadrillage discret pour situer les nœuds sans les écraser */
.ne-canvas {
  position: relative; overflow: auto; background: #fff;
  background-image: radial-gradient(circle, #e3e6ea 1px, transparent 1px);
  background-size: 18px 18px;
  /* Le défilement tactile appartient à la toile ; seul le déplacement des
     nœuds le confisque (touch-action:none posé sur .ne-node, pas ici) —
     sinon impossible de faire défiler le programme sur un téléphone. */
}
.ne-wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ne-wire { fill: none; stroke: var(--accent); stroke-width: 2; pointer-events: none; }
/* Zone de prise invisible de 16 px le long de chaque fil : la sélection se
   fait au doigt. Désactivée pendant le tirage d'un nouveau fil. */
.ne-wire-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; }
.ne-wgroup { cursor: pointer; }
.ne-wgroup:hover .ne-wire { stroke: var(--err); stroke-width: 3; }
.ne-wires.linking .ne-wire-hit { pointer-events: none; }
/* Le fil en cours de tirage ne doit JAMAIS intercepter le dépôt : il se
   termine pile sous le curseur et volerait le clic destiné au nœud. */
.ne-wire.draft { stroke-dasharray: 5 4; opacity: .6; pointer-events: none; }

.ne-node {
  position: absolute; width: 190px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px;
  box-shadow: 0 2px 8px rgba(31, 36, 48, .10); cursor: grab; user-select: none;
  touch-action: none;   /* le doigt posé sur un nœud le déplace, il ne fait pas défiler */
}
.ne-node.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(61, 90, 128, .25); }
.ne-node.fam-trigger { border-left: 4px solid #eb6834; }
.ne-node.fam-action { border-left: 4px solid var(--accent); }
.ne-head { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.ne-ico { color: var(--muted); }
.ne-sum { font-size: 11.5px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.ne-port {
  position: absolute; top: 16px; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); cursor: crosshair;
}
.ne-port.in { left: -7px; }
.ne-port.out { right: -7px; background: var(--accent); }
/* Zone de prise invisible bien plus large que le point : un fil s'attrape
   au doigt comme à la souris sans viser au pixel près. */
.ne-port::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; }
/* Écran tactile : la zone de prise atteint la taille d'un doigt (~50 px). */
@media (pointer: coarse) { .ne-port::after { inset: -20px; } }
.ne-port.out:hover { transform: scale(1.35); }
/* Pendant le tirage d'un fil : cibles possibles soulignées, cible survolée allumée */
.ne-node.ne-can { outline: 2px dashed rgba(61, 90, 128, .5); outline-offset: 3px; }
.ne-node.ne-hover { outline: 3px solid var(--accent); outline-offset: 3px; }

.ne-inspector { border-left: 1px solid var(--line); padding: 14px; overflow-y: auto; background: #fafbfc; }
.ne-inspector h4 { font-size: 14px; margin-bottom: 4px; }
.ne-inspector label { margin: 12px 0 5px; font-size: 13px; }
.ne-insp-actions { margin-top: 18px; }

@media (max-width: 1000px) {
  .ne { grid-template-columns: 1fr; height: auto; }
  .ne-palette { border-right: none; border-bottom: 1px solid var(--line); display: flex;
                flex-wrap: wrap; gap: 6px; }
  .ne-ptitle { width: 100%; margin: 4px 0 2px; }
  .ne-add { width: auto; margin-bottom: 0; }
  .ne-canvas { height: 420px; }
  .ne-inspector { border-left: none; border-top: 1px solid var(--line); }
}
/* étapes sans rapport avec la PWA : l'aperçu laisse la place au contenu */
.editor.no-prev .phone-prev { display: none; }
