:root {
  --fond: #07060f;
  --panneau: #0e0c1d;
  --panneau-2: #141128;
  --bord: rgba(255, 255, 255, .08);
  --texte: #ecebff;
  --muted: #8a87a8;
  --vert: #4ade80;
  --rouge: #f87171;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--fond); color: var(--texte); font: 14px/1.35 Inter, system-ui, sans-serif; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 58, 237, .18), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(236, 72, 153, .08), transparent 60%),
    var(--fond);
}
ul { list-style: none; }
h2 { font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
h2.mt { margin-top: 18px; }
.muted { color: var(--muted); font-weight: 500; letter-spacing: .05em; }
.live { font: 700 9px var(--mono); color: #fff; background: var(--rouge); padding: 2px 6px; border-radius: 4px; letter-spacing: .1em; animation: pulse 1.6s infinite; }

.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 290px;
  grid-template-areas:
    "top top top"
    "kpis kpis kpis"
    "gauche centre droite"
    "bas bas bas"
    "pied pied pied";
  gap: 12px;
  padding: 14px 16px;
  max-width: 1680px;
  margin: 0 auto;
}
.panel { background: linear-gradient(180deg, var(--panneau-2), var(--panneau)); border: 1px solid var(--bord); border-radius: 14px; padding: 14px; position: relative; }

/* ---------- en-tête ---------- */
.top { grid-area: top; display: flex; align-items: center; gap: 18px; height: 44px; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 18px Inter; letter-spacing: .18em; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #7c3aed, #ec4899); font-size: 13px; letter-spacing: 0; box-shadow: 0 0 18px rgba(236, 72, 153, .45); }
.online { margin-left: auto; font: 600 12px var(--mono); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.online b { color: var(--vert); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 10px var(--vert); animation: pulse 1.6s infinite; }
.clock { font: 700 13px var(--mono); color: var(--texte); background: var(--panneau-2); border: 1px solid var(--bord); padding: 6px 10px; border-radius: 8px; }

/* ---------- KPI ---------- */
.kpis { grid-area: kpis; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { background: linear-gradient(180deg, var(--panneau-2), var(--panneau)); border: 1px solid var(--bord); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 8px; }
.kpi-label { grid-column: 1 / -1; font: 700 10px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.kpi-val { font: 800 26px Inter; letter-spacing: -.02em; transition: color .3s; }
.kpi-val.flash { color: #fff; text-shadow: 0 0 14px var(--k); }
.kpi-delta { font: 600 11px var(--mono); color: var(--vert); grid-column: 1; }
.kpi svg { grid-row: 2 / 4; grid-column: 2; width: 74px; height: 34px; overflow: visible; }

/* ---------- colonne gauche ---------- */
.gauche { grid-area: gauche; }
.taches li { display: grid; grid-template-columns: 26px 1fr; gap: 2px 10px; padding: 8px 0; border-bottom: 1px dashed var(--bord); }
.taches li:last-child { border: 0; }
.av { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 800 11px Inter; color: #0b0a18; background: var(--c); grid-row: 1 / 4; box-shadow: 0 0 10px color-mix(in srgb, var(--c) 50%, transparent); }
.t-nom { font: 700 12px Inter; display: flex; justify-content: space-between; }
.t-nom small { font: 600 10px var(--mono); color: var(--muted); }
.t-tache { font: 500 11px var(--mono); color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 3px; }
.barre i { display: block; height: 100%; width: 0; background: var(--c); box-shadow: 0 0 8px var(--c); transition: width .9s linear; }

/* ---------- centre : bureau ---------- */
.centre { grid-area: centre; display: flex; flex-direction: column; min-height: 560px; background: radial-gradient(900px 400px at 50% 30%, rgba(124, 58, 237, .14), transparent 70%), linear-gradient(180deg, #120f26, #0b0a18); }
.pipeline-head { display: flex; justify-content: space-between; align-items: center; }
.pipeline-head h2 { margin: 0; }
.moving { font: 600 11px var(--mono); color: var(--muted); }
.moving b { color: #fff; }
.plateformes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 6px; }
.pf { --c: #fff; position: relative; display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--c); border-radius: 10px; padding: 8px 12px; background: color-mix(in srgb, var(--c) 9%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 20%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 8%, transparent); }
.pf-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--c); color: #0b0a18; }
.pf-ic svg { width: 16px; height: 16px; }
.pf-nom { font: 700 10px var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.pf-n { font: 800 20px Inter; }
.pf-n small { font: 600 12px Inter; color: var(--muted); margin-left: 4px; }
.pf-plus { position: absolute; right: 12px; top: 8px; font: 800 13px var(--mono); color: var(--c); opacity: 0; }
.pf-plus.go { animation: plus 1.4s ease-out; }
.pf-bars { margin-left: auto; display: flex; align-items: end; gap: 3px; height: 26px; }
.pf-bars i { width: 4px; border-radius: 2px; background: var(--c); opacity: .7; transition: height .6s; }

.bureau { position: relative; flex: 1; margin-top: 4px; border-radius: 12px; background:
  linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 28px 28px; }
.desks { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, 1fr); gap: 6px 10px; }
.liens, .vols { position: absolute; inset: 0; pointer-events: none; }
.liens { z-index: 0; width: 100%; height: 100%; overflow: visible; }
.liens path { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1.5; stroke-dasharray: 4 7; animation: defile 1.2s linear infinite; }
.vols { z-index: 3; }

.desk { --c: #fff; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; min-height: 0; }
.bulle { position: relative; margin-bottom: 8px; max-width: 96%; font: 600 10px var(--mono); color: var(--c); background: rgba(10, 8, 24, .85); border: 1px solid var(--c); padding: 3px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 35%, transparent); transition: opacity .25s; }
.bulle.change { animation: pop .35s ease-out; }
.bulle::after { content: ''; position: absolute; }
.station { position: relative; width: 100%; max-width: 230px; aspect-ratio: 2 / 1.05; }
.ecran { position: absolute; right: 4%; top: 0; width: 56%; height: 66%; border: 2px solid var(--c); border-radius: 7px; background: #090817; overflow: hidden; box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent), inset 0 0 14px color-mix(in srgb, var(--c) 15%, transparent); }
.desk.actif .ecran { animation: lueur 1.4s ease-in-out infinite; }
.pied-ecran { position: absolute; right: calc(4% + 24%); top: 66%; width: 8%; height: 9%; background: #2a2645; }
.table { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; border-radius: 8px; background: linear-gradient(180deg, #2a2547, #1a1730); border-top: 2px solid color-mix(in srgb, var(--c) 60%, #2a2547); box-shadow: 0 8px 18px rgba(0, 0, 0, .5); }
.table::before { content: ''; position: absolute; left: 12%; right: 12%; top: 22%; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--c) 55%, transparent); }
.tasse { position: absolute; right: 8%; bottom: 25%; width: 7%; aspect-ratio: 1 / 1.1; border-radius: 0 0 4px 4px; background: #e9e6ff; }
.plante { position: absolute; left: 3%; bottom: 25%; width: 8%; aspect-ratio: 1; }
.agent { position: absolute; left: 6%; bottom: 14%; width: 36%; overflow: visible; }
.agent .bras { animation: tape .32s ease-in-out infinite alternate; transform-box: fill-box; }
.agent .bras.d { animation-delay: .16s; }
.desk:not(.actif) .agent .bras { animation-duration: 1.6s; }
.agent .yeux { animation: cligne 4s infinite; transform-origin: center; transform-box: fill-box; }
.agent .tete { animation: hoche 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.plaque { margin-top: 8px; font: 800 11px Inter; letter-spacing: .04em; color: #fff; background: color-mix(in srgb, var(--c) 28%, #0b0a18); border: 1.5px solid var(--c); padding: 3px 12px; border-radius: 6px; box-shadow: 0 0 10px color-mix(in srgb, var(--c) 35%, transparent); }
.meta { margin-top: 3px; font: 600 10px var(--mono); color: var(--muted); white-space: nowrap; }
.meta b { color: var(--c); }

/* contenus des écrans */
.sc { position: absolute; inset: 6px; }
.sc-tendances svg { width: 100%; height: 100%; }
.sc-tendances polyline { fill: none; stroke: var(--c); stroke-width: 2.4; stroke-dasharray: 160; animation: trace 2.6s ease-in-out infinite; filter: drop-shadow(0 0 3px var(--c)); }
.tag { position: absolute; right: 2px; top: 0; font: 700 8px var(--mono); color: #0b0a18; background: var(--c); padding: 1px 4px; border-radius: 3px; }
.sc-texte .ln { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--c) 70%, transparent); margin: 0 0 6px; width: 0; animation: ecrit 3.2s steps(14) infinite; }
.sc-texte .ln:nth-child(2) { animation-delay: .5s; } .sc-texte .ln:nth-child(3) { animation-delay: 1s; }
.sc-texte .ln:nth-child(4) { animation-delay: 1.5s; } .sc-texte .ln:nth-child(5) { animation-delay: 2s; }
.sc-rendu .img { position: absolute; inset: 0 0 12px; border-radius: 3px; background: linear-gradient(110deg, #1e1b4b 20%, color-mix(in srgb, var(--c) 60%, #1e1b4b) 45%, #1e1b4b 70%) 0 0 / 250% 100%; animation: brille 1.8s linear infinite; }
.sc-rendu .pr { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); }
.sc-rendu .pr i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--c); transition: width .9s linear; }
.sc-rendu .pct { position: absolute; left: 4px; top: 3px; font: 700 8px var(--mono); color: #fff; }
.sc-timeline .piste { position: relative; height: 22%; margin-bottom: 6%; border-radius: 2px; background: rgba(255, 255, 255, .05); }
.sc-timeline .piste i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.sc-timeline .tete-lecture { position: absolute; top: -2px; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 6px #fff; animation: lecture 3s linear infinite; }
.sc-miniature .vign { position: absolute; inset: 0; border-radius: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.sc-miniature .vign i { border-radius: 3px; }
.sc-miniature .vign i:first-child { background: linear-gradient(160deg, #57534e, #292524); }
.sc-miniature .vign i:last-child { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 80%, #fff), color-mix(in srgb, var(--c) 40%, #0b0a18)); animation: respire 2s ease-in-out infinite; }
.sc-miniature b { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); font: 800 8px Inter; color: #fff; background: #000a; padding: 1px 4px; border-radius: 3px; white-space: nowrap; }
.sc-planning { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.sc-planning i { border-radius: 2px; background: rgba(255, 255, 255, .06); transition: background .4s; }
.sc-planning i.on { background: var(--c); box-shadow: 0 0 5px var(--c); }
.sc-chat i { display: block; height: 9px; border-radius: 5px; margin-bottom: 5px; background: rgba(255, 255, 255, .14); width: 70%; animation: monte .5s ease-out; }
.sc-chat i.moi { margin-left: auto; width: 55%; background: var(--c); }
.sc-barres { display: flex; align-items: flex-end; gap: 4px; }
.sc-barres i { flex: 1; border-radius: 2px 2px 0 0; background: var(--c); opacity: .85; transition: height .7s ease; }

/* ---------- colonne droite ---------- */
.droite { grid-area: droite; }
.comptes li { display: grid; grid-template-columns: 26px 1fr auto; gap: 1px 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--bord); }
.comptes li:last-child { border: 0; }
.pf-mini { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--c); color: #0b0a18; grid-row: 1 / 3; }
.pf-mini svg { width: 14px; height: 14px; }
.c-nom { font: 700 12px Inter; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sub { font: 500 10px var(--mono); color: var(--muted); }
.c-vues { font: 800 15px Inter; text-align: right; grid-row: 1 / 3; grid-column: 3; }
.c-vues small { display: block; font: 600 10px var(--mono); color: var(--vert); }
.flux { max-height: 240px; overflow: hidden; }
.flux li { display: grid; grid-template-columns: 24px 1fr; gap: 0 9px; padding: 7px 0; border-bottom: 1px dashed var(--bord); animation: entre .45s ease-out; }
.flux .av { width: 24px; height: 24px; border-radius: 50%; font-size: 10px; grid-row: 1 / 4; }
.f-qui { font: 700 11px var(--mono); color: var(--texte); }
.f-qui span { color: var(--muted); font-weight: 500; }
.f-txt { font: 500 12px Inter; color: #d6d4ee; }
.f-rep { font: 600 10px var(--mono); color: #f87171; margin-top: 2px; }

/* ---------- bas ---------- */
.bas { grid-area: bas; display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 12px; }
.planning { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.jour { font: 700 10px var(--mono); color: var(--muted); text-align: center; }
.jour b { display: block; color: var(--texte); font-size: 12px; margin-bottom: 6px; }
.jour.auj b { color: #f472b6; }
.creneau { font: 700 10px var(--mono); border-radius: 5px; padding: 3px 0; margin-bottom: 4px; color: #0b0a18; background: var(--c); opacity: .9; }
.creneau.fait { background: transparent; color: var(--c); border: 1px solid var(--c); opacity: .6; text-decoration: line-through; }
.derniere { display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; }
.vignette { position: relative; aspect-ratio: 9 / 16; border-radius: 9px; overflow: hidden; background: var(--g); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent); }
.vignette::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-40%, -50%); border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; filter: drop-shadow(0 0 4px #0008); }
.d-titre { font: 800 15px Inter; margin-bottom: 3px; }
.d-sub { font: 500 11px var(--mono); color: var(--muted); margin-bottom: 9px; }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.d-stats div { font: 800 15px Inter; }
.d-stats small { display: block; font: 600 9px var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.types li { display: grid; grid-template-columns: 96px 1fr 40px; gap: 10px; align-items: center; margin-bottom: 9px; font: 600 12px Inter; }
.types .barre { height: 8px; margin: 0; border-radius: 4px; }
.types .barre i { border-radius: 4px; }
.types b { font: 700 12px var(--mono); text-align: right; }

/* ---------- jetons vidéo qui volent ---------- */
.jeton { position: absolute; width: 34px; height: 56px; margin: -28px 0 0 -17px; border-radius: 6px; border: 1.5px solid #fff; background: var(--g); box-shadow: 0 0 16px var(--c), 0 6px 14px rgba(0, 0, 0, .5); }
.jeton::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-left: 7px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.jeton span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font: 700 9px var(--mono); color: #fff; background: #000c; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }

/* ---------- notifications ---------- */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { font: 700 13px Inter; background: rgba(14, 12, 29, .95); border: 1px solid var(--c, #f472b6); padding: 9px 16px; border-radius: 999px; box-shadow: 0 0 22px color-mix(in srgb, var(--c, #f472b6) 45%, transparent); animation: toast 4.2s ease forwards; white-space: nowrap; }
.pied { grid-area: pied; text-align: center; font: 500 10px var(--mono); color: #4b4868; padding-bottom: 4px; }

/* ---------- boutons, états vides, hors ligne ---------- */
.btn { font: 700 13px Inter; color: #0b0a18; background: linear-gradient(135deg, #a78bfa, #f472b6); border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; box-shadow: 0 0 18px rgba(236, 72, 153, .35); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-top { font: 700 12px var(--mono); color: var(--texte); background: var(--panneau-2); border: 1px solid var(--bord); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.btn-top:hover { border-color: rgba(255, 255, 255, .25); }
.btn-top.discret { color: var(--muted); }
.btn-top.danger { color: var(--rouge); }
.top .online { margin-left: auto; }
.dot.eteint { background: #4b4868; box-shadow: none; animation: none; }
.vide { color: var(--muted); font: 500 12px Inter; padding: 10px 0; border: 0 !important; display: block !important; }
.bureau-vide { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 30px; }
.bureau-vide p:first-child { font: 800 18px Inter; }
.desk.hors-ligne { filter: grayscale(.85) brightness(.6); }
.desk.hors-ligne .agent .bras { animation: none; }
.barre.indef i { width: 100% !important; background: linear-gradient(90deg, transparent, var(--c), transparent) 0 0 / 50% 100% no-repeat; animation: indef 1.4s linear infinite; }
@keyframes indef { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---------- dépenses, vidéos, journal ---------- */
.depenses li { display: grid; grid-template-columns: 26px 1fr auto; gap: 1px 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--bord); }
.depenses li .av { grid-row: 1 / 3; }
.depenses li .barre { grid-column: 2 / -1; }
.depenses .c-vues { grid-row: 1 / 3; font-size: 14px; }
.videos li { padding: 6px 0 6px 10px; border-left: 2px solid var(--muted); margin-bottom: 6px; }
.videos li.st-en_production { border-color: #fb923c; } .videos li.st-prete { border-color: #22d3ee; }
.videos li.st-publiee { border-color: #4ade80; } .videos li.st-erreur { border-color: var(--rouge); }
.v-titre { font: 700 13px Inter; } .v-titre a { color: inherit; }
.v-sub { font: 500 10px var(--mono); color: var(--muted); }
.journal li { display: grid; grid-template-columns: 42px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--bord); font: 500 12px Inter; }
.j-h { font: 700 10px var(--mono); color: var(--c); padding-top: 2px; }
.types li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- fenêtre des agents ---------- */
.modale { margin: auto; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--panneau); color: var(--texte); border: 1px solid var(--bord); border-radius: 16px; padding: 20px; }
.modale::backdrop { background: rgba(4, 3, 10, .75); backdrop-filter: blur(3px); }
.modale-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modale h3 { font: 800 18px Inter; }
.modale h4 { font: 700 13px Inter; margin: 18px 0 10px; }
.fermer { background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.liste-agents li { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--bord); font-size: 13px; }
.liste-agents small { color: var(--muted); font: 500 11px var(--mono); }
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.champs label, .connexion label { display: grid; gap: 5px; font: 700 11px var(--mono); color: var(--muted); letter-spacing: .06em; }
.champs input, .connexion input { font: 500 14px Inter; color: var(--texte); background: #090817; border: 1px solid var(--bord); border-radius: 9px; padding: 10px 12px; width: 100%; }
.champs input:focus, .connexion input:focus { outline: 2px solid #a78bfa; outline-offset: 1px; }
.champs .couleur input { padding: 3px; height: 42px; }
.jeton-box { margin-top: 16px; padding: 14px; border: 1px solid #4ade80; border-radius: 12px; background: rgba(74, 222, 128, .06); font-size: 13px; }
.jeton-box code { display: block; margin: 8px 0; font: 700 13px var(--mono); color: #4ade80; word-break: break-all; user-select: all; }
.jeton-box pre { font: 500 11px var(--mono); background: #090817; border-radius: 8px; padding: 10px; overflow-x: auto; white-space: pre; color: #d6d4ee; }
.aide { color: var(--muted); margin-top: 6px; }

/* ---------- connexion ---------- */
.page-connexion { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.connexion { width: min(380px, 100%); display: grid; gap: 14px; background: linear-gradient(180deg, var(--panneau-2), var(--panneau)); border: 1px solid var(--bord); border-radius: 18px; padding: 28px; box-shadow: 0 0 60px rgba(124, 58, 237, .18); }
.connexion .logo { justify-content: center; }
.connexion-sous { text-align: center; color: var(--muted); font: 500 13px Inter; margin-top: -6px; }
.mdp { position: relative; display: block; }
.mdp input { padding-right: 44px; }
.oeil { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.oeil.on { color: #a78bfa; }
.oeil svg { width: 20px; height: 20px; }
.erreur { color: var(--rouge); font: 600 12px Inter; min-height: 16px; }

/* ---------- animations ---------- */
@keyframes pulse { 50% { opacity: .45; } }
@keyframes defile { to { stroke-dashoffset: -22; } }
@keyframes tape { from { transform: translateY(0); } to { transform: translateY(-2.2px); } }
@keyframes cligne { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes hoche { 50% { transform: rotate(-3deg); } }
@keyframes lueur { 50% { box-shadow: 0 0 28px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 25%, transparent); } }
@keyframes pop { 0% { transform: scale(.85); opacity: .2; } 100% { transform: scale(1); opacity: 1; } }
@keyframes trace { 0% { stroke-dashoffset: 160; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes ecrit { 0% { width: 0; } 60%, 100% { width: var(--w, 80%); } }
@keyframes brille { to { background-position: -250% 0; } }
@keyframes lecture { from { left: 0; } to { left: 100%; } }
@keyframes respire { 50% { filter: brightness(1.3); } }
@keyframes monte { from { transform: translateY(8px); opacity: 0; } }
@keyframes entre { from { transform: translateX(14px); opacity: 0; } }
@keyframes plus { 0% { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes toast { 0% { opacity: 0; transform: translateY(-12px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }

/* ---------- grand écran : tout tient sur une page, comme un écran de contrôle ---------- */
@media (min-width: 1181px) and (min-height: 760px) {
  .app { height: 100vh; grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
  .gauche, .droite, .centre { min-height: 0; overflow: hidden; }
  .flux { max-height: none; }
}

/* ---------- écrans plus petits ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "top" "kpis" "centre" "gauche" "droite" "bas" "pied"; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bas { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .app { padding: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desks { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .desk { min-height: 190px; }
  .plateformes { grid-template-columns: 1fr; }
  .online { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
