/* page et body */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  background: rgb(255, 255, 255);
  color: #000;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow: hidden;
  position: relative;
  
}
#bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('img/fond-img-nonante9.png') center center / cover no-repeat;
  pointer-events: none; /* ne bloque pas les interactions */
  transition: transform 20s ease-in-out;
  opacity: 25%;
}

body:hover #bg-image {
  transform: scale(1.10); /* zoom léger au survol de la page */
}
a{
  z-index: 1000;
}
a:hover{
  text-decoration: dashed;
  transition: 0.3s ease-in-out;
}
/* bandeau header */
.header-banner {
  position: relative; /* important pour position absolute enfants */
  top: 0;
  width: 100%;
  overflow: hidden;
  height: 40px;
  background: #fff;
  border-bottom: solid 2px black;
  z-index: 9999;
}

/* heure live */
.time {
  position: absolute;
  left: 0px;
  top: 50%;
  border-right: solid black 5px;
  transform: translateY(-50%) scaleY(1.5); /* centré verticalement + étiré */
  color: #000;
  background-color: #fff;
  font-weight: 500;
  font-size: 2em;
  text-transform: uppercase;
  font-stretch: extra-condensed;
  white-space: nowrap;
  pointer-events: none;
  padding-left: 1%;
  padding-right: 1%;
  z-index: 10; /* au-dessus du texte défilant */

}

/* texte défilant */
.scrolling-text {
  position: absolute; /* important pour animation fluide */
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(1.5); /* centré verticalement + étiré */
  white-space: nowrap;
  animation: scroll 20s linear infinite;
  color: #000;
  font-weight: 500;
  text-transform: uppercase;
  font-stretch: extra-condensed;
  letter-spacing: 0px;
  font-size: 2em;
}

/* animation du texte */
@keyframes scroll {
  0% { transform: translateX(0) translateY(-50%) scaleY(1.5); }
  100% { transform: translateX(-50%) translateY(-50%) scaleY(1.5); } /* moitié du bloc dupliqué */
}

/* texte principal draggable */
#collectif {
  position: absolute;
  font-size: 4rem;
  cursor: grab;
}

/* bouton contact */
#contact {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.8rem 2rem;
  font-size: 1rem;
  color: #fff;
  background: #000;
  border: 1px solid #fff;
  text-decoration: none;
  cursor: pointer;
  z-index: 100;
  transition: all 0.5s; /* transition pour tout changement */
}

#contact:hover {
  color: #000;       /* texte noir */
  background: #fff;  /* fond blanc */
  border-color: #000; /* bordure noire */
}
a{
  text-decoration: none;
  color: rgb(0, 0, 0);
  z-index: 1000;
}
a:visited{
  text-decoration:underline;
  color: #fff;
  z-index: 1000;
}
#contact-mail {
  position: absolute;
  bottom: 20px; /* un peu en dessous du bouton */
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  user-select: text; /* permet de copier l'adresse */
  pointer-events: none; /* ne bloque pas les interactions */
  z-index: 100;
}


/* nouveau style pour h1 généré dynamiquement */
.dynamic-h1 {
  position: absolute;
  cursor: grab;
  color: #000;
  user-select: none;
  white-space: nowrap;
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

#warning-text {
  position: absolute;
  top: 55px; /* juste sous le header */
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  opacity: 0.7;
  letter-spacing: 0.02em;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  pointer-events: none;
  z-index: 20;
  transition: all 0.2s ease;
  text-transform:uppercase;
  text-align: center;
}
#warning-text.game-over{
  top: 35vh;
  font-size: 2em;
  text-align: center;
}
/* vibration du body */
@keyframes shakeAnim {
  0% { transform: translate(0px, 0px); }
  10% { transform: translate(-5px, 5px); }
  20% { transform: translate(5px, -5px); }
  30% { transform: translate(-5px, 5px); }
  40% { transform: translate(5px, -5px); }
  50% { transform: translate(-5px, 5px); }
  60% { transform: translate(5px, -5px); }
  70% { transform: translate(-5px, 5px); }
  80% { transform: translate(5px, -5px); }
  90% { transform: translate(-5px, 5px); }
  100% { transform: translate(0px, 0px); }
}

body.shake {
  animation: shakeAnim 0.5s linear infinite;
}

a#contact.game-over {
  bottom: auto;
}
/* =====================
   Responsive pour mobile
   ===================== */

/* header et texte défilant */
.header-banner {
  height: 50px; /* un peu plus grand sur mobile */
}

.time {
  font-size: 1.5em;
  padding: 0 5px;
}

.scrolling-text {
  font-size: 1.2em;
}

/* texte principal draggable */
#collectif {
  font-size: 3rem;
}

/* h1 dynamique */
.dynamic-h1 {
  font-size: 2rem;
}

/* bouton contact */
#contact {
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
}

/* mail sous le bouton */
#contact-mail {
  font-size: 0.8rem;
}

/* Game Over bouton responsive */
#contact.game-over {
  font-size: 1.2rem;
  padding: 0.8rem 2rem;
}
#theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid black;
  background: white;
  color: black;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.2s ease, background 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

/* Overlay négatif */
#invert-overlay {
  position: fixed;
  inset: 0;
  background: white;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  z-index: 9998;
  transition: opacity 0.25s ease;
}

/* Actif */
body.negative #invert-overlay {
  opacity: 1;
  z-index: 9998;
}
body.negative #member-img {
  filter: invert()
  saturate(0%);
}

/* Bouton jour/nuit */
#theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid black;
  background: white;
  color: black;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.2s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

/* vibration + pulsation mobile inchangée */

/* ajustement général pour écrans très petits */
/* bouton contact + mail mobile centrés */
@media (max-width: 768px) {
  

  #contact, #contact-mail {
    position: absolute;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
  }

  #contact {
    font-size: 1rem;
    top: 45%;
    padding: 0.8rem 2rem;
  }
  #contact-mail {
    font-size: 0.8rem;
    bottom: auto; /* on ignore bottom */
    margin-top: 1rem;
  }

  #collectif {
    font-size: 3rem;
    top: calc(20vh); /* toujours un peu en haut de l’écran */
    left: 50%;
    transform: translateX(-50%);
  }

  .dynamic-h1 {
    font-size: 2rem;
  }

  .scrolling-text {
    font-size: 1.2em;
  }

  .time {
    font-size: 1.2em;
    padding-top: 2.5px;
    padding-bottom: 2.5PX;
    border-right: 3px solid;
  }
  #theme-toggle{
    display: none;
  }
}

/* Bouton jour/nuit */
/* CSS */
#intro-overlay {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transform: translateY(0); /* départ */
  transition: transform 1s ease-in-out; /* durée de montée */
}

#intro-overlay h1 {
  color: #fff;
  font-size: 4rem;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

  /* Onglet */
  #members-tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: black;
    color: white;
    padding: 12px 10px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
    z-index: 999;
  }
/* ==========================
   PANEL MEMBRES
========================== */

#members-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 320px;
  height: 95vh;
  background: white;
  border-right: black 2.5px solid ;
  color: black;
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 9996;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* 👉 colle la liste en bas */
  padding: 24px;
  box-sizing: border-box;
}

#members-panel.open {
  transform: translateX(0);
}

/* ==========================
   BOUTON FERMER
========================== */

#members-close {
  position: absolute;
  top: 2vh;
  right: 16px;
  background: none;
  border: 1px solid black;
  color: black;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#members-close:hover {
  background: black;
  color: white;
}

/* ==========================
   LISTE DES MEMBRES
========================== */

.members-list {
  display: flex;
  flex-direction: column;
    /* 👉 centré horizontalement */
  gap: 5px;             /* 👉 espace entre les noms */
  margin-bottom: 5vh;    /* 👉 respiration avec le bas */
}

.members-list a {
  color: black;
  padding: 10px;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.members-list a:hover {
  opacity: 1;
  transform: translateX(4px);
}

/* ==========================
   PREVIEW IMAGE
========================== */

.member-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999; /* en dessous de l'onglet, au-dessus du site */
}

#member-img {
  border: solid 1px black;
  position: absolute;
  width: auto;
  height: 300px;
  object-fit: cover;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.98);
  transition: 
    opacity 0.25s ease-in-out,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 9999;
  filter: 
  saturate(0%);
}



/* ==========================
   RESPONSIVE MOBILE
========================== */

@media (max-width: 768px) {
  #members-panel {
    width: 100%;
    padding-top: 5vh;
  }

  .member-preview {
    display: none;
  }
  #member-description{
    display: none;
  }

  .members-list a {
    font-size: 16px;
    padding: 5px;
  }

  #members-close {
    position: absolute; /* fixed pour qu'il reste visible lors du scroll */
    top: 20vh; /* fallback 26px si non supporté */
    right: 16px;
    background: none;
    border: 1px solid black;
    color: black;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 1000; /* au-dessus de tout */
  }
  .members-list{
    margin-bottom: 20px;
    max-height: 70vh;
    max-width: fit-content;
  }
}

#member-description {
  position: absolute;
  width: auto;
  padding: 10px 14px;
  color: black;
  font-weight: bold;
  font-size: 3em;
  line-height: 2.9rem;
  border-radius: 6px;
  pointer-events: none; /* ne bloque pas la souris */
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 500;
  text-align: right;
}
.member-text{
  width: 50vw;
}

/* mobile */
@media (max-width: 768px) {
  #member-description {
    max-width: 180px;
    font-size: 14px;
    padding: 8px 10px;
  }
}
