/* asa transfer : page d'envoi (satellite envoi-maquette, 24/10/2026).
   Source : maquettes src/app/design/v5-asa-transfer/asa-transfer (asa-transfer.html, depot.html, relecture.html,
   livraison.html), moteur ditflow ui.css + surcouche asa.css, avec les retouches validees sur la page du
   destinataire (asa-reception/reception.html) : tout en SF Pro (les --mono de ditflow tombent sur le SF Pro),
   chiffres en SF Pro fin, logo asa sans couleur, "by asa cinema" sous le nom, lumiere du cadran centree,
   texte du rond centre en groupe. Regles de Thierry : aucune police a chasse fixe, aucun allume vert (l'accent
   d'asa est le blanc), jamais de coche sur le rond, degrade Crepuscule seulement a la fin.
   Feuille autonome : ni app.css ni charte.css (partagees avec la page du destinataire). */

/* ---------- jetons (34B + asa) ---------- */
:root {
  --bg: #000000;
  --bg-deep: #030303;
  --panel: #141416;
  --panel-2: #1a1a1e;
  --ink: #f2f2f4;
  --muted: rgba(255,255,255,.42);
  --on: #f2f2f4;
  --cyan: #64d2ff;
  --orange: #ff9f0a;
  --magenta: #ff375f;
  --purple: #bf5af2;
  --yellow: #ffd60a;
  --radius: 28px;
  --radius-sm: 20px;
  --line-soft: rgba(255,255,255,0.06);
  --line-hi: rgba(255,255,255,0.11);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: var(--sans);
  --dusk: linear-gradient(90deg, #60a5fa, #a78bfa 38%, #f472b6 70%, #fb923c);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
/* micro-libelles de section : seule capitale de la maquette (petit corps, opacite reduite, espaces) */
.panel-title, .metric-label { text-transform: uppercase; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--sans); min-height: 100vh; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid rgba(255,255,255,.8); outline-offset: 3px; }
body.locked { overflow: hidden; }

@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ---------- aurore de fond (34B : violet, cyan, pourpre, magenta) ---------- */
/* degrades seuls, sans filtre de flou (le navigateur garde sa force pour l'envoi) ; figee pendant un transfert */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora-blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; will-change: transform; }
.aurora-blob.a1 { left: -18vmax; top: -22vmax; background: radial-gradient(circle at 50% 50%, rgba(167,139,250,.15), rgba(167,139,250,.05) 38%, transparent 66%); animation: drift1 46s ease-in-out infinite alternate; }
.aurora-blob.a2 { right: -20vmax; top: -14vmax; background: radial-gradient(circle at 50% 50%, rgba(100,210,255,.12), rgba(100,210,255,.04) 38%, transparent 66%); animation: drift2 54s ease-in-out infinite alternate; }
.aurora-blob.a3 { left: 24vw; bottom: -30vmax; background: radial-gradient(circle at 50% 50%, rgba(191,90,242,.11), rgba(191,90,242,.035) 38%, transparent 66%); animation: drift3 60s ease-in-out infinite alternate; }
.aurora-blob.a4 { right: 4vw; bottom: -24vmax; background: radial-gradient(circle at 50% 50%, rgba(255,55,95,.09), rgba(255,55,95,.03) 38%, transparent 66%); animation: drift4 50s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate3d(9vw, 6vh, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-8vw, 8vh, 0) scale(0.95); } }
@keyframes drift3 { to { transform: translate3d(10vw, -6vh, 0) scale(1.2); } }
@keyframes drift4 { to { transform: translate3d(-7vw, -8vh, 0) scale(0.9); } }
body[data-state=uploading] .aurora-blob, body[data-state=verifying] .aurora-blob { animation-play-state: paused; }

/* ---------- coque ---------- */
.shell { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 30px 30px 52px; display: flex; flex-direction: column; gap: 24px; }

/* ---------- barre du haut ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  background: linear-gradient(160deg, #1b1b1f, #0a0a0c);
  border: 1px solid var(--line-hi);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 20px -10px rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.brand-mark img { width: 30px; height: 30px; position: relative; z-index: 1; display: block; }
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 0; min-width: 0; }
.brand-name { font-size: 19px; font-weight: 750; letter-spacing: -0.4px; line-height: 1.15; white-space: nowrap; }
.brand-name b { font-weight: 400; color: var(--muted); }
.brand-sub { font-size: 12px; line-height: 1.2; letter-spacing: 0.01em; color: var(--muted); white-space: nowrap; }

.badges { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted); text-decoration: none;
  max-width: 100%; min-width: 0;
}
.badge b { color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge svg { width: 13px; height: 13px; fill: none; stroke-width: 1.8; flex: 0 0 13px; }
.badge.proj svg { stroke: var(--on); }
.badge.unit svg { stroke: var(--cyan); }
button.badge { cursor: pointer; transition: border-color 0.2s ease; }
button.badge:hover { border-color: var(--line-hi); }

/* ---------- titre du lot ---------- */
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; min-width: 0; }
.title-row > div { min-width: 0; max-width: 100%; }
.title { font-size: 26px; font-weight: 750; letter-spacing: -0.5px; margin-top: 6px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.26em; min-width: 0; }
.title span { color: var(--muted); font-weight: 500; }
/* le nom du lot se corrige sur place : meme corps que le titre, aucun cadre au repos */
.title-input {
  font: inherit; letter-spacing: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid transparent; outline: none; padding: 0; margin: 0;
  min-width: 2ch; max-width: 100%; field-sizing: content; text-overflow: ellipsis;
}
.title-input:hover { border-bottom-color: var(--line-hi); }
.title-input:focus { border-bottom-color: rgba(255,255,255,.45); }
.title-input[readonly] { cursor: default; border-bottom-color: transparent; }
.title-mesure { position: absolute; visibility: hidden; white-space: pre; font-size: 26px; font-weight: 750; letter-spacing: -0.5px; }

/* ---------- cartes ---------- */
.stage-card {
  position: relative; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent 45%), var(--bg-deep);
  border: 1px solid var(--line-soft);
  box-shadow: 0 30px 70px -34px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 18px 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); min-width: 0;
}
.panel-title { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel-title svg { width: 13px; height: 13px; fill: none; stroke-width: 1.8; }

/* ---------- scene : cadran, flux, noeuds ---------- */
.stage { position: relative; width: 100%; height: 470px; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.flow-track { fill: none; stroke-linecap: round; }
.flow-track.glow { stroke-width: 10; filter: url(#softGlow); opacity: 0.85; transition: opacity 0.4s ease; }
.flow-track.line { stroke-width: 2; opacity: 0.6; stroke-dasharray: 3 13; animation: dashFlow 5.2s linear infinite; }
@keyframes dashFlow { to { stroke-dashoffset: -64; } }
.particles { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.particle { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform, opacity; z-index: 2; pointer-events: none; }

.dial-node { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; width: 340px; height: 340px; }
.dial-bezel {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #232327, var(--panel) 52%, #060607 100%);
  box-shadow: 0 26px 55px -22px rgba(0,0,0,0.95), inset 0 2px 3px rgba(255,255,255,0.12), inset 0 -8px 18px rgba(0,0,0,0.8);
  transition: box-shadow .3s ease;
}
.dial-bezel::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.07); }
.dial-face {
  position: absolute; inset: 18px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #151517, #0a0a0b 70%);
  box-shadow: inset 0 4px 14px rgba(0,0,0,0.85);
}
.dial-svg { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 15; transition: stroke .3s ease; }
.ring-fill {
  fill: none; stroke: url(#gradRing); stroke-width: 15; stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(100,210,255,0.3));
  transition: stroke-dashoffset 1.6s cubic-bezier(0.25, 0.9, 0.3, 1), opacity 0.4s ease;
}
body[data-state=done] .ring-fill { filter: drop-shadow(0 0 10px rgba(244,114,182,0.35)); }
body[data-state=failed] .ring-fill { filter: drop-shadow(0 0 10px rgba(255,55,95,0.3)); }
.ring-tip { fill: var(--yellow); filter: drop-shadow(0 0 7px rgba(255,214,10,0.7)); transition: opacity .3s ease; }
.dial-ticks { position: absolute; inset: 30px; pointer-events: none; }
.dial-tick { position: absolute; left: 50%; top: 0; width: 2px; height: 8px; background: rgba(255,255,255,0.15); }

/* texte du rond : le groupe (chiffre + etiquette) est centre dans le cadran */
.dial-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; z-index: 2; }
.dial-pct { font-family: var(--sans); font-size: 66px; font-weight: 300; line-height: 0.85; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dial-pct small { font-size: 22px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.dial-pct.taille { font-size: 62px; }
.dial-pct.mot { font-weight: 650; font-size: 40px; letter-spacing: -0.02em; line-height: 1.05; }
.dial-lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dial-lbl .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--on); box-shadow: 0 0 7px rgba(255,255,255,0.6); animation: pulse 1.4s ease-in-out infinite; }
.dial-lbl .dot.idle { background: rgba(255,255,255,0.2); box-shadow: none; animation: none; }
.dial-lbl .dot.fixe { animation: none; }
.dial-cap {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 128px; max-width: 225px; height: 30px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line-hi); background: rgba(0,0,0,0.45); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  white-space: nowrap; overflow: hidden;
}

/* cadran au repos : il est la zone de depot */
.dial-node.drop, body[data-state=selected] .dial-node, body[data-state=done] .dial-node, body[data-state=failed] .dial-node { cursor: pointer; }
.dial-node.drop .dial-face { box-shadow: inset 0 4px 14px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(255,255,255,0.05); }
.dial-node.drop:hover .ring-track, .dial-node.over .ring-track { stroke: rgba(255,255,255,0.16); }
.dial-node.drop:hover .dial-bezel, .dial-node.over .dial-bezel { box-shadow: 0 26px 55px -22px rgba(0,0,0,0.95), 0 0 60px rgba(255,255,255,0.07), inset 0 2px 3px rgba(255,255,255,0.12); }
.dial-node.over .dial-tick { background: rgba(255,255,255,0.4); }
.dial-pct.idle { font-size: 36px; font-weight: 600; letter-spacing: 0.04em; color: rgba(255,255,255,0.3); line-height: 1; }
.dial-pct.idle .idle-ic { display: block; margin: 0 auto; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.6)); }
.dial-pct.idle .idle-t { display: block; margin-top: 13px; font-family: var(--sans); font-size: 19px; font-weight: 500; letter-spacing: 0; line-height: 1.22; color: rgba(255,255,255,0.72); white-space: normal; }
/* "a DCP" ouvre le choix d'un dossier, "a video" celui de fichiers : memes lettres, souligne au survol */
.idle-t .choix { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline transparent; text-underline-offset: 4px; transition: text-decoration-color .2s ease, color .2s ease; }
.idle-t .choix:hover, .idle-t .choix:focus-visible { color: #fff; text-decoration-color: rgba(255,255,255,.55); outline: none; }

/* ---------- noeuds (destinataires, serveur) ---------- */
.node-dest {
  position: absolute; transform: translate(-50%, -50%); z-index: 3; width: 216px;
  border-radius: var(--radius); background: linear-gradient(165deg, var(--panel-2), var(--panel) 55%);
  border: 1px solid var(--line-hi); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 20px 44px -20px rgba(0,0,0,0.95);
  padding: 16px 18px; transition: opacity .3s ease;
}
.node-dest.ok { box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 20px 44px -20px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,255,255,0.16); }
.node-dest.busy { box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 20px 44px -20px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,159,10,0.16); }
.node-dest.alert { box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 20px 44px -20px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,55,95,0.2); }
.dest-row { display: flex; align-items: center; gap: 12px; }
.dest-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: radial-gradient(circle at 38% 30%, #202023, #0f0f11 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -2px 4px rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
}
.dest-icon svg { width: 20px; height: 20px; stroke-width: 1.6; fill: none; }
.dest-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dest-name { font-size: 14px; font-weight: 700; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest-path { font-family: var(--mono); font-size: 9.5px; color: rgba(255,255,255,0.28); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.2em; }
.dest-gauge { margin-top: 13px; display: flex; flex-direction: column; gap: 6px; }
.dest-gauge-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em; color: var(--muted); }
.dest-gauge-head b { font-size: 10.5px; letter-spacing: 0.04em; }
.node-dest.ok .dest-gauge-head b { color: var(--on); }
.node-dest.busy .dest-gauge-head b { color: var(--orange); }
.dest-bar { height: 5px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.dest-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left center; transform: scaleX(0); transition: transform 0.6s cubic-bezier(0.3, 0.9, 0.3, 1); background: var(--dusk); }
/* maquette : orange, jaune puis cyan ; le passage du jaune au cyan donne du vert : la barre chaude reste orange et jaune */
.dest-bar i.warm { background: linear-gradient(90deg, var(--orange), var(--yellow)); }
.dest-status { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dest-del { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease, border-color .2s ease; }
.dest-del svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 2; fill: none; }
.node-dest:hover .dest-del, .dest-del:focus-visible { opacity: 1; }
.dest-del:hover { border-color: var(--line-hi); color: var(--ink); }
/* noeud d'ajout (pointilles) : on y tape le nom d'un destinataire */
.node-dest.add { width: 216px; padding: 16px 18px; background: transparent; border: 1px dashed rgba(255,255,255,0.2); box-shadow: none; }
.node-input { flex: 1; min-width: 0; height: 36px; background: transparent; border: 0; color: var(--ink); font-family: var(--mono); font-size: 13px; outline: none; }
.node-input::placeholder { color: rgba(255,255,255,0.4); }
.node-dest.add:focus-within { border-color: rgba(255,255,255,.4); }
.node-dest.attente { opacity: .55; }

/* ---------- pastilles ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.chip .chip-led { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { color: #f2f2f4; background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); }
.chip.ok .chip-led { box-shadow: 0 0 6px rgba(255,255,255,0.7); }
.chip.busy { color: var(--orange); background: rgba(255,159,10,0.1); border-color: rgba(255,159,10,0.24); }
.chip.busy .chip-led { box-shadow: 0 0 6px rgba(255,159,10,0.6); animation: pulse 1s ease-in-out infinite; }
.chip.info { color: var(--cyan); background: rgba(100,210,255,0.1); border-color: rgba(100,210,255,0.22); }
.chip.warn { color: var(--magenta); background: rgba(255,55,95,0.1); border-color: rgba(255,55,95,0.24); }
.chip.warn .chip-led { box-shadow: 0 0 6px rgba(255,55,95,0.5); }
.chip.dim { color: var(--muted); background: rgba(255,255,255,0.04); border-color: var(--line-soft); }
.chip.dusk { color: #fff; border-color: rgba(244,114,182,0.35); background: linear-gradient(90deg, rgba(96,165,250,0.14), rgba(244,114,182,0.14), rgba(251,146,60,0.14)); }
.chip.dusk .chip-led { background: #fb923c; box-shadow: 0 0 7px rgba(251,146,60,0.8); }
button.chip, a.chip { cursor: pointer; text-decoration: none; transition: border-color .2s ease, color .2s ease; }
button.chip:hover, a.chip:hover { border-color: var(--line-hi); color: var(--ink); }

/* ---------- tuiles ---------- */
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.metric {
  position: relative; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 17px 19px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.metric::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc, var(--muted)); }
.metric.read { --acc: var(--cyan); }
.metric.write { --acc: var(--purple); }
.metric.eta { --acc: var(--orange); }
.metric.mhl { --acc: var(--magenta); }
.metric.prog { --acc: #f472b6; }
.metric-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.metric-label svg { width: 13px; height: 13px; fill: none; stroke: var(--acc); stroke-width: 1.8; flex: 0 0 13px; }
.metric-value { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 5px; white-space: nowrap; min-width: 0; }
.metric-value small { font-family: var(--mono); font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: 0.08em; }
.metric-value .colon { animation: pulse 1.4s ease-in-out infinite; }
.metric-value.fixe .colon { animation: none; }
.prog-mini { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.prog-mini i { display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left center; transform: scaleX(0); background: var(--dusk); transition: transform 0.6s cubic-bezier(0.3, 0.9, 0.3, 1); }
.metric.speed { padding: 13px 16px; }
.metric.speed .speed-row { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.metric.speed .metric-value { position: relative; z-index: 2; margin: 0; }
.metric.speed .speed-gauge { position: absolute; right: -4px; bottom: -4px; width: 92px; z-index: 1; opacity: 0.92; pointer-events: none; }
.ngauge { position: relative; width: 100%; max-width: 92px; }
.ngauge-svg { display: block; width: 100%; height: auto; }
.ngauge-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 5; stroke-linecap: round; }
.ngauge-crest { fill: none; stroke-width: 5; stroke-linecap: round; opacity: 0.3; }
.ngauge-tick { stroke: rgba(255,255,255,0.14); stroke-width: 1; }
.ngauge-tick.major { stroke: rgba(255,255,255,0.3); stroke-width: 1.4; }
.ngauge-peak { stroke-width: 1.6; transition: transform 0.3s ease; }
.ngauge-needle { will-change: transform; transition: transform .5s cubic-bezier(.3,.9,.3,1); }
.ngauge-pivot { fill: #202024; stroke: rgba(255,255,255,0.18); stroke-width: 1; }
/* tuile qu'on touche (mot de passe) */
.metric.touche { cursor: pointer; transition: border-color .2s ease; }
.metric.touche:hover { border-color: var(--line-hi); }
.metric .mdp { width: 100%; height: 30px; background: transparent; border: 0; border-bottom: 1px solid var(--line-hi); outline: none; color: var(--ink); font-family: var(--sans); font-size: 16px; letter-spacing: .08em; }
.metric .mdp:focus { border-bottom-color: rgba(255,255,255,.5); }
.metric .mdp::placeholder { color: rgba(255,255,255,.3); letter-spacing: 0; font-size: 13px; }
.metric.erreur { border-color: rgba(255,55,95,.45); }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 24px; height: 46px;
  border-radius: 999px; background: linear-gradient(180deg, #232327, #121214); border: 1px solid var(--line-hi); color: var(--ink);
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 10px 22px -12px rgba(0,0,0,0.8);
  transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease; flex-shrink: 0;
}
.btn:hover { border-color: rgba(255,255,255,0.32); }
.btn:active { transform: translateY(1.5px); }
.btn.solid { background: #f2f2f4; color: #050505; border-color: #f2f2f4; }
.btn.solid:hover { box-shadow: 0 0 22px rgba(255,255,255,0.25); }
.btn.small { height: 36px; padding: 0 16px; font-size: 10px; }
.btn.btn-big { height: 60px; padding: 0 34px; border-radius: 18px; font-size: 13px; }
.btn[disabled] { opacity: 0.38; cursor: not-allowed; border-color: var(--line-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); pointer-events: none; }
.btn.solid[disabled] { color: #050505; }

/* ---------- ligne de controle ---------- */
.control-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 40px -22px rgba(0,0,0,0.85); padding: 18px 22px;
}
.control-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* meme hauteur avec ou sans bouton (pendant l'envoi, aucun bouton) : la ligne ne saute pas */
@media (min-width: 701px) { .control-row { min-height: 98px; } }
.control-title { font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; display: flex; align-items: center; gap: 9px; }
.control-title .state-led { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--orange); box-shadow: 0 0 9px rgba(255,159,10,0.55); animation: pulse 1.1s ease-in-out infinite; }
.control-title .state-led.idle { background: var(--muted); box-shadow: none; animation: none; }
.control-title .state-led.done { background: #fb923c; box-shadow: 0 0 9px rgba(251,146,60,0.7); animation: none; }
.control-title .state-led.warn { background: var(--magenta); box-shadow: 0 0 9px rgba(255,55,95,0.55); animation: none; }
.control-sub { font-size: 12px; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }

/* ---------- panneaux du bas ---------- */
.duo { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.fg-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.fg-head .count { font-family: var(--sans); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fg-head .count small { font-size: 11px; color: var(--muted); font-weight: 400; }
.filegrid { display: flex; flex-wrap: wrap; gap: 3px; align-content: flex-start; }
.filegrid .fg-dot { width: 9px; height: 9px; border-radius: 2.5px; background: rgba(255,255,255,0.09); transition: background 0.35s ease; }
.fg-dot.on { box-shadow: 0 0 4px rgba(255,255,255,0.14); }
.fg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.fg-legend span { font-family: var(--mono); font-size: 9.5px; color: rgba(255,255,255,0.4); display: flex; align-items: center; gap: 6px; }
.fg-legend i { width: 9px; height: 9px; border-radius: 2px; background: rgba(255,255,255,0.12); }
.row-list { display: flex; flex-direction: column; gap: 8px; }
.rowline { display: flex; align-items: center; gap: 13px; padding: 12px 15px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line-soft); color: inherit; text-decoration: none; min-width: 0; }
.rowline .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rowline .name { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowline .sub { font-family: var(--mono); font-size: 9.5px; color: rgba(255,255,255,0.32); letter-spacing: 0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowline .chip { margin-left: auto; flex-shrink: 0; }
.rcpt-hash { font-family: var(--sans); font-size: 12px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; color: rgba(255,255,255,0.55); overflow-wrap: anywhere; }
.rowline a.rcpt-hash, .rowline .sub a { color: inherit; text-decoration: none; }
.rowline a.rcpt-hash:hover, .rowline .sub a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- feuille du compte (fenetre de la maquette) ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.modal {
  width: 520px; max-width: 100%; max-height: calc(100svh - 48px); overflow-y: auto; border-radius: var(--radius);
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 55%); border: 1px solid var(--line-hi);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 40px 90px -30px rgba(0,0,0,0.95); padding: 26px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.pile { display: flex; flex-direction: column; gap: 16px; }
.modal-title { font-size: 17px; font-weight: 750; letter-spacing: -0.2px; overflow-wrap: anywhere; }
.modal-sub { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.modal-msg { font-size: 13px; color: rgba(255,255,255,.72); line-height: 1.5; }
.modal-msg b { color: var(--ink); font-weight: 600; }
.modal-err { font-size: 13px; color: var(--magenta); }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.lien { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.4); }
.lien:hover { text-decoration-color: #fff; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 10px; letter-spacing: 0.05em; color: var(--muted); }
.input { height: 46px; padding: 0 16px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line-hi); color: var(--ink); font-family: var(--sans); font-size: 14px; outline: none; width: 100%; transition: border-color .2s ease; }
.input:focus { border-color: rgba(255,255,255,0.45); }
.input::placeholder { color: rgba(255,255,255,0.25); }
.modal .row-list { max-height: 46svh; overflow-y: auto; }
.modal .rowline .acts { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- ecrans etroits ---------- */
@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric.prog { grid-column: span 2; }
  .duo { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .shell { padding: 20px 16px 40px; gap: 18px; }
  .badges { justify-content: flex-start; }
  .title { font-size: 21px; }
  .title-mesure { font-size: 21px; }
  .stage { height: 660px; }
  .dial-node { width: 272px; height: 272px; }
  .dial-pct { font-size: 52px; }
  .dial-pct.taille { font-size: 48px; }
  .dial-pct.mot { font-size: 34px; }
  .dial-pct small { font-size: 18px; }
  .dial-pct.idle { font-size: 30px; }
  .dial-pct.idle .idle-ic { width: 74px; height: 58px; }
  .dial-pct.idle .idle-t { font-size: 17px; margin-top: 10px; }
  .node-dest, .node-dest.add { width: 168px; padding: 13px 14px; border-radius: 22px; }
  .dest-name { font-size: 12.5px; }
  .dest-del { opacity: 1; }
  .control-row { flex-direction: column; align-items: stretch; }
  .modal { padding: 22px 20px; }
}
@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
  .metric.prog { grid-column: span 1; }
  /* telephone : les flux descendent a gauche, les noeuds prennent le reste de la largeur */
  .node-dest, .node-dest.add { width: calc(100vw - 128px); }
  /* le nom du lot est deja le titre, juste dessous */
  .badge.proj { display: none; }
  .filegrid .fg-dot { width: 6px; height: 6px; border-radius: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .particle { display: none; }
}
