/* ================================================================
   Maquette OF — feuille de style
   1. Interface d'édition (panneau de gauche)
   2. Écran simulé (le téléphone)
   ================================================================ */

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #14161a;
  color: #e7e9ee;
  overflow: hidden;
}

body { display: flex; }

/* ---------------------------------------------------------------
   1. PANNEAU D'ÉDITION
   --------------------------------------------------------------- */

#editor {
  width: 390px;
  flex: 0 0 390px;
  height: 100%;
  overflow-y: auto;
  background: #1b1e24;
  border-right: 1px solid #2a2f38;
  padding: 18px 18px 60px;
}

#editor h1 {
  margin: 0 0 18px;
  font-size: 19px;
  letter-spacing: .3px;
}
#editor h1 small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #7c8697;
  letter-spacing: 0;
  margin-top: 2px;
}

#editor section {
  border: 1px solid #2a2f38;
  border-radius: 10px;
  padding: 12px 12px 14px;
  margin-bottom: 12px;
  background: #20242b;
}

#editor h2 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #00aff0;
}

#editor label {
  display: block;
  font-size: 12px;
  color: #9aa4b4;
  margin-bottom: 9px;
}
#editor label.check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d3d8e2;
  margin-bottom: 7px;
  cursor: pointer;
}

#editor input[type=text],
#editor input[type=number],
#editor select,
#editor textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  color: #eef1f6;
  background: #171a20;
  border: 1px solid #333a45;
  border-radius: 6px;
  resize: vertical;
}
#editor input:focus, #editor select:focus, #editor textarea:focus {
  outline: none;
  border-color: #00aff0;
}
#editor input[type=color] {
  width: 100%;
  height: 30px;
  margin-top: 4px;
  padding: 2px;
  background: #171a20;
  border: 1px solid #333a45;
  border-radius: 6px;
}
#editor input[type=file] {
  width: 100%;
  margin-top: 4px;
  font-size: 11px;
  color: #9aa4b4;
}
#editor input[type=range] { width: 100%; accent-color: #00aff0; }
#editor input[type=checkbox] { accent-color: #00aff0; width: 15px; height: 15px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.val { float: right; color: #00aff0; }
.hint { font-size: 11px; color: #6f7889; margin: 6px 0 0; line-height: 1.4; }

button {
  font: inherit;
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #3a4250;
  background: #262b33;
  color: #dfe4ec;
  cursor: pointer;
}
button:hover { background: #2f3540; }
button.primary { background: #00aff0; border-color: #00aff0; color: #002331; font-weight: 600; }
button.primary:hover { background: #22bdf5; }
button.danger { color: #ff8a8a; border-color: #5a3236; }
button.wide { width: 100%; margin-top: 4px; }

/* fiches de publication dans l'éditeur */
.post-card {
  border: 1px solid #333a45;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #191d23;
}
.post-card > header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  cursor: pointer;
  user-select: none;
}
.post-card > header b { flex: 1; font-size: 12.5px; font-weight: 600; color: #dfe4ec; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-card > header button { padding: 2px 7px; font-size: 12px; line-height: 1.4; }
.post-card .body { padding: 4px 10px 10px; border-top: 1px solid #2a2f38; }
.post-card.closed .body { display: none; }

/* ---------------------------------------------------------------
   2. SCÈNE / APERÇU
   --------------------------------------------------------------- */

#stage {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #0d0f12;
  background-image:
    linear-gradient(45deg, #16191e 25%, transparent 25%, transparent 75%, #16191e 75%),
    linear-gradient(45deg, #16191e 25%, transparent 25%, transparent 75%, #16191e 75%);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
}

#phoneWrap { transform-origin: center center; }

#exitCapture {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 50;
  display: none;
  width: 34px; height: 34px;
  padding: 0;
  border-radius: 50%;
  opacity: .35;
}
#exitCapture:hover { opacity: 1; }

body.capture #editor { display: none; }
body.capture #stage { background: #000; }
body.capture #exitCapture { display: block; }

/* ---------------------------------------------------------------
   3. LE TÉLÉPHONE
   --------------------------------------------------------------- */

#phone {
  position: relative;                         /* ancre le menu latéral */
  width: var(--w, 414px);
  height: var(--h, 896px);
  -webkit-tap-highlight-color: transparent;   /* pas de flash gris au doigt */
  touch-action: manipulation;                 /* pas de délai de 300 ms */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  color: #000;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* --- barre d'état --- */
.statusbar {
  flex: 0 0 auto;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: #000;
  font-size: 16px;
  font-weight: 600;
}
.statusbar .right { display: flex; align-items: center; gap: 6px; }
.sig { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.sig i { width: 3px; background: currentColor; border-radius: 1px; opacity: .25; }
.sig i.on { opacity: 1; }
.sig i:nth-child(1) { height: 4px; }
.sig i:nth-child(2) { height: 6px; }
.sig i:nth-child(3) { height: 8.5px; }
.sig i:nth-child(4) { height: 11px; }
.statusbar .net { font-size: 13px; font-weight: 600; }
.batt {
  position: relative;
  width: 25px; height: 12px;
  border: 1.5px solid rgba(0,0,0,.4);
  border-radius: 3.5px;
  padding: 1.5px;
}
.batt::after {
  content: "";
  position: absolute; top: 3.5px; right: -3.5px;
  width: 2px; height: 4px;
  background: rgba(0,0,0,.3);
  border-radius: 0 1px 1px 0;
}
.batt i { display: block; height: 100%; border-radius: 1.5px; }

/* --- corps défilant --- */
.body-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.body-scroll::-webkit-scrollbar { width: 0; }

/* --- barre du haut --- */
.topbar {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid #eceff1;
}
.topbar .title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
}
.topbar .icons { display: flex; align-items: center; gap: 15px; color: #8a96a3; }
.topbar svg { display: block; }

/* --- publication --- */
.post { background: #fff; border-bottom: 8px solid #f4f6f7; }
.post:last-child { border-bottom: 0; }

.post-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 8px; }
.avatar {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #dfe3e6 center/cover no-repeat;
}
.avatar.ring { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #ff8a5b; }
.who { flex: 1; min-width: 0; padding-top: 2px; }
.who .name {
  display: flex; align-items: center; gap: 5px;
  font-size: 16px; font-weight: 600;
  white-space: nowrap; overflow: hidden;
}
.who .handle { font-size: 14.5px; color: #8a96a3; margin-top: 1px; }
.pmeta { flex: 0 0 auto; text-align: right; color: #8a96a3; padding-top: 3px; }
.pmeta .line1 { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 14px; }
.pmeta .dots { font-size: 15px; letter-spacing: 1px; color: #8a96a3; }
.pmeta .line2 {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  margin-top: 3px; font-size: 14px; color: #000;
}
.pmeta .line2 svg { color: #8a96a3; }

.post-text {
  padding: 4px 14px 12px;
  font-size: 16px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.post-text a, .post-text .mention { color: #00aff0; text-decoration: none; }

/* --- média --- */
.media { position: relative; background: #f1f3f4; line-height: 0; }
.media img, .media video { display: block; width: 100%; height: auto; }
.media.empty {
  height: 240px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #a8b4bb;
  font-size: 14px; line-height: 1.4;
  background: repeating-linear-gradient(45deg, #eef1f2, #eef1f2 12px, #e7ebed 12px, #e7ebed 24px);
}
body.edit .media.empty { color: #00aff0; }
.media.blurred img, .media.blurred video { filter: blur(22px); transform: scale(1.06); }
.media .lockover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.media .lockover .btn {
  padding: 11px 26px;
  border-radius: 22px;
  background: #00aff0;
  font-size: 14px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase;
  line-height: 1;
}
.watermark {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 8px 10px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  letter-spacing: .2px;
  pointer-events: none;
}

/* --- actions --- */
.actions {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 18px;
  padding: 13px 14px;
  color: #8a96a3;
}
.actions .act { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.actions .tip {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; letter-spacing: .2px; text-transform: uppercase;
  white-space: nowrap;          /* tient sur une ligne dès 390 px de large */
}
.actions svg { flex: 0 0 auto; }
.actions .spacer { flex: 1; }
.likes { padding: 0 14px 13px; font-size: 16px; }

/* le CSS l'emporte sur l'attribut fill="none" des icônes */
.actions .act.on svg { fill: #ff3040; stroke: #ff3040; }
.actions .act.on:last-child svg,
.actions [data-save].on svg { fill: #00aff0; stroke: #00aff0; }

/* mosaïque de l'onglet médias */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid3 .gcell { padding-top: 100%; background: #e7ebed center/cover no-repeat; }

/* --- profil --- */
.banner { position: relative; height: 190px; background: #cfd6da center/cover no-repeat; }
.banner .ovl {
  position: absolute; inset: 0;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0) 45%);
}
.banner .ovl .l1 { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 500; }
.banner .ovl .l1 .sp { flex: 1; }
.banner .ovl .stats {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0 0 38px;
  font-size: 13.5px;
}
.banner .ovl .stats span { display: flex; align-items: center; gap: 5px; }

.pro-head { position: relative; padding: 0 14px 12px; }
.pro-head .pav {
  position: absolute; top: -46px; left: 14px;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: #dfe3e6 center/cover no-repeat;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ff8a5b;
}
.pro-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 0 8px;
  color: #00aff0;
}
.pro-actions .circ {
  width: 46px; height: 46px;
  border: 1.5px solid #d9e2e6;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.pro-name { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 600; margin-top: 6px; }
.pro-handle { font-size: 15px; color: #8a96a3; margin-top: 2px; }
.pro-subs { margin-top: 5px; font-size: 15px; color: #00aff0; }
.pro-bio { font-size: 16px; line-height: 1.35; margin-top: 14px; white-space: pre-wrap; }
.pro-more { display: inline-block; margin-top: 12px; color: #00aff0; font-size: 16px; text-decoration: underline; }
.chips { display: flex; gap: 10px; padding: 14px 14px 4px; overflow-x: auto; }
.chips::-webkit-scrollbar { height: 0; }
.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 18px;
  background: #f1f4f5;
  font-size: 14.5px;
  white-space: nowrap;
}
.chip.on { background: #d8f0fb; }
.subbtn {
  margin: 12px 14px 0;
  border: 1px solid #d9e2e6;
  border-radius: 24px;
  padding: 13px 18px;
  display: flex; justify-content: space-between;
  color: #00aff0;
  font-size: 15px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .3px;
}
.tabs {
  display: flex;
  margin-top: 14px;
  border-bottom: 1px solid #eceff1;
}
.tabs div {
  flex: 1;
  padding: 15px 0;
  text-align: center;
  font-size: 14.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #000;
}
.tabs div.on { box-shadow: inset 0 -2px 0 #000; }
.sortbar {
  display: flex; align-items: center;
  padding: 14px;
  color: #8a96a3;
  font-size: 14.5px;
  text-transform: uppercase; letter-spacing: .4px;
}
.sortbar .sp { flex: 1; }
.sortbar .ic { display: flex; gap: 22px; }

/* --- menu latéral --- */
.drawer { position: absolute; top: 0; left: 0; right: 0; z-index: 40; }
.drawer .dveil { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); }
.drawer .dpanel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 64%; min-width: 250px;
  background: #fff;
  overflow-y: auto;
  padding: 12px 20px 20px;
  animation: dslide .22s ease-out;
}
@keyframes dslide { from { transform: translateX(45%); opacity: .4; } to { transform: none; opacity: 1; } }
.dhead { display: flex; justify-content: flex-end; }
.dhead .dx { font-size: 22px; color: #8a96a3; padding: 2px 4px; cursor: pointer; }
.dava { position: relative; width: 52px; height: 52px; margin-top: 2px; }
.dava span {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #eceff1;
  color: #00aff0;
  font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.dava i {
  position: absolute; right: -1px; bottom: -1px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #2bc46f;
  border: 2.5px solid #fff;
}
.dname { display: flex; align-items: center; gap: 6px; font-size: 19px; font-weight: 600; margin-top: 12px; }
.dname svg { color: #8a96a3; }
.dhandle { font-size: 14.5px; color: #8a96a3; margin-top: 2px; }
.dstats { font-size: 15px; margin-top: 12px; }
.dstats b { font-weight: 600; }
.dsep { height: 1px; background: #eceff1; margin: 13px -20px; }
.ditem {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 0;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
}
.ditem svg { color: #5d6b75; flex: 0 0 auto; }
.ditem em { font-style: normal; color: #8a96a3; font-size: 13px; }
.dchev { margin-left: auto; color: #8a96a3; }

/* --- liste des abonnements --- */
.subcard {
  margin: 12px 14px;
  border: 1px solid #e8edf0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.sbanner { position: relative; height: 118px; background: #cfd6da center/cover no-repeat; }
.sbanner .sic { position: absolute; top: 10px; right: 12px; display: flex; gap: 14px; color: #fff; }
.sbody { position: relative; padding: 8px 14px 14px; }
.sava {
  position: absolute; top: -52px; left: 14px;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: #dfe3e6 center/cover no-repeat;
  box-shadow: 0 0 0 3.5px #fff;
}
.sname { display: flex; align-items: center; gap: 6px; font-size: 19px; font-weight: 600; margin-left: 112px; }
.shandle { font-size: 14.5px; color: #8a96a3; margin-left: 112px; }
.sfav { display: flex; align-items: center; gap: 10px; margin-top: 54px; font-size: 15.5px; }
.sfav svg { color: #00aff0; flex: 0 0 auto; }
.sbtns { display: flex; gap: 10px; margin-top: 14px; }
.sbtns span {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 19px;
  background: #f1f4f5;
  font-size: 14.5px;
}

/* --- accueil --- */
.composer { padding: 14px; border-bottom: 8px solid #f4f6f7; }
.composer .ph { color: #8a96a3; font-size: 16px; }
.composer .tools { display: flex; gap: 22px; margin-top: 22px; color: #8a96a3; }

/* --- barre du bas --- */
.bottomnav {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  border-top: 1px solid #eceff1;
  background: #fff;
  color: #8a96a3;
}
.bottomnav .it { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.bottomnav .badge {
  position: absolute;
  top: -6px; left: 50%;
  margin-left: 2px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #00aff0;
  color: #fff;
  font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
}
.bottomnav .me {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #eceff1;
  color: #00aff0;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------
   4. MODE TOURNAGE (?play) — l'écran occupe tout l'affichage.
      Sur iPhone, la barre de Safari et la barre d'état sont les vraies.
   --------------------------------------------------------------- */

body.play { overflow: hidden; }
body.play #editor,
body.play #exitCapture { display: none; }
body.play #stage { background: #fff; height: 100dvh; }
body.play #phoneWrap { width: 100% !important; height: 100dvh !important; }
body.play #phone {
  width: 100% !important;
  height: 100dvh !important;
  transform: none !important;
}

/* ---------------------------------------------------------------
   4b. MODE ÉDITION TACTILE (?edit)
       Les zones tapables ne sont signalées QUE dans ce mode : en
       ?play rien ne réagit, un doigt sur l'écran pendant une prise
       ne peut rien ouvrir.
   --------------------------------------------------------------- */

body.edit [data-editpost],
body.edit [data-editaccount],
body.edit [data-editscreen],
body.edit [data-addpost] { cursor: pointer; }

body.edit [data-editpost],
body.edit [data-editscreen],
body.edit [data-addpost] { color: #00aff0; }

body.edit [data-editaccount],
body.edit [data-editprofile],
body.edit [data-editviewer] {
  box-shadow: inset 0 0 0 1.5px rgba(0, 175, 240, .5);
  border-radius: 6px;
  cursor: pointer;
}

/* retour tactile pendant la prise de vue */
body.play:not(.edit) [data-goprofile]:active,
body.play:not(.edit) [data-back]:active,
body.play:not(.edit) [data-nav]:active,
body.play:not(.edit) [data-like]:active,
body.play:not(.edit) [data-save]:active,
body.play:not(.edit) [data-tab]:active,
body.play:not(.edit) [data-chip]:active { opacity: .55; }

#editFlag {
  position: fixed;
  z-index: 90;
  left: 50%; bottom: 66px;      /* au-dessus de la barre du bas, sinon il masque le + */
  transform: translateX(-50%);
  pointer-events: none;
  padding: 7px 16px;
  border-radius: 16px;
  background: rgba(0, 175, 240, .92);
  color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase;
  display: none;
}
body.edit #editFlag { display: block; }

/* --- le panneau lui-même --- */
#sheet { position: fixed; inset: 0; z-index: 100; }
#sheet[hidden] { display: none; }
#sheet .veil { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
#sheet .panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 8px 18px calc(28px + env(safe-area-inset-bottom));
  background: #fff;
  color: #000;
  border-radius: 18px 18px 0 0;
}
#sheet .grab {
  width: 40px; height: 4px;
  margin: 0 auto 10px;
  border-radius: 2px;
  background: #d3dadd;
}
#sheet h3 {
  margin: 0 0 14px;
  font-size: 17px;
  display: flex; align-items: center;
}
#sheet h3 .x {
  margin-left: auto;
  font-size: 22px;
  color: #8a96a3;
  padding: 0 6px;
  cursor: pointer;
}
#sheet .f {
  display: block;
  margin-bottom: 13px;
  font-size: 12px;
  color: #6f7d86;
}
#sheet .f input[type=text],
#sheet .f textarea,
#sheet .f select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  font: inherit;
  font-size: 16px;            /* 16px : iOS ne zoome pas au focus */
  color: #000;
  background: #f4f6f7;
  border: 1px solid #e2e8ea;
  border-radius: 9px;
  resize: vertical;
}
#sheet .f input[type=file] { display: block; margin-top: 6px; font-size: 13px; width: 100%; }
#sheet .fx {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0;
  font-size: 16px;
}
#sheet .fx input { width: 21px; height: 21px; accent-color: #00aff0; }
#sheet .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#sheet .sa { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
#sheet .sa button {
  flex: 1;
  min-width: 110px;
  padding: 13px 10px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #dde5e8;
  background: #f4f6f7;
  color: #0a0a0a;
}
#sheet .sa button.blue { background: #00aff0; border-color: #00aff0; color: #fff; font-weight: 600; }
#sheet .sa button.red { color: #d8442f; }
#sheet .note { font-size: 12px; color: #8a96a3; line-height: 1.45; margin: 4px 0 12px; }

#toast {
  position: fixed;
  z-index: 120;
  left: 50%; bottom: 116px;     /* au-dessus du badge d'édition */
  transform: translateX(-50%);
  max-width: 80vw;
  padding: 11px 18px;
  border-radius: 22px;
  background: rgba(20, 22, 26, .93);
  color: #fff;
  font-size: 14px;
  text-align: center;
}
#toast[hidden] { display: none; }

/* ---------------------------------------------------------------
   5. ÉCRANS ÉTROITS — l'éditeur passe au-dessus de l'aperçu
   --------------------------------------------------------------- */

@media (max-width: 900px) {
  html, body { overflow: auto; }
  body { flex-direction: column; }
  #editor {
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #2a2f38;
  }
  #stage { height: auto; padding: 24px 0; }
}
