/* ─────────────────────────────────────────────────────────────────────────────
   Animation Agenda — habillage de la scène 1080×1080
   Palette : identique à l'app (emerald 500/600/800/900, neutral)
   ⚠️ Aucun élément d'interface DANS #stage (export MP4) — contrôles dessous.
──────────────────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #0a0f0d;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

#frame {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
}

#stage-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* La scène : TOUJOURS 1080×1080 en interne, mise à l'échelle pour tenir à l'écran */
#stage {
  position: relative;
  width: 1080px;
  height: 1080px;
  flex: none;
  background: #ecfdf5;
  overflow: hidden;
  transform-origin: center center;
  border-radius: 4px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

.scene { position: absolute; inset: 0; display: none; }
.scene svg { display: block; }

/* ── Lapin (calque global) ── */
#rabbit {
  position: absolute;
  width: 224px;
  height: 280px;
  bottom: 132px;
  left: 0;
  transform-origin: center bottom;
  will-change: transform, left;
  pointer-events: none;
  z-index: 10;
}
#rabbit svg { overflow: visible; display: block; }

#rabbit-shadow {
  position: absolute;
  bottom: 124px;
  width: 144px;
  height: 26px;
  background: rgba(6, 78, 59, 0.32);
  border-radius: 50%;
  transform-origin: center;
  pointer-events: none;
  z-index: 5;
}

/* ── Bulles de dialogue ── */
.bubble {
  position: absolute;
  max-width: 640px;
  background: #ffffff;
  border: 6px solid #059669;
  border-radius: 30px;
  padding: 24px 34px;
  font-size: 38px;
  line-height: 1.35;
  font-weight: 600;
  color: #262626;
  opacity: 0;
  transform-origin: 18% 100%;
  z-index: 20;
  box-shadow: 0 12px 32px rgba(6, 78, 59, 0.18);
}
.bubble strong { color: #059669; }

.bubble::before,
.bubble::after {
  content: '';
  position: absolute;
  left: var(--tail-left, 110px);
  width: 0;
  height: 0;
  border-style: solid;
}
.bubble::before {
  bottom: -38px;
  border-width: 38px 30px 0 8px;
  border-color: #059669 transparent transparent transparent;
}
.bubble::after {
  bottom: -26px;
  left: calc(var(--tail-left, 110px) + 6px);
  border-width: 28px 22px 0 6px;
  border-color: #ffffff transparent transparent transparent;
}

/* ── Logo Agenda (positionné par un wrapper flex plein-largeur) ── */
.logo-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 26px;
  background: #ffffff;
  border: 6px solid #059669;
  border-radius: 32px;
  padding: 28px 48px;
  opacity: 0;
  transform: scale(0.6);
  transform-origin: center center;
  box-shadow: 0 14px 36px rgba(6, 78, 59, 0.20);
}
.logo-icon { width: 88px; height: 88px; flex: none; }
.logo-title {
  font-size: 84px;
  font-weight: 800;
  color: #059669;
  letter-spacing: -2px;
  line-height: 1;
}
.logo-sub {
  margin-top: 8px;
  font-size: 30px;
  font-weight: 600;
  color: #737373;
}

/* ── Fondu (ouverture + coupes de scène) ── */
#fade {
  position: absolute;
  inset: 0;
  background: #ffffff;
  pointer-events: none;
  z-index: 40;
}

/* ── Barre de contrôles (HORS scène — masquée avec ?bare=1) ── */
#controls {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #d4d4d4;
  font-size: 14px;
  width: min(1080px, 96vw);
}
#controls button {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #059669;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
#controls button:hover { background: #047857; }
#timecode { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hint { color: #737373; white-space: nowrap; }

#seek {
  flex: 1;
  min-width: 120px;
  accent-color: #10b981;
  cursor: pointer;
}

body.bare #controls { display: none; }

/* ── Mode embed (iframe landing) : la scène remplit l'iframe, sans habillage ── */
body.embed { background: #ecfdf5; }
body.embed #frame { padding: 0; gap: 0; }
body.embed #stage { border-radius: 0; box-shadow: none; }
