:root{
  --bg: #0b0b0e;
  --fg: #e7e7ea;
  --accent: #e53935;
  --accent2: #ef9a9a;
  --ring: #c0a86e;
  --focus: #66afe9;
}
*{box-sizing:border-box}
html,body{height:100%}

/* Fond "hacker" */
body{
  margin:0;
  background-color:#000000;
  background-image: radial-gradient(#11581E, #041607), url("./bg.gif");
  background-repeat:no-repeat;
  background-size:cover;
  color:var(--fg);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Calques "hacker" */
.noise{
  pointer-events:none;
  position:fixed; inset:0;
  width:100%; height:100%;
  background-image:url("./bg.gif");
  background-repeat:no-repeat;
  background-size:cover;
  z-index:-1;
  opacity:.02;
}
.overlay{
  pointer-events:none;
  position:fixed; inset:0;
  width:100%; height:100%;
  background: repeating-linear-gradient(
    180deg,
    rgba(0,0,0,0) 0,
    rgba(0,0,0,.3) 50%,
    rgba(0,0,0,0) 100%
  );
  background-size:auto 4px;
  z-index:1;
}
.overlay::before{
  content:"";
  pointer-events:none;
  position:absolute; inset:0;
  width:100%; height:100%;
  background-image: linear-gradient(
    0deg,
    transparent 0%,
    rgba(32,128,32,.2) 2%,
    rgba(32,128,32,.8) 3%,
    rgba(32,128,32,.2) 3%,
    transparent 100%
  );
  background-repeat:no-repeat;
  animation: scan 7.5s linear infinite;
}
@keyframes scan{
  0%{background-position:0 -100vh}
  35%,100%{background-position:0 100vh}
}

/* Centrage parfait du buzzer */
.wrap{
  min-height: 100vh;      /* fallback */
  min-height: 100svh;     /* hauteur “safe” sur mobile */
  display: grid;
  place-items: center;    /* centre l element horizontalement et verticalement */
  padding: 2rem;
  position: relative;     /* au-dessus de .noise */
  z-index: 2;             /* au-dessus de .overlay (z:1) */
}

/* Buzzer */
.buzzer{
  position:relative;
  width:220px; height:220px;
  border:none; background:transparent; cursor:pointer;
  filter:drop-shadow(0 8px 20px rgba(0,0,0,.6));
}
.buzzer:focus-visible{ outline: 3px solid var(--focus); outline-offset: 4px; border-radius:50% }
.buzzer .ring{
  position:absolute; inset:0;
  background: radial-gradient(circle at 50% 60%, #f7f3d7, var(--ring) 40%, #6d5d38 70%);
  border-radius:50%;
}
.buzzer .cap{
  position:absolute; inset:12px; border-radius:50%;
  background: radial-gradient(circle at 40% 30%, var(--accent2), var(--accent) 55%, #901a1a 100%);
  display:grid; place-items:center;
  color:#fff; font-weight:800; text-transform:uppercase; letter-spacing:.5px;
  box-shadow: inset 0 10px 25px rgba(0,0,0,.45), 0 0 0 6px rgba(0,0,0,.15);

  /* Taille de texte augmentée (fluide) */
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
}
.buzzer:hover .cap{ transform: translateY(1px); transition: transform .05s }
.buzzer:active .cap{ transform: translateY(5px) }

/* Style "hacker" applique au texte du bouton via .output */
.output{
  font-family: 'Inconsolata', Helvetica, sans-serif;
  color: rgba(128,255,128,0.9);
  text-shadow:
    0 0 1ex rgba(51,255,51,1),
    0 0 2px rgba(255,255,255,0.85);
}
/* Evite le prefixe '> ' prevu pour les paragraphes du theme */
.buzzer .cap.output::before{ content:none }

/* Modale transparente pour laisser voir le fond "hacker" */
.dialog[hidden]{ display:none }
.dialog{
  position:fixed; inset:0;
  background: transparent;       /* pas de voile noir */
  display:grid; place-items:center; padding:1rem;
  z-index:1000;
}
.dialog-inner{
  position:relative; width:min(100%, 460px);
  background: transparent;       /* pas de fond */
  border: none;                  /* pas de bord */
  box-shadow: none;              /* pas d’ombre */
  border-radius:12px; padding:1rem 1rem 1.25rem;
}
.close{
  position:absolute; top:.25rem; right:.5rem; border:none; background:transparent; color:#ccc;
  font-size:2rem; line-height:1; cursor:pointer;
}
.close:focus-visible{ outline: 3px solid var(--focus); border-radius:6px }

/* Cadre video 9:16 avec lisere vert */
.video-frame{
  width:100%;
  aspect-ratio: 9 / 16;
  background: transparent;       /* pas de fond noir */
  border-radius:10px; overflow:hidden;

  /* Lisere vert léger + halo */
  border: 2px solid rgba(128,255,128,0.45);
  box-shadow:
    0 0 12px rgba(51,255,51,0.28),
    0 0 24px rgba(51,255,51,0.12) inset;
}
video{
  width:100%; height:100%; display:block; object-fit:contain;
  background: transparent;       /* evite le noir autour chez certains navigateurs */
  border-radius:10px;
}

/* Petites largeurs */
@media (max-width: 380px){
  .buzzer{ width:180px; height:180px }
}

/* Animation "buzz" */
.buzzer.buzz .cap { transform: translateY(6px) scale(0.97); }
.buzzer.buzz .ring { animation: pulse .3s ease-out 2; }
@keyframes pulse {
  from { box-shadow: 0 0 0 0 rgba(229,57,53,.55); }
  to   { box-shadow: 0 0 0 18px rgba(229,57,53,0); }
}
