/* Plateforme d'affichage : interface de gestion
   Encre #090402 (logo), Papier, Verre (teinte de vitrine), Filet, Signal, Alerte. */

@font-face {
  font-family: "Urbanist";
  src: url("../fonts/Urbanist-Variable.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #090402;
  --ink-2: #5d5956;
  --ink-3: #8b8784;
  --paper: #ffffff;
  --glass: #ebf0ee;
  --glass-2: #f5f8f7;
  --line: #d3dbd7;
  --line-2: #e4eae7;
  --signal: #0f8a5f;
  --signal-bg: #e0f2ea;
  --alert: #c4331f;
  --alert-bg: #fbe9e6;

  --font: "Urbanist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --page: 1180px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-pop: 0 24px 60px -12px rgba(9, 4, 2, .28), 0 2px 8px rgba(9, 4, 2, .08);
}

/* Base -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.noscript { padding: 40px; text-align: center; }

.icon { flex: none; }

/* Boutons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: #2b2623; }
.btn--secondary { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.btn--secondary:hover { background: var(--glass-2); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--glass); }
.btn--danger { background: var(--alert); color: #fff; }
.btn--danger:hover { background: #a92a18; }
.btn--danger-ghost { background: transparent; color: var(--alert); }
.btn--danger-ghost:hover { background: var(--alert-bg); }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--large { min-height: 52px; font-size: 16px; }
.btn--block { width: 100%; }
.btn:disabled, .btn.is-busy { opacity: .55; cursor: default; }
.btn.is-busy { cursor: progress; }

.iconbtn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.iconbtn:hover { background: var(--glass); color: var(--ink); }
.iconbtn--danger:hover { background: var(--alert-bg); color: var(--alert); }
.iconbtn--on, .iconbtn--on:hover { background: var(--signal-bg); color: var(--signal); }

.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}

/* Logo de la plateforme (IDDI Display) ------------------------------
   La hauteur se règle avec --logo-h sur le conteneur ou sur un parent. */

.logos { display: flex; align-items: center; }
.logos__img { flex: none; width: auto; max-width: none; height: var(--logo-h, 56px); }
/* Sans image : le nom de la plateforme */
.logos__name { font-size: calc(var(--logo-h, 56px) * .5); font-weight: 780; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.logos--on-dark .logos__name { color: #fff; }

/* Barre du haut ------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line-2);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--page);
  height: 68px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand { --logo-h: 40px; display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand__product {
  padding-left: 12px;
  border-left: 1.5px solid var(--line);
  font-size: 19px;
  font-weight: 300;
  line-height: 24px;
  letter-spacing: -.01em;
}
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.nav__link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.nav__link:hover { color: var(--ink); background: var(--glass-2); }
.nav__link.is-active { color: var(--ink); background: var(--glass); }
.usermenu { display: flex; align-items: center; gap: 2px; flex: none; }
.usermenu__account {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
}
.usermenu__account:hover { background: var(--glass-2); }
.usermenu__account.is-active { background: var(--glass); }
.usermenu__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Le nom de la personne connectée se raccourcit plutôt que de chevaucher le menu. */
.usermenu { min-width: 0; flex-shrink: 1; }
.usermenu__account { min-width: 0; }

/* Espace d'un client qui a un logo : son logo en haut à droite, à la place de celui de la plateforme.
   Le logo garde ses proportions dans une boîte de 44 × 200 pixels au plus. */
.topbar--client .nav { flex: 1 1 auto; }
.clientmark {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 18px 0 4px;
  border-right: 1.5px solid var(--line);
  border-radius: 6px 0 0 6px;
}
.clientmark__img { display: block; width: auto; height: auto; max-width: min(200px, 34vw); max-height: 44px; object-fit: contain; }
.topbar--client .usermenu { flex: 0 1 auto; min-width: 0; }
.topbar--client .usermenu__account { min-width: 0; }

/* Page entière : le pied de page reste en bas, même sur une page courte. */
.app--framed { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.app--framed > .main { flex: 1 0 auto; width: 100%; }

/* Pied de page de l'espace client : logo de la plateforme, en plus discret */
.appfoot { border-top: 1px solid var(--line-2); }
.appfoot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 22px var(--gutter) 26px;
}
.appfoot__label { color: var(--ink-3); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.appfoot__logos { --logo-h: 30px; opacity: .62; filter: grayscale(1); transition: opacity .2s, filter .2s; }
.appfoot__logos:hover { opacity: 1; filter: none; }

/* Page ---------------------------------------------------------------- */

.main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 36px var(--gutter) 96px;
}
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -6px 0 14px -6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 650;
  text-decoration: none;
}
.backlink:hover { color: var(--ink); background: var(--glass-2); }
/* Ligne du haut d'une fiche : retour à la liste, et liste déroulante pour passer à une autre fiche. */
.pagetop { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: -6px 0 18px; }
.pagetop .backlink { margin: 0 0 0 -6px; }

/* Liste déroulante des clients (console d'administration). */
.jump { position: relative; display: block; flex: 0 1 300px; width: 300px; max-width: 100%; }
.jump .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.jump .select { min-height: 44px; padding: 9px 42px 9px 44px; border-radius: 999px; font-size: 15px; font-weight: 650; text-overflow: ellipsis; }

.pagehead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 32px;
}
.pagehead__text { min-width: 0; max-width: 760px; }
.pagehead__title {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 780;
  line-height: 1.06;
  letter-spacing: -.028em;
  overflow-wrap: anywhere;
}
.pagehead__lead { margin-top: 10px; color: var(--ink-2); font-size: 17px; max-width: 62ch; }
.pagehead__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pagehead__logo { display: block; width: auto; height: auto; max-width: min(260px, 70vw); max-height: 64px; margin-bottom: 18px; object-fit: contain; object-position: left center; }

.section { margin-top: 56px; }
.section:first-child { margin-top: 0; }
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 18px;
}
.section__title { font-size: 24px; font-weight: 760; letter-spacing: -.018em; line-height: 1.2; }
.section__lead { color: var(--ink-2); margin-top: 4px; max-width: 64ch; }

.muted { color: var(--ink-2); }
.spaced { margin-top: 16px; }
.notes { max-width: 70ch; margin-top: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.small { font-size: 14px; }

.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 48px 0;
  color: var(--ink-2);
  font-weight: 600;
}
.loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--glass);
  font-weight: 550;
}
.notice--alert { background: var(--alert-bg); color: var(--alert); }
.notice + * { margin-top: 24px; }

.empty {
  padding: 48px 32px;
  border: 1.5px dashed var(--line);
  border-radius: 18px;
  text-align: center;
}
.empty__title { font-size: 20px; font-weight: 720; }
.empty__text { margin: 8px auto 0; max-width: 52ch; color: var(--ink-2); }
.empty .btn { margin-top: 20px; }

/* Pastilles et statut -------------------------------------------------- */

.disc {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
}
.disc--lg { width: 46px; height: 46px; font-size: 21px; }
.disc--light { background: var(--paper); color: var(--ink); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 650;
}
.status__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--ink-3);
}
.status--online { color: var(--signal); }
.status--online .status__dot { border-color: var(--signal); background: var(--signal); box-shadow: 0 0 0 3px var(--signal-bg); }
.status--never .status__dot { border-style: dashed; }
.status--off .status__dot { border-color: var(--alert); background: var(--alert); }
.status--off { color: var(--alert); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}
.tag--signal { background: var(--signal-bg); color: var(--signal); }
.tag--alert { background: var(--alert-bg); color: var(--alert); }
.tag--ink { background: var(--ink); color: var(--paper); }

/* Écrans (élément central) --------------------------------------------- */

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio, 1.7778);
  border-radius: 9px;
  background: var(--ink);
  box-shadow: 0 0 0 5px var(--ink), 0 26px 36px -22px rgba(9, 4, 2, .7);
  overflow: hidden;
}
.screen__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: var(--ink);
}

/* Écran entier : la dalle et ses zones, chacune à sa place, qui jouent leur contenu en direct ------
   (espace du client et fiche du client ; disposition calculée par le serveur). */
.screenblock + .screenblock { margin-top: 56px; }
.screenblock__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.screenblock__title { font-size: 22px; font-weight: 760; letter-spacing: -.016em; overflow-wrap: anywhere; }
.screenblock__meta { color: var(--ink-2); font-size: 14px; font-weight: 600; letter-spacing: 0; }

/* La vitrine : l'écran y est suspendu par deux câbles, dans ses vraies proportions.
   --max-h : hauteur maximale de la dalle ; --hang : longueur des câbles ; --bezel : épaisseur du cadre. */
.showcase {
  --hang: 52px;
  --max-h: 430px;
  --bezel: 9px;
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: var(--hang) 40px 46px;
  border-radius: 22px;
  background: var(--glass);
}
.showcase.is-portrait { --max-h: 540px; }
.showcase--compact { --hang: 34px; --max-h: 290px; --bezel: 7px; padding: var(--hang) 28px 32px; border-radius: 18px; }
.showcase--compact.is-portrait { --max-h: 380px; }
.display {
  position: relative;
  flex: none;
  width: min(100%, calc(var(--max-h) * var(--ratio) + var(--bezel) * 2));
  padding: var(--bezel);
  border-radius: calc(var(--bezel) + 3px);
  background: #151211;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 42px -28px rgba(9, 4, 2, .62), 0 2px 5px rgba(9, 4, 2, .12);
}
/* Câbles de suspension */
.display::before,
.display::after {
  content: "";
  position: absolute;
  bottom: 100%;
  width: 2px;
  height: var(--hang);
  background: #a3ada9;
}
.display::before { left: 16%; }
.display::after { right: 16%; }
.is-wide .display::before { left: 8%; }
.is-wide .display::after { right: 8%; }
.display__panel { position: relative; aspect-ratio: var(--ratio); overflow: hidden; border-radius: 2px; background: #000; }
.display__zone {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: calc(var(--w) * 100%);
  height: calc(var(--h) * 100%);
  overflow: hidden;
  outline: none;
}
.display__frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: #000; }
/* Zone désignée (pointeur, clavier, ou sa ligne dans la liste) : liseré blanc et nom de la zone */
.display__zone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px rgba(9, 4, 2, .3);
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.display__zone.is-hot::after,
.display__zone:focus-visible::after { opacity: 1; }
.display__tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 16px);
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(9, 4, 2, .35);
  pointer-events: none;
}
.display__num { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 760; }
.display__name { display: none; min-width: 0; padding-right: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.display__zone.is-hot .display__name,
.display__zone:focus-visible .display__name { display: block; }
.showcase--compact .display__tag { top: 6px; left: 6px; max-width: calc(100% - 12px); font-size: 12px; }
.showcase--compact .display__num { width: 18px; height: 18px; font-size: 11px; }

/* Les zones de l'écran, sous la vitrine (espace du client) */
.zcaps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px 28px; margin-top: 22px; }
.zcap { display: grid; align-content: start; gap: 9px; min-width: 0; padding-top: 14px; border-top: 2px solid var(--line-2); transition: border-color .15s; }
.zcap.is-hot { border-top-color: var(--ink); }
.zcap__title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.zcap__name { font-size: 18px; font-weight: 740; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.zcap__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.zcap .btn { justify-self: start; margin-top: 2px; }

/* Plan d'un écran, en réduction : ses zones à leur place (fiche du client, liens, liste des clients) */
.plan { position: relative; display: block; flex: none; max-width: 100%; overflow: hidden; border-radius: 4px; background: #3d3835; box-shadow: 0 0 0 3px var(--ink); }
.plan__zone {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: calc(var(--w) * 100%);
  height: calc(var(--h) * 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--ink);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.1;
  text-align: center;
}
.plan__zone.is-current { background: var(--paper); color: var(--ink); }
.plan__zone.is-fresh { background: var(--signal-bg); color: var(--signal); box-shadow: inset 0 0 0 1px var(--ink), inset 0 0 0 3px var(--signal); }
.plan__name { max-width: calc(100% - 10px); overflow: hidden; font-size: 12.5px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.plan__size { font-size: 11px; font-weight: 600; opacity: .72; }
/* État des zones (liste des clients) : en ligne, hors ligne, pas encore connectée */
.plan--status { border-radius: 3px; background: var(--paper); box-shadow: 0 0 0 2px var(--ink-2); }
.plan--status .plan__zone { box-shadow: inset 0 0 0 1px var(--ink-2); color: var(--ink); font-size: 11px; }
.plan--status .plan__zone--online { background: var(--signal); color: #fff; }
.plan--status .plan__zone--never { color: var(--ink-3); background: repeating-linear-gradient(135deg, var(--paper) 0 3px, var(--line-2) 3px 5px); }

/* Listes à lignes (clients, accès, zones) -------------------------------------- */

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }

.search { position: relative; flex: 1; max-width: 420px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 44px; }

.clist { list-style: none; border-top: 1.5px solid var(--ink); }
.crow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 150px 20px;
  align-items: center;
  gap: 24px;
  padding: 16px 10px;
  border-bottom: 1px solid var(--line-2);
  text-decoration: none;
}
.crow:hover { background: var(--glass-2); }
.crow__main { display: grid; gap: 2px; min-width: 0; }
.crow__name { font-size: 18px; font-weight: 720; letter-spacing: -.01em; overflow-wrap: anywhere; }
.crow__contact { color: var(--ink-2); font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow__count { color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.35; text-align: right; text-wrap: balance; }
.crow__devices { display: block; color: var(--ink-3); font-size: 13px; }
.crow__chev { color: var(--ink-3); }
.crow.is-inactive .crow__name { color: var(--ink-3); }

/* Écrans d'un client dans la liste : chacun en miniature, ses zones colorées selon leur état */
.zgroups { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; max-width: 340px; padding: 2px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; color: var(--ink-2); font-size: 14px; }
.legend__item { display: inline-flex; align-items: center; gap: 8px; }
.legend__swatch { flex: none; width: 18px; height: 14px; border-radius: 2px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.legend__swatch--online { background: var(--signal); box-shadow: none; }
.legend__swatch--never { background: repeating-linear-gradient(135deg, var(--paper) 0 3px, var(--line-2) 3px 5px); box-shadow: inset 0 0 0 1.5px var(--ink-3); }

.rows { list-style: none; border-top: 1px solid var(--line-2); }
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
}
.row__main { flex: 1 1 260px; min-width: 0; }
.row__title { font-weight: 700; overflow-wrap: anywhere; }
.row__meta { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.row__actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* Zones d'un client (vue administrateur) */
.zlist { list-style: none; border-top: 1.5px solid var(--ink); }

/* Écrans d'un client (fiche administrateur) */
.screengroup + .screengroup { margin-top: 36px; }
.screengroup__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 14px 0 12px;
  border-top: 1.5px solid var(--ink);
}
.screengroup__text { min-width: 0; }
.screengroup__title { font-size: 20px; font-weight: 740; letter-spacing: -.012em; overflow-wrap: anywhere; }
.screengroup__meta { color: var(--ink-2); font-size: 14px; font-weight: 600; }
/* Appareils qui affichent les liens de l'écran : ouvre leur liste */
.screengroup__devices { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.screengroup__devices .icon { flex: none; color: var(--ink-3); }
.screengroup__devices .linkbtn { color: var(--ink-2); font-weight: 600; text-decoration-color: var(--line); }
.screengroup__devices .linkbtn:hover { color: var(--ink); text-decoration-color: currentColor; }

/* Liste des appareils d'un écran */
.devtable__wrap { overflow-x: auto; margin: 4px 0 14px; border: 1px solid var(--line-2); border-radius: 12px; }
.devtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.devtable th { padding: 10px 14px; background: var(--glass-2); color: var(--ink-2); font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; }
.devtable td { padding: 10px 14px; border-top: 1px solid var(--line-2); vertical-align: top; }
.devtable__name { display: block; font-weight: 700; }
.devtable__sub { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; font-weight: 550; }
.devtable__ip { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Téléphones : une fiche par appareil plutôt qu'un tableau trop large */
@media (max-width: 640px) {
  .devtable thead { display: none; }
  .devtable, .devtable tbody, .devtable tr, .devtable td { display: block; width: auto; }
  .devtable tr { padding: 12px 14px; border-top: 1px solid var(--line-2); }
  .devtable tr:first-child { border-top: 0; }
  .devtable td { padding: 0; border: 0; }
  .devtable td + td { margin-top: 4px; }
  .devtable td[data-label]::before { content: attr(data-label) "\00a0: "; color: var(--ink-3); font-weight: 600; }
}
.screengroup .zlist { border-top: 1px solid var(--line-2); }
.screengroup__empty { padding: 18px 0; border-top: 1px solid var(--line-2); }
.zrow {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-2);
}
.zrow__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  height: 150px;
  padding: 10px;
  border-radius: 14px;
  background: var(--glass);
  transition: background-color .15s;
}
.zrow.is-hot .zrow__stage { background: #dce4e1; }
.preview__stage .screen {
  width: min(100cqw, calc(100cqh * var(--ratio)));
  box-shadow: 0 0 0 4px var(--ink);
}
/* Écran d'un client sur sa fiche : la vitrine, puis ses zones */
.screengroup .showcase { margin-bottom: 4px; }
.showcase__note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 2px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.showcase__note .icon { margin-top: 2px; }
.zrow__body { display: grid; gap: 12px; min-width: 0; }
.zrow__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.zrow__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.zrow__actions { display: flex; align-items: center; gap: 4px; }
.zrow__name { font-size: 20px; font-weight: 740; letter-spacing: -.01em; overflow-wrap: anywhere; }
.zrow__facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 14px; font-weight: 600; }

.infolist { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; }
.infolist dt { color: var(--ink-2); font-weight: 600; }
.infolist dd { overflow-wrap: anywhere; white-space: pre-line; }

/* Champ copiable (liens d'écran et d'accès) */
.copyfield {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 640px;
  padding: 4px 4px 4px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--glass-2);
}
.copyfield__input {
  flex: 1;
  width: 0;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
}
.copyfield__input:focus { outline: none; }
.copyfield:focus-within { border-color: var(--ink); }

/* Formulaires ------------------------------------------------------------------ */

.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form__error {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--alert-bg);
  color: var(--alert);
  font-size: 15px;
  font-weight: 650;
}
.form__success {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--signal-bg);
  color: var(--signal);
  font-weight: 650;
}

.field { display: grid; gap: 7px; align-content: start; }
.field__label { font-size: 15px; font-weight: 680; }
.field__opt { color: var(--ink-3); font-weight: 550; }
.field__hint { color: var(--ink-2); font-size: 14px; }
.field__error { color: var(--alert); font-size: 14px; font-weight: 650; }

.input, .select, .textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.35;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: #b4c0bb; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(9, 4, 2, .1); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); font-weight: 500; }
.input[readonly] { background: var(--glass-2); }
.textarea { min-height: 104px; resize: vertical; }
.select {
  padding-right: 42px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23090402' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--alert); }
.input--color { width: 64px; min-height: 48px; padding: 5px; cursor: pointer; }

.inline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.inline-fields .input { flex: 0 1 120px; width: 120px; min-width: 72px; }

.check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-weight: 550; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }

.choices { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: 8px; font-size: 15px; font-weight: 680; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.choice:hover { border-color: #b4c0bb; }
.choice.is-checked { border-color: var(--ink); background: var(--glass-2); }
.choice > input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }
.choice > span { flex: 1 1 auto; min-width: 0; }
.choice__title { display: block; font-weight: 680; line-height: 1.3; }
.choice__desc { display: block; margin-top: 2px; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.choice__desc.inline-fields { display: flex; margin-top: 8px; }
.input--short { width: 92px; min-height: 40px; padding: 6px 10px; }

.segmented { display: inline-flex; justify-self: start; gap: 2px; padding: 4px; border-radius: 999px; background: var(--glass); }
.segmented__btn {
  min-width: 96px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 680;
  cursor: pointer;
}
.segmented__btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(9, 4, 2, .14); }

/* Logo d'un client : aperçu dans une barre du haut miniature, telle que la verra le client */
.logofield__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.logofield__preview { flex: 1 1 260px; min-width: 0; max-width: 420px; }
.logofield__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.logofield.has-error .logobar { border-color: var(--alert); }
.logobar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: inset 0 -1px 0 var(--line-2);
}
.logobar__nav { flex: none; margin-right: auto; padding: 5px 11px; border-radius: 999px; background: var(--glass); color: var(--ink); font-size: 12.5px; font-weight: 680; }
.logobar__img { display: block; flex: 0 1 auto; min-width: 0; width: auto; height: auto; max-width: 150px; max-height: 38px; object-fit: contain; }
.logobar__empty { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.logobar__user { display: grid; flex: none; place-items: center; width: 26px; height: 26px; padding-left: 12px; border-left: 1.5px solid var(--line); box-sizing: content-box; color: var(--ink-2); }

/* Formulaire en sections (création de client, compte) */
.fsections { display: grid; }
.fsection {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 24px 56px;
  padding: 32px 0;
  border-top: 1px solid var(--line-2);
}
.fsection:first-child { border-top: 1.5px solid var(--ink); }
.fsection__title { font-size: 20px; font-weight: 740; letter-spacing: -.012em; }
.fsection__text { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.fsection__body { display: grid; gap: 18px; min-width: 0; max-width: 640px; }
.formbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line-2);
}
.formbar .form__error { flex: 1 1 100%; }

/* Découpage d'un écran : nombre de zones, disposition, plan, zone de chaque section */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.split__group { display: grid; gap: 9px; min-width: 0; }
.split__count .segmented__btn { min-width: 0; padding: 8px 18px; }
.splittiles { display: flex; flex-wrap: wrap; gap: 10px; }
.splittile {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 1px;
  width: 112px;
  padding: 12px 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.splittile:hover { border-color: #b4c0bb; }
.splittile[aria-pressed="true"] { border-color: var(--ink); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--ink); }
.splittile__plan { display: grid; place-items: center; width: 100%; height: 44px; margin-bottom: 8px; }
.splittile .plan { box-shadow: 0 0 0 2px var(--ink); }
.splittile .plan__zone { font-size: 10px; }
.splittile__label { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.splittile__sub { color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.3; }
.splittile__badge { position: absolute; top: -10px; right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 700; line-height: 1.55; }
.splittiles--small .splittile { width: 104px; padding: 10px 6px 8px; }

/* Plan à l'échelle (pas de hauteur minimale : dans la grille du dialogue, la ligne rétrécirait sous le plan) */
.split__stage { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; min-width: 0; padding: 22px 16px 14px; border-radius: 16px; background: var(--glass); }
.split__plan { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; width: 100%; min-width: 0; }
.split__format { color: var(--ink-2); font-size: 13.5px; font-weight: 650; text-align: center; }
.split__ask { display: flex; align-items: center; gap: 10px; padding: 22px 4px 30px; color: var(--ink-2); font-size: 15px; font-weight: 650; }
.split__ask .icon { flex: none; }
.plan--edit { box-shadow: 0 0 0 4px var(--ink); }
.plan--edit .plan__zone { font-size: 14px; }
.split__notes { display: grid; gap: 6px; padding: 12px 16px; border-radius: 12px; background: var(--alert-bg); color: var(--alert); font-size: 14px; font-weight: 650; list-style: none; }
.split__note { color: var(--ink-2); font-size: 14px; }

/* Une ligne par section : sa zone (existante ou nouvelle), son format */
.splitrows { display: grid; border-top: 1px solid var(--line-2); }
/* Conteneurs vides (disposition pas encore choisie, aucune zone à supprimer) : pas d'espace dans la grille */
.splitrows:empty, .split__removals:empty { display: none; }
.splitrow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.splitrow.is-fresh .disc { background: var(--signal); }
.splitrow__main { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.splitrow__main .select, .splitrow__main .input { flex: 1 1 200px; min-height: 42px; padding-top: 7px; padding-bottom: 7px; font-size: 15px; }
.splitrow__size { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 650; text-align: right; }
.splitrow__was { color: var(--ink-3); font-weight: 600; }
.splitrow__custom { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; min-width: 0; }
.splitrow__group { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 650; }
.splitrow__axis { min-width: 50px; font-size: 13.5px; font-weight: 700; }
.splitrow__custom .input { width: 86px; min-height: 40px; padding: 6px 10px; font-size: 15px; }
.splitrow__custom .iconbtn { margin-left: auto; }
.splitrow--screen { grid-template-columns: minmax(0, 1fr); }
.splitrow--screen .splitrow__custom { grid-column: 1; }
.splitrow__lead { font-weight: 700; }
.splitrow__hint { flex: 1 1 220px; color: var(--ink-2); font-size: 13px; }
.splitrow .field__error { grid-column: 2 / -1; }
.splitrow--screen .field__error { grid-column: 1; }
.splitrow.has-error .input, .splitrow.has-error .select { border-color: var(--alert); }

/* Zones sans section : supprimées après confirmation */
.splitremove { display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--alert-bg); }
.splitremove__title { display: flex; align-items: center; gap: 8px; color: var(--alert); font-weight: 750; }
.splitremove__title .icon { flex: none; }
.splitremove__list { display: grid; gap: 2px; padding-left: 26px; font-size: 14.5px; }
.splitremove__text { color: var(--ink-2); font-size: 14.5px; }
.splitremove .check input { accent-color: var(--alert); }

/* Dialogues ------------------------------------------------------------ */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}
.dialog--wide { width: min(720px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(9, 4, 2, .46); }
.dialog[open] { animation: dialog-in .2s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.dialog__inner { display: flex; flex-direction: column; max-height: inherit; }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 22px 6px 28px; }
.dialog__title { padding-top: 5px; font-size: 23px; font-weight: 760; line-height: 1.2; letter-spacing: -.016em; }
.dialog__body { display: grid; gap: 18px; padding: 10px 28px 8px; overflow: auto; }
.dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 18px 28px 26px; }
.dialog__text { color: var(--ink-2); }
.dialog__media { display: flex; gap: 16px; align-items: center; }
.dialog__thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--glass); }

/* Message temporaire */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 20px 12px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .2s, transform .25s var(--ease);
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast[data-type="error"] { background: var(--alert); }

/* Éditeur de zone ------------------------------------------------------ */

.zhead { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 20px; margin-bottom: 32px; }
.zhead__text { flex: 1 1 220px; min-width: 0; }
.zhead__title { font-size: clamp(28px, 3.8vw, 42px); font-weight: 780; line-height: 1.08; letter-spacing: -.027em; overflow-wrap: anywhere; }
.zhead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 8px; color: var(--ink-2); font-weight: 600; }
.ztabs { display: flex; gap: 8px; }
.ztab {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  font-weight: 760;
  text-decoration: none;
}
.ztab:hover { border-color: var(--ink); }
.ztab[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.zgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 44px; align-items: start; }
.zmain { display: grid; gap: 26px; min-width: 0; }
.zside { position: sticky; top: 92px; display: grid; gap: 20px; }

.dropzone {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  border: 2px dashed #aab7b1;
  border-radius: 18px;
  background: var(--glass-2);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.dropzone:hover { border-color: var(--ink-2); }
.dropzone.is-over { border-style: solid; border-color: var(--ink); background: var(--glass); }
.dropzone__icon { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--paper); }
.dropzone__title, .dropzone__hint { display: block; }
.dropzone__title { font-size: 19px; font-weight: 740; letter-spacing: -.01em; }
.dropzone__hint { margin-top: 3px; color: var(--ink-2); font-size: 14px; }
.dropzone__hint strong { color: var(--ink); font-weight: 700; }
.dropzone__types { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.dropzone__types > span { display: inline-flex; align-items: center; gap: 6px; }

.queue { list-style: none; display: grid; gap: 8px; }
.queue:empty { display: none; }
.qitem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto 32px;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 6px 8px 6px 16px;
  border-radius: 12px;
  background: var(--glass-2);
  font-size: 14px;
  font-weight: 600;
}
.qitem__name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.qitem__name > span { overflow: hidden; text-overflow: ellipsis; }
.qitem__name .icon { color: var(--ink-2); }
.qitem.is-error .qitem__name { display: block; white-space: normal; }
.qitem__bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.qitem__bar > span { display: block; width: 0; height: 100%; background: var(--ink); transition: width .2s; }
.qitem__state { color: var(--ink-2); text-align: right; white-space: nowrap; }
.qitem.is-done .qitem__bar > span { background: var(--signal); }
.qitem.is-done .qitem__state { color: var(--signal); }
.qitem.is-error { grid-template-columns: minmax(0, 1fr) 32px; background: var(--alert-bg); color: var(--alert); }
.qitem.is-error .qitem__bar, .qitem.is-error .qitem__state { display: none; }
.qitem__name strong { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.qitem__error { display: block; font-weight: 550; overflow-wrap: anywhere; white-space: normal; }
.qitem .iconbtn { width: 32px; height: 32px; }
.qitem.is-working .qitem__bar > span { width: 34% !important; animation: qitem-work 1.1s ease-in-out infinite alternate; }
@keyframes qitem-work { from { transform: translateX(-20%); } to { transform: translateX(215%); } }

.slides-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.slides-head__title { font-size: 22px; font-weight: 760; letter-spacing: -.016em; }
.slides-head__summary { color: var(--ink-2); font-weight: 600; }
.zslides { display: grid; gap: 14px; }
.slides-hint { color: var(--ink-2); font-size: 14px; }
.slides-hint .icon { display: inline-block; vertical-align: -2px; }

.slides {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--col), 1fr));
  gap: 26px 20px;
  --col: 220px;
}
.slides.is-portrait { --col: 160px; }
.slide { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.slide__media {
  position: relative;
  aspect-ratio: var(--ratio, 1.7778);
  border-radius: 10px;
  background: var(--bg, var(--ink));
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(9, 4, 2, .12);
}
.slide__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--fit, cover);
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.slide__num { position: absolute; top: 8px; left: 8px; }
/* Nature de l'élément : vidéo (durée) ou page de PDF (numéro), sous le numéro d'ordre */
.slide__badge {
  position: absolute;
  top: 42px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 16px);
  padding: 3px 8px 3px 6px;
  border-radius: 999px;
  background: rgba(9, 4, 2, .82);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}
.slide__badge-page { padding-left: 5px; margin-left: 1px; border-left: 1px solid rgba(255, 255, 255, .35); font-variant-numeric: tabular-nums; }
.slide__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0 0 0 3px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 10px rgba(9, 4, 2, .35);
  transition: transform .15s var(--ease), background-color .15s;
}
.slide__play:hover { background: #fff; transform: translate(-50%, -50%) scale(1.08); }
.slide--pdf .slide__media { background: var(--bg, var(--ink)); }
.slide__grip {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  cursor: grab;
  touch-action: none;
  box-shadow: 0 1px 4px rgba(9, 4, 2, .25);
}
.slide__grip:active { cursor: grabbing; }
.slide__veil {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 7px 10px;
  background: rgba(9, 4, 2, .78);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
}
.slide.is-off .slide__img { opacity: .38; filter: grayscale(1); }
.slide.is-dragging { opacity: .35; }
.slide__name { overflow: hidden; font-size: 14px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.slide__tags { display: flex; flex-wrap: wrap; gap: 6px; }
/* Sur une carte étroite (téléphone, zone en hauteur), une étiquette longue passe à la ligne. */
.slide__tags .tag { max-width: 100%; white-space: normal; }
.slide__tags:empty { display: none; }
.slide__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 4px; margin-top: -2px; }
.slide__tools { display: flex; }
.slide__tools .iconbtn { width: 32px; height: 32px; }
.slide .switch { gap: 6px; padding-right: 2px; font-size: 13px; }
.slide .switch__track { width: 34px; height: 20px; border-radius: 10px; }
.slide .switch__thumb { width: 14px; height: 14px; }
.slide .switch[aria-checked="true"] .switch__thumb { transform: translateX(14px); }

.slide-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  transform-origin: 0 0;
}
.slide-ghost .slide__media { box-shadow: none; }
body.is-sorting { cursor: grabbing; -webkit-user-select: none; user-select: none; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 680;
  cursor: pointer;
}
.switch__track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: #c6cfcb; transition: background-color .15s; }
.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(9, 4, 2, .3);
  transition: transform .18s var(--ease);
}
.switch[aria-checked="true"] { color: var(--ink); }
.switch[aria-checked="true"] .switch__track { background: var(--signal); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(16px); }

.preview { display: grid; gap: 14px; padding: 20px; border-radius: 20px; background: var(--glass); }
.preview__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.preview__stage { display: grid; place-items: center; height: 280px; padding: 8px; container-type: size; }
.preview__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }

.panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px; border: 1.5px solid var(--line-2); border-radius: 20px; }
.panel__title { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.panel__text { color: var(--ink-2); font-size: 14.5px; }
.panel__danger { padding-top: 14px; border-top: 1px solid var(--line-2); }
.panel__split { display: grid; gap: 10px; }
.panel__links { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-left: -14px; }

/* Dialogues des éléments : note, remplacement, lecture d'une vidéo, choix des pages */
.dialog__note { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.dialog__note .icon { margin-top: 2px; }
.dialog__replace { display: grid; gap: 8px; justify-items: start; padding-top: 16px; border-top: 1px solid var(--line-2); }
.videobox {
  display: grid;
  place-items: center;
  max-height: min(62vh, 640px);
  border-radius: 12px;
  background: var(--ink);
  overflow: hidden;
}
.videobox__video { display: block; width: 100%; max-height: min(62vh, 640px); aspect-ratio: var(--ratio, 1.7778); object-fit: contain; background: var(--ink); }
.pagepick { display: grid; gap: 6px; margin-top: 8px; }
.pagepick .input { width: 240px; max-width: 100%; min-height: 42px; }
.pagepick__hint { color: var(--ink-2); font-size: 13.5px; }

/* Création réussie ------------------------------------------------------------ */

.success__head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 32px; }
.success__icon { display: grid; place-items: center; flex: none; width: 56px; height: 56px; margin-top: 2px; border-radius: 50%; background: var(--signal); color: #fff; }
.linklist { list-style: none; border-top: 1.5px solid var(--ink); }
.linkrow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-2);
}
.linkrow__body { display: grid; gap: 10px; min-width: 0; }
.linkrow__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 640px; }
.linkrow__plan { flex: none; padding-right: 3px; }
.linkrow__plan .plan { box-shadow: 0 0 0 2px var(--ink); }
.linkrow__plan .plan__zone { font-size: 10px; }
.linkrow__title { font-size: 18px; font-weight: 720; }
.linkrow__meta { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.success__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* Connexion et pages d'accès ------------------------------------------------- */

.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 560px); min-height: 100vh; }
.auth__art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 56px 56px;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.auth__art .logos { --logo-h: 72px; }
.auth__claim { max-width: 13em; font-size: clamp(34px, 3.6vw, 54px); font-weight: 300; line-height: 1.08; letter-spacing: -.02em; }
.auth__panel { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 72px) 32px; }
.auth__inner { width: 100%; max-width: 400px; margin: auto 0; }
.auth__logo { --logo-h: 56px; display: none; margin-bottom: 40px; }
.auth__title { font-size: 34px; font-weight: 780; line-height: 1.1; letter-spacing: -.026em; }
.auth__lead { margin: 10px 0 30px; color: var(--ink-2); font-size: 16.5px; }
.auth__aside { margin-top: 22px; font-weight: 600; }
.auth__foot { margin-top: 40px; color: var(--ink-2); font-size: 14px; }
.auth__identity { margin-bottom: 20px; padding: 12px 16px; border-radius: 12px; background: var(--glass-2); font-size: 15px; }

/* Installation */
.setup { max-width: 720px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.setup__logo { --logo-h: 56px; margin-bottom: 40px; }
.checks { list-style: none; display: grid; gap: 2px; margin: 8px 0 36px; }
.checks__item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-weight: 600; }
.checks__icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; }
.checks__item.is-ok .checks__icon { background: var(--signal-bg); color: var(--signal); }
.checks__item.is-ko .checks__icon { background: var(--alert-bg); color: var(--alert); }
.checks__item.is-warn .checks__icon { background: var(--glass); color: var(--ink-2); }
.checks__detail { display: block; color: var(--ink-2); font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }

/* Page d'erreur */
.errorpage { max-width: 640px; margin: 0 auto; padding: 80px var(--gutter); }
.errorpage__logo { --logo-h: 56px; margin-bottom: 56px; }
.errorpage__code { color: var(--ink-3); font-size: 18px; font-weight: 700; }
.errorpage__title { margin: 8px 0 32px; font-size: 32px; font-weight: 760; line-height: 1.15; letter-spacing: -.02em; }

/* Adaptation aux écrans plus petits ------------------------------------------ */

@media (max-width: 1080px) {
  .zgrid { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
}

@media (max-width: 960px) {
  .zgrid { grid-template-columns: minmax(0, 1fr); }
  .zside { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
  .crow { grid-template-columns: minmax(0, 1fr) auto 20px; row-gap: 8px; }
  .crow__main { grid-column: 1 / span 2; }
  .crow__count { grid-column: 2; grid-row: 2; }
  .crow__chev { grid-column: 3; grid-row: 1 / span 2; }
  .zgroups { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .fsection { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__art { display: none; }
  .auth__logo { display: flex; }
  .auth__panel { justify-content: flex-start; }
}

@media (max-width: 820px) {
  .showcase { --hang: 36px; --bezel: 6px; padding: var(--hang) 20px 28px; }
  .showcase.is-portrait { --max-h: 460px; }
  .showcase--compact { --hang: 28px; padding: var(--hang) 16px 24px; }
  .zrow { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .zrow__stage { height: 130px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .clientmark { height: 38px; padding-right: 12px; }
  .clientmark__img { max-height: 36px; max-width: min(150px, 38vw); }
  .dropzone__types { display: grid; gap: 4px; }
  .topbar__inner { gap: 12px; height: 60px; }
  .brand { --logo-h: 34px; }
  .brand__product { font-size: 17px; padding-left: 10px; }
  .nav__link { padding: 8px 10px; }
  .usermenu__name { display: none; }
  .usermenu__account { padding: 8px; }
  .main { padding-top: 26px; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .splittiles { gap: 8px; }
  .splittile { width: calc((100% - 16px) / 3); padding: 12px 4px 9px; }
  .splittile__label { font-size: 13px; }
  .splittiles--small .splittile { width: calc((100% - 16px) / 3); }
  .split__count .segmented__btn { padding: 8px 4px; }
  .splitrow { grid-template-columns: auto minmax(0, 1fr); }
  .splitrow__size { grid-column: 2; justify-content: flex-start; text-align: left; }
  .splitrow__custom { grid-column: 1 / -1; gap: 8px 14px; }
  .splitrow__custom .input { width: 76px; }
  .dropzone { padding: 20px; gap: 16px; }
  .dropzone__icon { width: 46px; height: 46px; }
  .qitem { grid-template-columns: minmax(0, 1fr) auto 32px; }
  .qitem__bar { display: none; }
  .slides, .slides.is-portrait { --col: 140px; gap: 22px 14px; }
  .zside { grid-template-columns: minmax(0, 1fr); }
  .slide .switch__label { display: none; }
  .slide__tools .iconbtn { width: 34px; height: 34px; }
  .dialog__head { padding: 20px 16px 4px 20px; }
  .dialog__body { padding: 8px 20px; }
  .dialog__foot { padding: 16px 20px 20px; }
  .dialog__foot .btn { flex: 1 1 auto; }
  .infolist { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .infolist dd { margin-bottom: 10px; }
  .segmented { display: flex; width: 100%; }
  .segmented__btn { flex: 1 1 0; min-width: 0; padding: 8px 4px; }
  .pagehead__actions { width: 100%; }
  .pagehead__actions .jump, .pagetop .jump { flex: 1 1 100%; width: 100%; }
}

@media (max-width: 420px) {
  .brand__product { display: none; }
  .nav__link { padding: 7px 9px; font-size: 14px; }
}

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

/* Double authentification (Mon compte, administrateurs) */
.twofa { display: grid; gap: 16px; }
.twofa__qr { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.qrcode { display: block; flex: none; border: 1.5px solid var(--line); border-radius: 8px; }
.twofa__secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 600; letter-spacing: .04em; overflow-wrap: anywhere; }
.twofa__codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 16px; margin: 0; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 8px; list-style: none; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 600; }

/* Jours de diffusion d'un élément (dialogue « Durée et dates ») */
.weekdays { margin: 0; padding: 0; border: 0; min-width: 0; }
.weekdays__list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }

/* Contenu de base d'un client (fiche client) */
.defaults { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.defaults__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; }
.defaults__img { grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--line-2); }
.defaults__name { overflow: hidden; color: var(--ink-2); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

/* Lien de l'écran entier (fiche client et liens d'un écran créé) */
.screenlink { display: grid; gap: 8px; margin: 12px 0 16px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; }
.screenlink__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.screenlink__title { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }

/* Diagnostic de lecture d'une zone (administration) */
.diag__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.diag__device { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.diag__log { max-height: 46vh; margin: 0; padding: 12px 14px; overflow: auto; border: 1.5px solid var(--line); border-radius: 8px; background: var(--glass-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.diag__empty { margin: 0; padding: 18px 14px; border: 1.5px dashed var(--line); border-radius: 8px; color: var(--ink-3); text-align: center; }
