/* ═══════════════════════════════════════════════════════════
   AFFICHAGE.CSS — Vue TV 55" 1920×1080  (Glassmorphism premium)
   Optimisé pour lecture à ~2,5 m : polices grandes, hiérarchie claire
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:wght@600&display=swap');

/* ─── Reset & base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --glass-bg:     rgba(15, 20, 35, 0.60);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-blur:   blur(20px);
  --accent:       #4fc3f7;
  --accent-warm:  #ffb347;
  --text-primary: #f0f4ff;
  --text-muted:   rgba(240,244,255,0.55);
  --font-main:    'Inter', sans-serif;
  --font-title:   'Playfair Display', serif;
  --top-h:        130px;
  --bot-h:        190px;
  --radius:       20px;
  --transition:   0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --panel-w:      380px;   /* compact — ne doit pas écraser le diaporama */
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #080c14;
  font-family: var(--font-main);
  color: var(--text-primary);
  font-size: 18px;
}

#scale-wrapper {
  position: absolute;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  overflow: hidden;
  background: #080c14;
}

/* ─── Overlay de démarrage ──────────────────────────────── */
#start-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 20, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.8s ease;
}

#start-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

#start-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

#start-logo {
  height: 130px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(79,195,247,0.35));
}

#start-pulse {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(79,195,247,0.15);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  color: var(--accent);
  animation: startPulse 2s ease-in-out infinite;
}

#start-box p {
  font-size: 1.3rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

@keyframes startPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(79,195,247,0.4); }
  50%       { transform: scale(1.08); box-shadow: 0 0 0 24px rgba(79,195,247,0); }
}

/* ─── Diaporama fond ────────────────────────────────────── */
/* Couche floue plein écran (utilisée en mode safe / contain) */
.slide-blur-layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.5);
  transform: scale(1.15); /* évite les bords blancs du blur */
  z-index: 0;
  display: none; /* caché par défaut, activé par JS */
}

.slide-layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1.8s ease;
  z-index: 1;
}
.slide-layer.hidden  { opacity: 0; }
.slide-layer.visible { opacity: 1; }

/* Mode zone visible : photo contain entre les bandeaux + fond flou derrière */
.slide-layer.safe-zone {
  top: var(--top-h);
  bottom: var(--bot-h);
  background-size: contain;
  background-repeat: no-repeat;
}
.slide-layer.safe-zone video { object-fit: contain; }

/* Mode photo entière : contain sans fond flou */
.slide-layer.contain-mode {
  top: var(--top-h);
  bottom: var(--bot-h);
  background-size: contain;
  background-repeat: no-repeat;
}
.slide-layer.contain-mode video { object-fit: contain; }

.overlay-gradient {
  position: fixed; inset: 0; z-index: 2;
  background:
    linear-gradient(to bottom,
      rgba(8,12,20,0.75) 0%,
      rgba(8,12,20,0.10) 28%,
      rgba(8,12,20,0.10) 72%,
      rgba(8,12,20,0.85) 100%),
    /* assombrir le côté droit pour que le panneau soit lisible */
    linear-gradient(to left,
      rgba(8,12,20,0.70) 0%,
      rgba(8,12,20,0.00) 38%);
}

/* ─── Top bar ────────────────────────────────────────────── */
#top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--top-h);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}

#logo {
  height: 90px;       /* +18px */
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

#radio-zone {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 52%;
}

#radio-logo {
  height: 68px;       /* +16px */
  width: 68px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  padding: 5px;
  flex-shrink: 0;
  transition: opacity 0.4s;
}
#radio-logo[src=""] { display: none; }

.radio-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.radio-name {
  font-size: 0.85rem;   /* +0.1rem, lisible à distance */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.marquee-wrap {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.marquee-track {
  display: inline-block;
  white-space: nowrap;
  font-size: 1.2rem;    /* +0.2rem — titre morceau lisible */
  font-weight: 400;
  color: var(--text-primary);
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(var(--marquee-dist)); }
}

/* ─── Main (panneau latéral droit) ───────────────────────── */
main {
  position: fixed;
  top: var(--top-h);
  bottom: var(--bot-h);
  right: 0;
  width: var(--panel-w);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 32px 20px 20px;
}

#panel-container {
  position: relative;
  width: 100%;
  flex: 1;
}

/* ─── Panneaux ───────────────────────────────────────────── */
.panel {
  position: absolute;
  inset: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(79, 195, 247, 0.09);
}

.panel-icon { font-size: 1.8rem; }   /* +0.4rem */

.panel-title {
  font-family: var(--font-title);
  font-size: 1.45rem;    /* +0.3rem — titre du panneau très lisible */
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.panel-body {
  flex: 1;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
}

/* ─── Menu ───────────────────────────────────────────────── */
.menu-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-label {
  font-size: 0.75rem;    /* +0.1rem */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.menu-value {
  font-size: 1.2rem;     /* +0.25rem — plats bien lisibles */
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.4;
}

.menu-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 2px 0;
}

/* ─── Activités ──────────────────────────────────────────── */
.activity-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
}
.activity-item:last-child { border-bottom: none; }

.activity-time {
  font-size: 0.95rem;    /* +0.15rem */
  font-weight: 700;
  color: var(--accent-warm);
  min-width: 52px;
  flex-shrink: 0;
}

.activity-label {
  font-size: 1.1rem;     /* +0.2rem */
  color: var(--text-primary);
  line-height: 1.3;
}

.no-activity {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* ─── Dots navigation ────────────────────────────────────── */
#panel-dots {
  display: flex;
  gap: 10px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  transition: background 0.3s, transform 0.3s;
}
.dot.active {
  background: var(--accent);
  transform: scale(1.4);
}

/* ─── Bottom bar ─────────────────────────────────────────── */
#bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bot-h);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  gap: 32px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
}

/* ─── Météo actuelle ─────────────────────────────────────── */
#meteo-current {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

#meteo-icon { width: 110px; height: 110px; }

.meteo-now-text {
  display: flex;
  flex-direction: column;
}

#meteo-temp {
  font-size: 3.4rem;    /* +1rem — température très visible */
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

#meteo-cond {
  font-size: 1rem;      /* +0.18rem */
  color: var(--text-muted);
  margin-top: 2px;
}

#meteo-feels {
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 1px;
  font-weight: 500;
}

/* ─── Prévisions 7 jours ─────────────────────────────────── */
#meteo-forecast {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: center;
  justify-content: space-evenly;  /* répartition homogène sur toute la largeur */
  overflow: hidden;
  padding: 0 20px;
}

.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;              /* chaque carte prend une part égale */
  max-width: 90px;
  padding: 8px 6px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
}

.forecast-day.today {
  background: rgba(79,195,247,0.13);
  border-color: rgba(79,195,247,0.35);
}

.fc-day-name {
  font-size: 0.78rem;   /* +0.13rem */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.fc-icon { width: 58px; height: 58px; }

.fc-temps {
  display: flex;
  gap: 6px;
  font-size: 0.92rem;   /* +0.14rem */
}

.fc-max { font-weight: 700; color: var(--text-primary); }
.fc-min { color: var(--text-muted); }

/* ─── Horloge ────────────────────────────────────────────── */
#clock-block {
  text-align: right;
  flex-shrink: 0;
}

#clock-time {
  font-size: 4.2rem;    /* +1.2rem — heure très lisible */
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

#clock-date {
  font-size: 1.05rem;   /* +0.2rem */
  color: var(--text-muted);
  text-transform: capitalize;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

/* ─── Bannière message du jour ───────────────────────────── */
#message-banner {
  position: fixed;
  top: var(--top-h);
  left: 0; right: 0;
  z-index: 9;
  padding: 10px 60px;
  background: linear-gradient(90deg, rgba(79,195,247,0.18), rgba(255,179,71,0.18));
  border-bottom: 1px solid rgba(79,195,247,0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  transition: opacity 0.5s ease;
}
#message-banner.hidden { display: none; }

/* ─── Menu midi / dîner (panneau TV) ────────────────────── */
#menu-body {
  justify-content: flex-start;
  padding: 12px 20px;
  gap: 5px;
}

.menu-service-block { display: flex; flex-direction: column; gap: 4px; }

.menu-service-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 2px;
}

.menu-service-active .menu-service-title { color: var(--accent-warm); }

.menu-section-sep {
  height: 1px;
  background: var(--glass-border);
  margin: 6px 0;
  opacity: 0.6;
}

#menu-body .menu-row   { gap: 1px; }
#menu-body .menu-value { font-size: 0.98rem; }
#menu-body .menu-label { font-size: 0.66rem; }
#menu-body .menu-divider { margin: 1px 0; }

/* ─── Panneau anniversaires ──────────────────────────────── */
.birthday-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--glass-border);
}
.birthday-item:last-child { border-bottom: none; }

.birthday-icon { font-size: 2.2rem; }

.birthday-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-warm);
  font-family: var(--font-title);
  line-height: 1.2;
}

/* ─── Vidéo dans diaporama ───────────────────────────────── */
.slide-layer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
