/* ============================================ */
/* Viewer — broadcast view                       */
/* ============================================ */
.viewer {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0A0E17;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
}

.viewer__grid {
  position: absolute;
  inset: 0 0 56px 0;
  display: grid;
  gap: 1px;
  background: rgba(255,255,255,0.04);
}
.viewer__grid--standby {
  background: #0A0E17;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vz {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}
.vz__corner {
  display: none;
}
.vz__corner-letter {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  width: 20px; height: 20px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.06);
}
.vz__corner-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
}

/* ============================================ */
/* SLIDE tile (pdf, ppt)                        */
/* ============================================ */
.vz--slide {
  background: #131826;
  padding: clamp(20px, 4vw, 64px) clamp(24px, 5vw, 72px);
}
.vz-slide__inner { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 96%; }
.vz-slide__meta {
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.18em;
  margin-bottom: clamp(12px, 1.8vw, 24px);
  text-transform: uppercase;
}
.vz-slide__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4.2vw, 60px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 clamp(10px, 1.4vw, 18px) 0;
  text-wrap: balance;
}
.vz-slide__sub {
  font-size: clamp(11px, 1.4vw, 20px);
  color: rgba(255,255,255,0.55);
  font-weight: 400;
  margin-bottom: clamp(18px, 3vw, 44px);
  line-height: 1.4;
}
.vz-slide__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.6vw, 24px);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: clamp(14px, 2vw, 28px);
}
.vz-slide__stat-num {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 38px);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vz-slide__stat-num small {
  font-size: clamp(10px, 1.4vw, 20px);
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  margin-left: 2px;
}
.vz-slide__stat-lbl {
  font-size: clamp(8px, 0.85vw, 12px);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  margin-top: clamp(4px, 0.6vw, 8px);
  font-weight: 500;
  text-transform: uppercase;
}
.vz-slide__progress {
  position: absolute;
  bottom: clamp(12px, 1.8vw, 28px);
  left: clamp(24px, 5vw, 72px);
  right: clamp(24px, 5vw, 72px);
}
.vz-slide__progress-bar {
  height: 2px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.vz-slide__progress-bar > div {
  height: 100%;
  width: 0%;
  background: rgba(245, 184, 66, 0.9);
  animation: vz-progress 8s linear infinite;
}
@keyframes vz-progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ============================================ */
/* KPI tile                                     */
/* ============================================ */
.vz--kpi {
  background: #0F1421;
  padding: clamp(24px, 4vw, 56px);
  align-items: center;
  justify-content: center;
}
.vz-kpi__inner { text-align: center; max-width: 100%; }
.vz-kpi__label {
  font-size: clamp(9px, 1vw, 14px);
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.22em;
  margin-bottom: clamp(12px, 1.8vw, 24px);
  text-transform: uppercase;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}
.vz-kpi__num {
  font-family: var(--font-display);
  font-size: clamp(80px, 16vw, 240px);
  font-weight: 600;
  line-height: 0.95;
  color: #fff;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin-bottom: clamp(10px, 1.5vw, 20px);
}
.vz-kpi__trend {
  font-size: clamp(12px, 1.3vw, 18px);
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  margin-bottom: clamp(6px, 0.9vw, 12px);
}
.vz-kpi__trend strong { color: #4ADE80; font-weight: 600; }
.vz-kpi__record {
  font-size: clamp(10px, 1vw, 13px);
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ============================================ */
/* DATA tile (xls)                              */
/* ============================================ */
.vz--data {
  background: #131826;
  padding: clamp(20px, 3vw, 48px);
}
.vz-data__inner { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.vz-data__meta {
  font-size: clamp(10px, 1vw, 13px);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 12px;
}
.vz-data__title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 600;
  color: #fff;
  margin: 0 0 clamp(20px, 3vw, 36px) 0;
  letter-spacing: -0.02em;
}
.vz-data__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.5vw, 18px);
}
.vz-data__cell {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  padding: clamp(12px, 2vw, 22px);
  border-radius: 6px;
}
.vz-data__cell-num {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 44px);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.vz-data__cell-lbl {
  font-size: clamp(9px, 0.9vw, 12px);
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
  letter-spacing: 0.06em;
  font-weight: 500;
  text-transform: uppercase;
}

/* ============================================ */
/* PHOTO tile                                   */
/* ============================================ */
.vz--photo { background: #0A0E17; }
.vz-photo__bg {
  position: absolute;
  inset: 0;
}
.vz-photo__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: clamp(24px, 4vw, 48px) clamp(24px, 5vw, 56px) clamp(16px, 2.5vw, 32px);
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
}
.vz-photo__cap-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.9vw, 26px);
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.vz-photo__cap-meta {
  font-size: clamp(10px, 1vw, 13px);
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}

/* ============================================ */
/* VIDEO tile (vid, yt)                         */
/* ============================================ */
.vz--video {
  background: #0F1421;
}
.vz-video__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(245,184,66,0.12) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(96,165,250,0.08) 0%, transparent 60%);
}
.vz-video__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 20px);
  padding: 40px;
}
.vz-video__play {
  width: clamp(56px, 6vw, 88px);
  height: clamp(56px, 6vw, 88px);
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: #0A0E17;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vz-video__title {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 600;
  color: #fff;
  text-align: center;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.vz-video__duration {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.1vw, 14px);
  color: rgba(255,255,255,0.5);
  font-variant-numeric: tabular-nums;
}

/* ============================================ */
/* SOCIAL tile                                  */
/* ============================================ */
.vz--social {
  background: #0F1421;
  padding: clamp(20px, 3vw, 48px);
}
.vz-social__inner { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.vz-social__head {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 14px);
  margin-bottom: clamp(14px, 2vw, 28px);
}
.vz-social__avatar {
  width: clamp(32px, 3.5vw, 48px);
  height: clamp(32px, 3.5vw, 48px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #2A3142;
}
.vz-social__author {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
}
.vz-social__sub {
  font-size: clamp(10px, 1vw, 13px);
  color: rgba(255,255,255,0.5);
  margin-top: 1px;
}
.vz-social__time { font-size: clamp(9px, 0.9vw, 12px); color: rgba(255,255,255,0.35); margin-top: 2px; }
.vz-social__icon {
  width: clamp(24px, 2.5vw, 32px);
  height: clamp(24px, 2.5vw, 32px);
  border-radius: 6px;
  background: rgba(96, 165, 250, 0.12);
  color: #60A5FA;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vz-social__body {
  font-size: clamp(11px, 1.3vw, 17px);
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
  flex: 1;
  font-weight: 400;
  text-wrap: pretty;
  overflow: hidden;
}
.vz-social__body strong { color: #fff; font-weight: 600; }
.vz-social__metrics {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  padding-top: clamp(14px, 2vw, 22px);
  margin-top: clamp(10px, 1.5vw, 18px);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: clamp(11px, 1.1vw, 14px);
  color: rgba(255,255,255,0.5);
}
.vz-social__metrics strong { color: rgba(255,255,255,0.9); font-weight: 600; }

/* ============================================ */
/* WEATHER tile                                 */
/* ============================================ */
.vz--weather {
  background: linear-gradient(135deg, #0F2030 0%, #061018 100%);
  padding: clamp(20px, 3vw, 48px);
  align-items: center;
  justify-content: center;
}
.vz-weather__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
  color: rgba(255,255,255,0.7);
}
.vz-weather__inner > svg:first-child {
  color: #FFD24A;
  width: clamp(40px, 8vw, 100px);
  height: clamp(40px, 8vw, 100px);
}
.vz-weather__temp {
  font-family: var(--font-display);
  font-size: clamp(60px, 12vw, 160px);
  font-weight: 600;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.vz-weather__temp span { color: rgba(255,255,255,0.4); font-weight: 500; margin-left: 2px; }
.vz-weather__city {
  font-size: clamp(12px, 1.3vw, 18px);
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
}
.vz-weather__forecast {
  display: flex;
  gap: clamp(12px, 2vw, 32px);
  margin-top: clamp(12px, 1.5vw, 24px);
}
.vz-weather__forecast > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.vz-weather__day {
  font-size: clamp(9px, 0.9vw, 11px);
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  font-weight: 600;
}
.vz-weather__small-temp {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.6vw, 22px);
  color: #fff;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ============================================ */
/* TEXT announcement tile                       */
/* ============================================ */
.vz--text {
  background: linear-gradient(135deg, #1A1F2C 0%, #0A0E17 100%);
  padding: clamp(20px, 4vw, 64px);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.vz-text__inner { max-width: 90%; }
.vz-text__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 56px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0 0 clamp(16px, 2vw, 28px) 0;
}
.vz-text__sub {
  font-size: clamp(11px, 1.2vw, 16px);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
  font-weight: 500;
  text-transform: uppercase;
}

/* ============================================ */
/* Empty zone                                   */
/* ============================================ */
.vz--empty {
  background: #0F1421;
  align-items: center;
  justify-content: center;
}
.vz-empty__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding: 24px;
}
.vz-empty__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}
.vz-empty__sub {
  font-size: 11px;
  max-width: 220px;
  color: rgba(255,255,255,0.35);
}

/* ============================================ */
/* Standby (no playlist active)                 */
/* ============================================ */
.vz-standby {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: rgba(255,255,255,0.6);
  text-align: center;
}
.vz-standby__logo {
  height: clamp(40px, 5vw, 72px);
  opacity: 0.95;
  filter: brightness(1.4) saturate(1.1);
  margin-bottom: 12px;
}
.vz-standby__title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: -0.02em;
}
.vz-standby__sub {
  font-size: clamp(11px, 1.1vw, 15px);
  color: rgba(255,255,255,0.4);
  max-width: 400px;
}
.vz-standby__dot {
  margin-top: 16px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  position: relative;
}
.vz-standby__dot > span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: standby-pulse 2.4s ease-in-out infinite;
}
@keyframes standby-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(2.4); opacity: 0; }
}

/* ============================================ */
/* Logo / Clock / Ticker overlays               */
/* ============================================ */
.viewer__brand {
  position: absolute;
  top: 18px; left: 24px;
  z-index: 10;
  background: rgba(255,255,255,0.04);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}
.viewer__brand img {
  height: clamp(18px, 1.8vw, 26px);
  display: block;
  opacity: 0.95;
  filter: brightness(1.4) saturate(1.1);
}

.viewer-clock {
  position: absolute;
  top: 18px; right: 24px;
  z-index: 10;
  background: rgba(255,255,255,0.04);
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  text-align: right;
}
.viewer-clock__time {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.viewer-clock__seconds {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin-left: 2px;
  font-weight: 400;
}
.viewer-clock__date {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  text-transform: capitalize;
  margin-top: 3px;
  letter-spacing: 0.04em;
}

.viewer-ticker {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: #060A12;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 5;
}
.viewer-ticker__label {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 6px 16px;
  margin: 0 20px;
  border-radius: 3px;
  flex-shrink: 0;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.06);
}
.viewer-ticker__track {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  white-space: nowrap;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.viewer-ticker__content {
  display: flex;
  gap: 48px;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  padding-right: 48px;
  flex-shrink: 0;
  animation: ticker-scroll 60s linear infinite;
}
.viewer-ticker__content > span { flex-shrink: 0; }
.viewer-ticker__content strong { color: #fff; font-weight: 600; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.viewer-ticker__weather {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 0 18px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  border-left: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  align-self: stretch;
}
.viewer-ticker__weather strong { color: #fff; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.viewer-ticker__weather svg { color: rgba(255,255,255,0.55); }

/* ============================================ */
/* Hover chrome                                 */
/* ============================================ */
.viewer__chrome {
  position: absolute;
  bottom: 72px; left: 24px; right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
  pointer-events: none;
}
.viewer__chrome--show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.viewer__chrome .btn {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
}
.viewer__chrome .btn:hover { background: rgba(255,255,255,0.14); }
.viewer__chrome .btn svg { color: rgba(255,255,255,0.7); }
.viewer__chrome-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.55);
  padding: 6px 14px;
  border-radius: 6px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
}
.viewer__chrome-meta .badge {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.15);
  color: #FCA5A5;
}

/* === Toggles paramètres viewer (appliqués via classes sur .viewer) === */
.viewer--hide-footer .viewer-ticker { display: none !important; }
.viewer--hide-clock .viewer-clock { display: none !important; }
.viewer--hide-logo .viewer__brand { display: none !important; }
.viewer--hide-corner-label .vz__corner-label { display: none !important; }
.viewer--hide-zone-letter .vz__corner-letter { display: none !important; }

/* === Rendu réel des médias uploadés === */
.vz--real-media {
  background: #000;
  position: relative;
}
.vz-real__img,
.vz-real__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.vz-real__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}
.vz-real__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: clamp(20px, 3vw, 36px) clamp(24px, 4vw, 48px) clamp(14px, 2vw, 24px);
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
  pointer-events: none;
}
.vz-real__title {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.7vw, 22px);
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* === PDF slideshow === */
.vz--pdf-slideshow {
  background: #0A0E17;
  position: relative;
}
.vz-pdf__page {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}
.vz-pdf__page--active { opacity: 1; }
.vz-pdf__pager {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: clamp(14px, 2.5vw, 28px) clamp(20px, 3vw, 36px) clamp(12px, 2vw, 24px);
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(11px, 1.2vw, 16px);
  font-weight: 500;
  letter-spacing: 0.02em;
  pointer-events: none;
}
