*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Space Mono', monospace;
  color: #fff;
}

/* ════════════════════════
   GALERIE
   ════════════════════════ */

#gall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: crosshair;
}

/* Le wrapper reçoit les transforms / will-change — l'img à l'intérieur ne
   reçoit jamais de transform : les GIFs animés restent animés */
.gall-item {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(200vw, 0);
  opacity: 0;
  will-change: transform;
  transform-origin: 0 0;
}

.gall-item img {
  display: block;
  width: 100%;
  height: 100%;
}

.gt {
  position: absolute;
  left: 0;
  top: 0;
  font-family: 'Space Mono', monospace;
  color: #fff;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
  will-change: transform;
  transform: translate(-200vw, 0);
}

/* texte multi-lignes — white-space et max-width scalent avec font-size (em) */
.gt.gt-para {
  white-space: pre-wrap;
  max-width: 26em;
  line-height: 1.55;
}

/* ════════════════════════
   OVERLAY
   ════════════════════════ */

#overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
  transition: opacity 0.7s ease;
  cursor: pointer;
}

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

#form-wrap {
  width: min(480px, 88vw);
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: default;
}

/* champ texte */
#txt-input {
  width: 100%;
  min-height: 185px;
  max-height: 40vh;
  background: transparent;
  border: none;
  color: #000;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
  resize: none;
  outline: none;
  padding: 0 0 20px 0;
  caret-color: #000;
  overflow-y: hidden;
}

#txt-input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

/* compteur de caractères */
#char-count {
  display: block;
  text-align: right;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(0, 0, 0, 0.25);
  padding: 6px 0 12px 0;
  transition: color 0.2s;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  margin-top: 6px;
}

#char-count.near-limit { color: rgba(0, 0, 0, 0.55); }
#char-count.at-limit   { color: rgba(180, 0, 0, 0.7); }

/* ligne fichier */
#file-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

#file-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #000;
  cursor: pointer;
  transition: opacity 0.2s;
  flex: 1;
  opacity: 0.4;
}

#file-label:hover        { opacity: 1; }
#file-label.has-file     { opacity: 1; }

#file-input  { display: none; }

#img-preview {
  display: none;
  max-height: 48px;
  max-width: 80px;
  object-fit: contain;
  opacity: 0.8;
}

/* bouton soumettre */
#submit-row {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

#form-error {
  display: none;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(0, 0, 0, 0.5);
  flex: 1;
}

#submit-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #000;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 12px 36px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

#submit-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.5);
}

/* ════════════════════════
   FOOTER OVERLAY
   ════════════════════════ */

#overlay-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1200000; /* au-dessus de l'overlay */
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.6s ease;
}

#overlay-footer.dark {
  border-top-color: rgba(0, 0, 0, 0.1);
}

/* ── groupes gauche / droite ── */
.of-group {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* galerie (défaut) : texte blanc */
#overlay-footer a,
#overlay-footer span {
  font-size: 8px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.6s ease;
  cursor: pointer;
}

#overlay-footer a:hover {
  color: rgba(255, 255, 255, 1);
}

/* overlay ouvert : texte noir */
#overlay-footer.dark a,
#overlay-footer.dark span {
  color: rgba(0, 0, 0, 0.35);
}

#overlay-footer.dark a:hover {
  color: rgba(0, 0, 0, 0.8);
}


@media screen and (max-width: 1080px) {
  
  #char-count {
    margin-top: 30px;
  }
    
}
