/* Scroll uniquement sur page d'accueil */
body.home #field {
  position: relative !important;
  height: 70vh !important;
}
body.home {
  overflow-y: auto !important;
}
.wp-block-html {
  position: relative !important;
  z-index: 99999 !important;
}

/* --- GLOBAL --- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2230 0%, #05060a 55%, #000000 100%);
  color: #f4f4f4;
  overflow-y: auto; /* Scroll par défaut */
}

/* BLOQUER le scroll UNIQUEMENT sur les murs */
body:has(.salle-peurs),
body:has(.salle-amour),
body:has(.salle-rage),
body:has(.salle-victoires),
body:has(.salle-nocturnes),
body:has(.salle-famille),
body:has(.salle-argent),
body:has(.salle-drole),
body:has(.salle-dilemmes),
body:has(.salle-ruptures),
body:has(.salle-generale) {
  overflow: hidden !important;
}

/* --- HEADER --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
}

header h1 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fdfdfd;
}

header span {
  font-size: 0.7rem;
  color: #aaa;
}

/* --- PANEL --- */
#panel {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 90vw);
  background: rgba(0, 0, 0, 0.72);
  border-radius: 12px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.7);
  z-index: 9999;
}

#panel label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #888;
  margin-bottom: 4px;
}

#panel textarea {
  width: 100%;
  min-height: 48px;
  max-height: 90px;
  background: #05070b;
  border: 1px solid #30333b;
  border-radius: 8px;
  padding: 8px 10px;
  resize: vertical;
  color: #f4f4f4;
  font-size: 0.85rem;
  line-height: 1.4;
}

#panel textarea::placeholder {
  color: #555;
}

#panel .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

#hint {
  font-size: 0.7rem;
  color: #fff;
}

#addBtn {
  border: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d94, #ffcf53);
  color: #111;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

#addBtn:hover {
  filter: brightness(1.1);
}

/* --- FIELD (ZONE DE FLOTTEMENT) --- */
#field {
  position: fixed;
  top: 42px; /* espace header */
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 1;
}

/* --- SECRETS --- */
.secret {
  position: absolute;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  background: rgba(12, 15, 26, 0.92);
  color: #f8f8f8;
  box-shadow: 0 8px 18px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.04);
  opacity: 0;
  transform: translateY(20px);
  animation: floatUp 14s linear forwards;
}

.secret::before {
  content: "• secret anonyme";
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9f9f9f;
  margin-bottom: 4px;
}

.secret.low { border-color: rgba(99, 179, 237, 0.3); }
.secret.medium { border-color: rgba(255, 207, 83, 0.4); }
.secret.high { border-color: rgba(255, 77, 148, 0.5); }

@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(20px); }
  8%   { opacity: 1; transform: translateY(0); }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-40px); }
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 600px) {

  header {
    padding: 8px 12px;
  }

  header h1 {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
  }

  header span {
    display: none;
  }

  #field {
    top: 40px;
  }

  #panel {
    width: 94vw;
    padding: 10px 12px;
    bottom: 10px;
  }

  #panel textarea {
    min-height: 42px;
    max-height: 80px;
    font-size: 0.8rem;
  }

  #addBtn {
    padding: 6px 12px;
    font-size: 0.7rem;
  }

  .secret {
    max-width: 70vw;
    font-size: 0.78rem;
    padding: 8px 10px;
  }

  .secret::before {
    font-size: 0.6rem;
  }
}

.secret {
  position: absolute;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.4;
  background: rgba(12, 15, 26, 0.92);
  color: #f8f8f8;
  box-shadow: 0 8px 18px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.04);
  opacity: 0;
  transform: translateY(20px);
  animation: floatUp 14s linear forwards;
  
  /* Ajoutez ces lignes */
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ========================================
   🌑 1. MUR DES PEURS (Noir/Gris)
======================================== */
.salle-peurs #field {
  background: linear-gradient(135deg, #0f172a, #334155) !important;
}
.salle-peurs .secret {
  background: rgba(51, 65, 85, 0.15) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  
}
.salle-peurs #panel {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
}


/* ========================================
   🔥 2. CONFESSIONS AMOUREUSES (Rose)
======================================== */
.salle-amour #field {
  background: linear-gradient(135deg, #881337, #e11d48) !important;
}
.salle-amour .secret {
  background: rgba(225, 29, 72, 0.15) !important;
  border: 1px solid rgba(251, 113, 133, 0.3) !important;
  
}
.salle-amour #panel {
  background: rgba(136, 19, 55, 0.95) !important;
  border: 1px solid rgba(251, 113, 133, 0.3) !important;
}


/* ========================================
   😡 3. MUR DES RAGES (Rouge foncé)
======================================== */
.salle-rage #field {
  background: linear-gradient(135deg, #7f1d1d, #dc2626) !important;
}
.salle-rage .secret {
  background: rgba(220, 38, 38, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  
}
.salle-rage #panel {
  background: rgba(127, 29, 29, 0.95) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}


/* ========================================
   🌈 4. PETITES VICTOIRES (Jaune/Or)
======================================== */
.salle-victoires #field {
  background: linear-gradient(135deg, #78350f, #f59e0b) !important;
}
.salle-victoires .secret {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  
}
.salle-victoires #panel {
  background: rgba(120, 53, 15, 0.95) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
}


/* ========================================
   🧠 5. PENSÉES NOCTURNES (Bleu nuit)
======================================== */
.salle-nocturnes #field {
  background: linear-gradient(135deg, #1e1b4b, #4338ca) !important;
}
.salle-nocturnes .secret {
  background: rgba(67, 56, 202, 0.15) !important;
  border: 1px solid rgba(129, 140, 248, 0.3) !important;
  
}
.salle-nocturnes #panel {
  background: rgba(30, 27, 75, 0.95) !important;
  border: 1px solid rgba(129, 140, 248, 0.3) !important;
}


/* ========================================
   🤫 6. SECRETS DE FAMILLE (Marron)
======================================== */
.salle-famille #field {
  background: linear-gradient(135deg, #431407, #92400e) !important;
}
.salle-famille .secret {
  background: rgba(146, 64, 14, 0.15) !important;
  border: 1px solid rgba(180, 83, 9, 0.3) !important;
  
}
.salle-famille #panel {
  background: rgba(67, 20, 7, 0.95) !important;
  border: 1px solid rgba(180, 83, 9, 0.3) !important;
}


/* ========================================
   💸 7. GALÈRES FINANCIÈRES (Vert foncé)
======================================== */
.salle-argent #field {
  background: linear-gradient(135deg, #14532d, #15803d) !important;
}
.salle-argent .secret {
  background: rgba(21, 128, 61, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
  
}
.salle-argent #panel {
  background: rgba(20, 83, 45, 0.95) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}


/* ========================================
   😂 8. SECRETS DRÔLES (Orange)
======================================== */
.salle-drole #field {
  background: linear-gradient(135deg, #7c2d12, #f97316) !important;
}
.salle-drole .secret {
  background: rgba(249, 115, 22, 0.15) !important;
  border: 1px solid rgba(251, 146, 60, 0.3) !important;
  
}
.salle-drole #panel {
  background: rgba(124, 45, 18, 0.95) !important;
  border: 1px solid rgba(251, 146, 60, 0.3) !important;
}


/* ========================================
   🧩 9. MUR DES DILEMMES (Violet)
======================================== */
.salle-dilemmes #field {
  background: linear-gradient(135deg, #581c87, #a855f7) !important;
}
.salle-dilemmes .secret {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(192, 132, 252, 0.3) !important;
  
}
.salle-dilemmes #panel {
  background: rgba(88, 28, 135, 0.95) !important;
  border: 1px solid rgba(192, 132, 252, 0.3) !important;
}


/* ========================================
   💔 10. MUR DES RUPTURES (Bleu gris)
======================================== */
.salle-ruptures #field {
  background: linear-gradient(135deg, #0c4a6e, #0ea5e9) !important;
}
.salle-ruptures .secret {
  background: rgba(14, 165, 233, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  
}
.salle-ruptures #panel {
  background: rgba(12, 74, 110, 0.95) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

