/* ══════════════════════════════════════════════════════════════════════════
   Les écrans animés du tableau de bord (section 3 « Une seule plateforme »).
   Le balisage et les styles du produit : dash-ui.css (généré). Ici : la fenêtre
   virtuelle mise à l'échelle, les fondus entre écrans, le curseur et les états
   joués par le lecteur (home.js §7a).
   ══════════════════════════════════════════════════════════════════════════ */

/* La fenêtre virtuelle du tableau de bord */
.tdash { position: absolute; top: 0; left: 0; width: 1366px; height: 820px; transform-origin: 0 0; overflow: hidden; pointer-events: none; user-select: none; }
:where(.tdash) { font-family: var(--f-body); color: #2c2218; font-size: 16px; line-height: 1.5; text-align: left; background: #ece2d0; }
.tdash .td-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Les scènes : fondu, flou et changement d'échelle très légers */
.td-scene {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0; visibility: hidden; transform: scale(1.035); filter: blur(10px) saturate(1.08);
  transition: opacity 0.9s var(--ease), transform 1.2s var(--ease), filter 0.9s var(--ease), visibility 0s linear 1.2s;
}
.td-scene.is-active {
  opacity: 1; visibility: visible; transform: none; filter: none;
  transition: opacity 0.9s var(--ease) 0.22s, transform 1.3s var(--ease) 0.22s, filter 0.9s var(--ease) 0.22s, visibility 0s;
}
.td-scene.is-leaving {
  visibility: visible; opacity: 0; transform: scale(0.965); filter: blur(8px) brightness(1.04);
  transition: opacity 0.65s var(--ease), transform 0.9s var(--ease), filter 0.65s var(--ease), visibility 0s;
}

/* Le cadre d'une page de tableau de bord, à la taille de la fenêtre */
.td-scene .talibi-admin-app, .td-scene .talibi-layout-root { height: 100%; }
.td-scene .talibi-layout-root { display: flex; flex-direction: column; overflow: hidden; }
.td-scene .talibi-mega-shell { position: relative !important; z-index: 3; flex: none; }
.td-scene .talibi-mega-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.td-scene .os-main-canvas, .td-scene .os-main-inner, .td-scene .talibi-page-transition, .td-scene .talibi-page-transition__page { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: visible; }
.td-scene .dashboard { position: relative; flex: 1 1 auto; min-height: 100%; }
.td-scene .dash-cine-bg { position: absolute; inset: 0; }
.td-scroll { will-change: transform; }
.td-scene .td-overlay { position: absolute !important; inset: 0; z-index: 20; }
.td-scene input { pointer-events: none; }
.td-face { display: grid; place-items: center; width: 100%; height: 100%; font: 700 12px/1 var(--f-body); color: #fff9f1; background: linear-gradient(135deg, #8a6f56, #4a3728); border-radius: 50%; }

/* États joués par le diaporama */
.td-press { transform: scale(0.97) !important; transition: transform 0.18s ease !important; filter: brightness(0.97); }
.td-ce2 .td-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 0.6s var(--ease), opacity 0.5s var(--ease); }
.td-ce2 .td-reveal > * { overflow: hidden; }
.td-ce2.is-open .td-reveal { grid-template-rows: 1fr; opacity: 1; }
.td-ce2.is-open .classes-level-chevron { transform: rotate(180deg); }
.td-ce2.is-open .classes-level-card { box-shadow: 0 14px 30px -18px rgba(44, 34, 24, 0.45); }
.td-filter-out { transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.td-filter-out.td-out { display: none; }

/* Courbes et jauges dessinées dans la grammaire du produit */
.td-chart--presence { position: relative; width: 100%; height: 200px; }
.td-chart--presence svg { width: 100%; height: 178px; display: block; }
.td-chart-axis { display: flex; justify-content: space-between; padding-left: 30px; font: 600 12px/1 var(--f-body); color: #6b5344; }
.td-chart--trend { width: 100%; height: 100%; }
.td-chart--trend svg { width: 100%; height: 100%; display: block; }
.td-ring { width: 120px; height: 120px; display: block; }
.td-chart--risk { display: grid; gap: 10px; padding: 6px 4px 0; }
.td-risk-row { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 10px; }
.td-risk-label { font: 600 11px/1 var(--f-body); color: #2c2218; text-align: right; }
.td-risk-bar { display: flex; height: 16px; gap: 2px; }
.td-risk-bar i { width: calc(var(--n) * 18%); background: var(--c); border-radius: 3px; }
.td-risk-legend { display: flex; justify-content: center; gap: 14px; margin-top: 4px; font: 600 11px/1 var(--f-body); }
.td-risk-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--c); }
.td-risk-legend span::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--c); }

/* Le curseur */
.td-cursor { position: absolute; top: 0; left: 0; z-index: 40; width: 34px; height: 34px; margin: -4px 0 0 -6px; opacity: 0; pointer-events: none; }
.td-cursor.is-on { opacity: 1; }
.td-cursor svg { position: relative; z-index: 2; width: 34px; height: 34px; fill: #fffbf5; stroke: #2c2218; stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 6px 10px rgba(44, 34, 24, 0.35)); transition: transform 0.18s ease; }
.td-cursor.is-click svg { transform: scale(0.86); }
.td-ripple { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -26px 0 0 -26px; border-radius: 50%; border: 3px solid rgba(184, 146, 74, 0.85); opacity: 0; transform: scale(0.3); }
.td-cursor.is-click .td-ripple { animation: tdRipple 0.7s var(--ease) forwards; }
@keyframes tdRipple { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.4); } }

@media (prefers-reduced-motion: reduce) {
  .td-scene, .td-scene.is-active, .td-scene.is-leaving { transform: none; filter: none; }
}

/* Les trois cartes « Focus » du domaine sur une seule ligne, comme dans le produit */
.td-scene .pilotage-domain-view__primaire--split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
