body.debug .menu-item,
body.debug .submenu,
body.debug .popup {
  outline: 1px dashed red;
}

* {
  user-select: none;
}
.music-popup {
  position: fixed;
  width: 300px;
  padding: 14px;
  background: white;
  border: 1px solid black;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}

.music-popup .popup-header {
  display: flex;
  justify-content: flex-end;
  cursor: grab;
}

.music-popup .close-btn {
  cursor: pointer;
  font-size: 16px;
}

.music-popup .popup-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.music-popup button {
  padding: 6px 14px;
  border: 1px solid black;
  background: white;
  cursor: pointer;
}

.music-popup button:hover {
  background: black;
  color: white;
}

.merch-btn {
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 14px;
  background: #111;
  color: #fff;
  border: 1px solid #fff;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.merch-btn:hover {
  background: #444;
}

body {
  margin: 0;
  background: url("images/fond.png") center/cover no-repeat fixed;
  height: 100vh;
  overflow: hidden;
  font-family: "Roboto Condensed", sans-serif;
}
#submenu3 {
  font-family:monospace !important;
  font-size: 15px !important ;
    transform: translateX(-20px);
}
.menu-item {
    transform: translateX(80px);
    font-family: "woodcutter" !important;
    font-size: 40px; 
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid #888;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  color: #222;
  user-select: none;
  transition: all 0.2s ease;
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.05) translateX(80px);
;
  
}
.submenu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(245, 245, 245, 0.3);
  border: 1px solid #aaa;
  padding: 8px;
  border-radius: 20px;
  z-index: 50;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.15s ease-out;
}
.sub-item {
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
/*sub designs*/
#sub2 {
  font-family: "woodcutter3" !important;
font-size: 40px;}
#sub21 {
  font-family: "woodcutter", sans-serif !important;
font-size: 40px;}
#sub22 {
  font-family: "woodcutter3" !important;
font-size: 40px;}
#sub23 {
  font-family: "woodcutter", sans-serif !important;
font-size: 40px;}
#sub24 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub25 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;
}
#sub26 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#sub27 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;
}
#sub28 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub3 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sublipsyncC {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#sub32 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub33 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#sub34 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub35 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#subchampi {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}

/*______*/

.sub-item:hover {
  background: rgba(200, 200, 255, 0.5);
}
.popup-header .title {
  display: none; /* hide all popup titles globally */
}
/* --- POPUPS --- */
.popup {
  position: absolute;
  width: 370px;      /* tu peux adapter pour chaque type de popup */
  height: 350px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 12px;
  border: 5px solid #666;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;  /* empêche tout débordement */
  animation: pop 0.2s ease-out;
  z-index: 20;
}

.popup-header {
  background: linear-gradient(to bottom, #ddd, #bbb);
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  cursor: move;
  border-bottom: 1px solid #999;
}

.close-btn {
  background: #d44;
  color: white;
  width: 18px;
  height: 18px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
}

.close-btn:hover {
  background: #a00;
}

.popup-content {
  flex: 1;                  /* prend tout l’espace restant */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;               /* supprime les marges internes */
  background: #fafafa;
  overflow: hidden;
}

/* Pour les images/GIF */
.popup-content img {
  width: 100%;             /* prend toute la largeur du popup-content */
  height: 100%;            /* prend toute la hauteur du popup-content */
  object-fit: cover;       /* couvre entièrement sans déformation */
  display: block;          /* supprime les petits espaces blancs */
}

/* Popup spécifique pour le D20 */
.popup.dice-popup {
  width: 240px;
  height: 350px;
  padding: 10px;
}

.popup.dice-popup .popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0;
}

.roll-btn {
  padding: 8px 14px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.roll-btn:hover {
  background: #357abd;
}

.dice-result {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  text-align: center;
}

/* --- Animations --- */
@keyframes pop { 
  from { transform: scale(0.85); opacity: 0; } 
  to { transform: scale(1); opacity: 1; } 
}

/* Quiz */
.quiz-form { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: #333; }
.quiz-form .question p { margin: 0 0 6px; }
.submit-btn { margin-top: 10px; padding: 6px 12px; background: #4a90e2; color: white; border: none; border-radius: 8px; cursor: pointer; }
.submit-btn:hover { background: #357abd; }

/* GIF flottants */
.floating-gif-wrapper { position: absolute; cursor: grab; }
.floating-gif-wrapper:active { cursor: grabbing; transform: scale(1.03); }
.floating-gif-wrapper img { display: block; pointer-events: none; }
.floating-gif-wrapper div {
  font-size: 14px; width: 20px; height: 20px; text-align: center; line-height: 18px;
  background: rgba(200,0,0,0.8); color: #fff; font-weight: bold; border-radius: 50%;
  cursor: pointer; position: absolute; top: 2px; right: 2px; z-index: 2; opacity: 0; transition: opacity 0.2s ease;
}
.floating-gif-wrapper:hover div { opacity: 1; }
/* CAPTCHA FAKE */
/* ----- Fake CAPTCHA styles ----- */
.captcha-popup {
  position: absolute;
  width: 420px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(180deg,#ffffff 0%, #f4f6f8 100%);
  border-radius: 12px;
  border: 1px solid #777;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  overflow: hidden;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  font-family: "Roboto Condensed", sans-serif;
}

/* header */
.captcha-popup .popup-header {
  cursor: move;
  padding: 10px 12px;
  background: linear-gradient(to bottom,#e6e9ee,#d7dbe0);
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid #c6c9cc;
}

.captcha-popup .title {
  font-weight:700;
  font-size: 15px;
}

/* content */
.captcha-popup .popup-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  min-height: 120px;
}

/* checkbox row */
.captcha-row {
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
}

/* large visual token (glitchy text) */
.captcha-token {
  font-family: monospace;
  font-size: 28px;
  letter-spacing: 2px;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg,#111 0%, #222 100%);
  color: #0ff;
  box-shadow: inset 0 -6px 20px rgba(0,0,0,0.5);
  text-transform: uppercase;
  user-select: none;
  display:inline-block;
  transform-origin: center;
  /* subtle flicker */
  animation: tokenFlicker 1.6s infinite;
}

/* input */
.captcha-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border:1px solid #bdbdbd;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
}

/* actions */
.captcha-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end;
  width:100%;
}

.captcha-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.captcha-btn.cancel {
  background: #eee;
  color: #333;
  border:1px solid #ccc;
}

.captcha-btn.submit {
  background: linear-gradient(90deg,#2d9cdb,#1f6fb5);
  color: #fff;
  border: none;
}

/* success state */
.captcha-success {
  color: #0a0;
  font-weight: 700;
  font-size: 14px;
}

/* shake animation (for wrong input) */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* token flicker */
@keyframes tokenFlicker {
  0% { text-shadow: 0 0 0 #0ff; transform: translateY(0) rotate(0deg) scale(1); }
  25% { text-shadow: 0 0 8px #0ff, 0 0 20px rgba(0,255,255,0.12); transform: translateY(-1px) rotate(-0.5deg) scale(1.02); }
  50% { text-shadow: -2px 0 6px rgba(255,0,255,0.12); transform: translateY(1px) rotate(0.3deg) scale(0.99); }
  75% { text-shadow: 2px 0 6px rgba(0,255,255,0.08); transform: translateY(-1px) rotate(-0.3deg) scale(1.01); }
  100% { text-shadow: none; transform: translateY(0) rotate(0deg) scale(1); }
}

/* small helper */
.captcha-hint {
  font-size: 13px;
  color: #555;
}

/* Animations */
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }


@font-face {
  font-family: "parchemin";
  src: url("fonts/PARCHM.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "webding";
  src: url("fonts/webdings.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "wingding";
  src: url("fonts/wingding.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "wingding2";
  src: url("fonts/WINGDING2.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "wingding3";
  src: url("fonts/WINGDING3.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "woodcutter";
  src: url("fonts/woodcutter.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "teenage";
  src: url("fonts/teenagegirl1.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "woodcutter3";
  src: url("fonts/woodcutter3.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}
/* Glitch */
/* On cible uniquement le menu Exit */
#menu3 :has(#exit1) {
  animation: glitchMenu 1s infinite;
}

@keyframes glitchMenu {
  0% {
    transform: translate(0, 0);
    color: #b5b5b5;
    text-shadow: none;
  }
  10% {
    transform: translate(-1px, 1px);
    color: #7d3e7d;
    text-shadow: 2px 0 #995f24;
  }
  20% {
    transform: translate(2px, -1px);
    color: #beb737;
    text-shadow: -2px 0 #d0d0d0;
  }
  30% {
    transform: translate(-1px, 2px);
    color: #d5d519;
    text-shadow: 1px 0 #8cb5b9;
  }
  40% {
    transform: translate(1px, -2px);
    color: #c24343;
    text-shadow: -1px 0 #62ab62;
  }
  50% {
    transform: translate(0, 1px);
    color: #3f9898;
    text-shadow: 1px 1px #9e319e;
  }
  60% {
    transform: translate(-2px, 0);
    color: #606027;
    text-shadow: -1px -1px #c19b2f;
  }
  70% {
    transform: translate(1px, 2px);
    color: #8fc38a;
    text-shadow: 2px 0 #3e7575;
  }
  80% {
    transform: translate(-1px, -1px);
    color: #334848;
    text-shadow: -2px 1px #aa6daa;
  }
  90% {
    transform: translate(2px, 0);
    color: white;
    text-shadow: 1px 0 #2e6e6e;
  }
  100% {
    transform: translate(0, 0);
    color: #000000;
    text-shadow: none;
  }
}
/* --- Floating ghost motion for all popups --- */
/* --- Floating ghost motion for all popups --- */
@keyframes floatyMotion {
  25%  { transform: translate(20px, -30px) rotate(0.3deg); }
  50%  { transform: translate(-30px, 20px) rotate(-0.4deg); }
  75%  { transform: translate(20px, 30px) rotate(0.2deg); }
}

.popup {
  animation: floatyMotion 9s ease-in-out infinite;
  will-change: transform;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3))
          blur(0.2px);
}


/* __________________________________________________*/
/* ============================= */
/* ============================= */
/* 📱 MOBILE — CORRECTION PROPRE */
/* ============================= */
@media (max-width: 768px) {

  body {
    background-attachment: scroll;
    overflow: hidden;
  }

  /* --- MENUS PRINCIPAUX --- */
  .menu-item {
    font-size: 85px;
    padding: 8px 14px;
    border-radius: 10px;
    transform: translateX(80px); /* garde ton offset original */
  }

  .menu-item:hover {
    transform: translateX(80px);
  }

  /* --- SOUS-MENUS --- */
  .submenu {
    position: absolute;         /* IMPORTANT */
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    padding: 6px;
  }

  /* --- POPUPS --- */
  .popup,
  .captcha-popup,
  .music-popup {
    position: fixed;
    width: 90vw !important;
    max-width: 420px;
    max-height: 80vh;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* --- GIFS FLOTTANTS --- */
  .floating-gif-wrapper {
    transform: scale(0.8);
  }

  /* --- FLOTTEMENT PLUS DOUX --- */
  .popup {
    animation-duration: 20s;
  }
}

/*sub designs*/
#sub2 {
  font-family: "woodcutter3" !important;
font-size: 40px;}
#sub21 {
  font-family: "woodcutter", sans-serif !important;
font-size: 40px;}
#sub22 {
  font-family: "woodcutter3" !important;
font-size: 40px;}
#sub23 {
  font-family: "woodcutter", sans-serif !important;
font-size: 40px;}
#sub24 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub25 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;
}
#sub26 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#sub27 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;
}
#sub28 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub3 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sublipsyncC {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#sub32 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub33 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#sub34 {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
#sub35 {
  font-family: "woodcutter", sans-serif !important;
  font-size: 40px;}
#subchampi {
  font-family: "woodcutter3", sans-serif !important;
  font-size: 40px;}
