/* ═══════════════════════════════════════════════
   EZShow Runtime Theme
   Styles du moteur de zones et des actions
═══════════════════════════════════════════════ */

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ── Stage : conteneur plein écran, confiné dans la zone utile via marges d'écran ──
   Les CSS variables --ez-margin-* sont posées sur <html> par le runtime à partir
   de la config d'écran. Défaut 0px partout = plein viewport. Les zones enfantes
   en position:absolute se rapportent au stage (car il est positionné). */
#stage {
  position: absolute;
  top:    var(--ez-margin-top,    0px);
  left:   var(--ez-margin-left,   0px);
  right:  var(--ez-margin-right,  0px);
  bottom: var(--ez-margin-bottom, 0px);
  overflow: hidden;
}

/* ── Zone : positionnement absolu en % ── */
.ez-zone {
  position: absolute;
  overflow: hidden;
}

/* ═══════════════════════════
   ACTION : header
═══════════════════════════ */
.ez-action-header {
  background: var(--ez-panel-bg, #0a1520);
  border-bottom: 1px solid var(--ez-border, rgba(255,255,255,0.07));
}
.ez-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 100%;
  gap: 16px;
}
.ez-header-logo {
  height: 70%;
  max-height: 48px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 4px;
}
.ez-header-title {
  flex: 1;
  font-size: min(clamp(14px, 1.8vw, 24px), calc(var(--ez-h-px, 100px) * 0.55));
  line-height: 1;
  font-weight: 600;
  color: var(--ez-accent-text, #fff);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ez-header-clock {
  font-size: min(clamp(14px, 1.6vw, 22px), calc(var(--ez-h-px, 100px) * 0.5));
  line-height: 1;
  font-weight: 500;
  color: var(--ez-accent-text, rgba(255,255,255,0.7));
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* ═══════════════════════════
   ACTION : ranking
═══════════════════════════ */
.ez-action-ranking {
  background: var(--ez-bg, #0d1b2a);
}
.ez-ranking-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.columns-area {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* ═══════════════════════════
   ACTION : panel générique
   (scores, schedule)
═══════════════════════════ */
.ez-action-scores,
.ez-action-schedule {
  background: var(--ez-panel-bg, rgba(255,255,255,0.04));
  border-left: 1px solid var(--ez-border, rgba(255,255,255,0.06));
}
.ez-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px 14px;
  gap: 8px;
}
.ez-panel-title {
  font-size: clamp(10px, 1.1vw, 14px);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ez-accent, #4a6a88);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ez-border, rgba(255,255,255,0.06));
  flex-shrink: 0;
}
.ez-scores-list,
.ez-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  flex: 1;
}
.ez-scores-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--ez-row-stripe, rgba(255,255,255,0.03));
  border-radius: 6px;
}
.ez-scores-label {
  font-size: clamp(10px, 1vw, 13px);
  color: var(--ez-text-muted, #8fa8c0);
}
.ez-scores-value {
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 700;
  color: var(--ez-score-color, #e0e8f0);
  background: var(--ez-score-bg, rgba(255,255,255,0.07));
  border-radius: 4px;
  padding: 1px 8px;
}
.ez-schedule-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--ez-border, rgba(255,255,255,0.04));
  border-radius: 4px;
}
.ez-schedule-time {
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 700;
  color: var(--ez-accent, #F39C12);
  flex-shrink: 0;
  min-width: 42px;
}
.ez-schedule-label {
  font-size: clamp(10px, 1vw, 13px);
  color: var(--ez-text, #c8ddf0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.ez-schedule-note {
  font-size: clamp(8px, 0.9vw, 11px);
  color: var(--ez-text-muted, rgba(255,255,255,0.4));
  flex-shrink: 0;
}
.ez-scores-sublabel {
  font-size: clamp(9px, 0.9vw, 11px);
  color: rgba(255,255,255,0.4);
  flex: 1;
  padding: 0 6px;
}

/* ═══════════════════════════
   ACTION : countdown
═══════════════════════════ */
.ez-action-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ez-cd-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ═══════════════════════════
   THÈME CLAIR
═══════════════════════════ */
.ez-theme-light .ez-ranking-cols { background: #f0f4f8; }
.ez-theme-light .ez-action-header { background: #1a3a5c; }
.ez-theme-light .ez-panel { background: #fff; color: #1a2a3a; }
.ez-theme-light .ez-panel-title { color: #1a2a3a; border-color: rgba(0,0,0,0.1); }
.ez-theme-light .ez-scores-label { color: #3a5878; }
.ez-theme-light .ez-scores-value { background: rgba(0,0,0,0.05); color: #1a2a3a; }
.ez-theme-light .ez-scores-row { background: rgba(0,0,0,0.02); }
.ez-theme-light .ez-schedule-label { color: #1a2a3a; }
.ez-theme-light .ez-schedule-row { border-color: rgba(0,0,0,0.06); }

/* ═══════════════════════════
   ACTION : ticker
═══════════════════════════ */
.ez-action-ticker {
  background: var(--ez-panel-bg, #0a1520);
  border-top: 1px solid var(--ez-border, rgba(255,255,255,0.07));
}
.ez-ticker-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ez-ticker-track {
  white-space: nowrap;
  font-size: min(clamp(12px, 1.4vw, 18px), calc(var(--ez-h-px, 100px) * 0.55));
  line-height: 1;
  font-weight: 500;
  color: var(--ez-accent-text, #ffffff);
  letter-spacing: 0.4px;
  will-change: transform;
}

/* ═══════════════════════════
   ACTION : clock
═══════════════════════════ */
.ez-action-clock {
  background: var(--ez-panel-bg, rgba(0,0,0,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
}
.ez-clock {
  font-weight: 600;
  color: var(--ez-text, #c8ddf0);
  font-variant-numeric: tabular-nums;
  letter-spacing: 4px;
  white-space: pre;
  text-align: center;
  line-height: 1.3;
}

/* ═══════════════════════════
   Animations de changement de rang
═══════════════════════════ */
@keyframes ezFlashUp {
  0%   { background: rgba(46,204,113,0.35); }
  100% { background: transparent; }
}
@keyframes ezFlashDown {
  0%   { background: rgba(231,76,60,0.35); }
  100% { background: transparent; }
}
@keyframes ezScoreChange {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.18); color: var(--ez-accent, #f0b429); }
  100% { transform: scale(1); }
}

/* ── Animations ranking ── */
@keyframes ezFlashUp {
  0%   { background: rgba(46,204,113,0.35); }
  100% { background: transparent; }
}
@keyframes ezFlashDown {
  0%   { background: rgba(231,76,60,0.35); }
  100% { background: transparent; }
}

.ez-action-ranking {
  height: 100%;
}
.ez-action-ranking .ez-ranking-cols {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  gap: 2px;
}

/* ═══════════════════════════
   ACTION : slideshow
═══════════════════════════ */
.ez-action-slideshow {
  background: #000;
}
.ez-slideshow-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}
.ez-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════
   ACTION : media
═══════════════════════════ */
.ez-action-media {
  background: #000;
  overflow: hidden;
}

/* ═══════════════════════════
   ACTION : iframe
═══════════════════════════ */
.ez-action-iframe {
  background: #fff;
  overflow: hidden;
}

/* ═══════════════════════════
   ACTION : bracket
═══════════════════════════ */
.ez-action-bracket {
  background: var(--ez-bg, #0d1b2a);
  overflow: hidden;
}