html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #0c1220;
  overflow: hidden;
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
}

.board {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #0c1220;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
  overflow: hidden;
}
.slide.active {
  opacity: 1;
  z-index: 2;
}

/* Fond flouté = comble l'espace au lieu d'un bandeau noir, quel que soit le
   ratio de l'écran (mobile portrait, tablette, TV 16:9...) sans jamais
   rogner le visuel net du dessus. */
.slide .bg {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  object-fit: cover;
  filter: blur(28px) brightness(0.55) saturate(1.15);
  transform: scale(1.1);
}

.slide .fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.55));
  transform: scale(1);
  animation: none;
}

.slide.active .fg.kb-in {
  animation: kenburns-in var(--slide-duration, 9s) ease-in-out forwards;
}
.slide.active .fg.kb-out {
  animation: kenburns-out var(--slide-duration, 9s) ease-in-out forwards;
}

@keyframes kenburns-in {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.06) translate(-1%, -1%); }
}
@keyframes kenburns-out {
  from { transform: scale(1.06) translate(-1%, -1%); }
  to   { transform: scale(1) translate(0, 0); }
}

.top-bar, .bottom-bar {
  position: fixed;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  z-index: 10;
  padding: 14px 20px;
  color: #fff;
  pointer-events: none;
  gap: 12px;
}
.top-bar {
  top: 0;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
}
.bottom-bar {
  bottom: 0;
  justify-content: space-between;
  background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  pointer-events: auto;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  margin: -4px 0 -4px -4px;
  transition: background 0.15s ease;
}
.brand:hover, .brand:active {
  background: rgba(255,255,255,0.14);
}
.brand img {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.brand span {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  white-space: nowrap;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  pointer-events: auto;
}

#clock {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  flex-shrink: 0;
}

.home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.home-btn:hover, .home-btn:active {
  background: rgba(255,255,255,0.28);
  transform: scale(1.08);
}

.cta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, #d81b3f, #a80f2e);
  box-shadow: 0 4px 14px rgba(168,15,46,0.5);
  padding: 9px 16px;
  border-radius: 999px;
  text-shadow: none;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  color: #fff;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.cta:hover, .cta:active {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(168,15,46,0.65);
  background: linear-gradient(135deg, #ef2249, #c11336);
}
.cta .cta-icon { font-size: 1.05rem; line-height: 1; }
.cta .cta-full { display: inline; }
.cta .cta-short { display: none; }

.dots {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  pointer-events: auto;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
  cursor: pointer;
}
.dot:hover { background: rgba(255,255,255,0.7); }
.dot.active {
  background: #ff3b5c;
  width: 22px;
  border-radius: 5px;
  transform: none;
}

.progress-track {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(255,255,255,0.15);
  z-index: 11;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1b2a4a, #d81b3f);
}
.progress-fill.animating {
  transition: width linear;
}

/* Astuce clavier : uniquement pertinente sur un poste avec souris/clavier
   (l'écran resto est tactile ou passif) — jamais affichée sur mobile/tablette,
   et jamais via un survol "fantôme" déclenché par un tap iOS. */
.hint {
  position: fixed;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  background: rgba(0,0,0,0.4);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .board:hover .hint { opacity: 1; }
}

@media (max-width: 640px) {
  .top-bar, .bottom-bar { padding: 12px 14px; }
  .brand span { font-size: 1.05rem; }
  .brand img { width: 32px; height: 32px; }
  #clock { font-size: 1.05rem; }
  .cta .cta-full { display: none; }
  .cta .cta-short { display: inline; }
  .cta { padding: 8px 13px; font-size: 0.88rem; }
  .hint { display: none; }
}
