/* Écran vidéo d'arrivée (assets/js/gate.js) : la vidéo au centre, le site flouté derrière.
   La classe html.gate-on est posée dans le <head> : la page ne défile pas tant que l'écran est là. */
html.gate-on,
html.gate-on body {
  overflow: hidden;
}
.gate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgb(8 7 12 / 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(0.9);
  backdrop-filter: blur(16px) saturate(0.9);
  color: #f6f2e8;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Arabic', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
/* Navigateurs sans flou d'arrière-plan : un voile plus sombre */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gate {
    background: rgb(8 7 12 / 0.9);
  }
}
.gate-in {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(100%, 960px);
}
.gate-media {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px -24px rgb(0 0 0 / 0.85), 0 0 0 1px rgb(255 255 255 / 0.1);
}
/* 16:9 comme 9:16 : la vidéo garde ses proportions, jamais plus haute que 70 % de l'écran */
.gate-v {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  max-height: 70svh;
  object-fit: contain;
  background: #000;
}
/* Grand écran : le cadre prend la forme de la vidéo (une vidéo verticale n'est pas noyée dans du noir) */
@media (min-width: 700px) {
  .gate-media {
    width: auto;
    max-width: 100%;
  }
  .gate-v {
    width: auto;
    max-width: 100%;
  }
}
.gate-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  background: #c6f23c;
  color: #0f0f0d;
  font-family: inherit;
  font-size: clamp(17px, 4.6vw, 22px);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.8), 0 0 0 8px rgb(198 242 60 / 0.18);
  cursor: pointer;
  animation: gate-pulse 2s ease-in-out infinite;
}
.gate-play[hidden] {
  display: none;
}
@keyframes gate-pulse {
  50% {
    box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.8), 0 0 0 14px rgb(198 242 60 / 0.08);
  }
}
.gate-fs {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.gate-fs[hidden] {
  display: none;
}
.gate-line {
  margin: 2px 0 0;
  text-align: center;
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 600;
  line-height: 1.45;
  color: rgb(246 242 232 / 0.9);
}
.gate-go {
  min-width: min(100%, 320px);
  min-height: 52px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  color: rgb(246 242 232 / 0.7);
  font: inherit;
  font-size: clamp(16px, 4.2vw, 18px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  cursor: not-allowed;
}
.gate-go.is-ok {
  background: #c6f23c;
  color: #0f0f0d;
  box-shadow: 0 14px 34px -12px rgb(198 242 60 / 0.6);
  cursor: pointer;
}
.gate-play:focus-visible,
.gate-fs:focus-visible,
.gate-go:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .gate-play {
    animation: none;
  }
}
/* Après le déblocage : le compte démo de 24 h, en bouton secondaire sous le bouton principal */
.gate-trial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 320px);
  min-height: 48px;
  margin-top: -4px;
  padding: 10px 20px;
  border-radius: 999px;
  color: #f6f2e8;
  font-size: clamp(15px, 4vw, 17px);
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.45);
}
.gate-trial[hidden] {
  display: none;
}
.gate-trial:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
