/* ============================== */
/* SALLE D'ATTENTE                */
/* ============================== */
#salle-attente {
  background:
    repeating-conic-gradient(#f0e6dc 0% 25%, #e8ddd3 0% 50%) 0 0 / 60px 60px;
  flex-direction: row;
  flex-wrap: wrap;
}

.sa-mur-haut {
  width: 100%;
  height: 48px;
  background: linear-gradient(180deg, #8b7355, #6b5740);
  position: relative;
}
.sa-mur-haut::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 6px;
  background: #a08060;
}

.sa-content {
  width: 100%;
  height: calc(100% - 96px);
  display: flex;
  position: relative;
}

.sa-mur-bas {
  width: 100%;
  height: 48px;
  background: linear-gradient(180deg, #6b5740, #8b7355);
  position: relative;
}
.sa-mur-bas::before {
  content: '';
  position: absolute;
  top: 0;
  width: 100%;
  height: 6px;
  background: #a08060;
}

/* Zone gauche - Cabines */
.sa-gauche {
  width: 45%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panneau-cabines {
  background: #2c3e50;
  border-radius: 5px;
  padding: 6px 15px;
  text-align: center;
  align-self: flex-start;
}
.panneau-cabines h3 {
  color: #f1c40f;
  font-size: 14px;
  letter-spacing: 3px;
}
.panneau-cabines span {
  color: #ecf0f1;
  font-size: 8px;
  letter-spacing: 2px;
}

.cabines-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cabine {
  width: clamp(80px, 10vw, 110px);
  background: linear-gradient(180deg, #5c4a3a, #3e3028);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}
.cabine:hover {
  transform: scale(1.05);
}

.cabine-interieur {
  height: 90px;
  margin: 4px;
  border-radius: 3px;
  position: relative;
}
.cabine-miroir {
  width: 55%;
  height: 40px;
  background: #d4e6f1;
  border: 2px solid #8b7355;
  border-radius: 3px;
  margin: 6px auto 0;
  position: relative;
  overflow: hidden;
}
.cabine-miroir::after {
  content: '';
  position: absolute;
  top: 5px; left: 8px;
  width: 50%;
  height: 70%;
  background: rgba(234,242,248,0.4);
  border-radius: 50%;
}

.cabine-rideau {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 3px;
  opacity: 0.85;
}
.rideau-rouge { background: repeating-linear-gradient(90deg, #c0392b, #e74c3c 30%, #c0392b 50%, #e74c3c 70%, #c0392b); }
.rideau-bleu { background: repeating-linear-gradient(90deg, #2471a3, #2e86c1 30%, #2471a3 50%, #2e86c1 70%, #2471a3); }
.rideau-vert { background: repeating-linear-gradient(90deg, #1e8449, #27ae60 30%, #1e8449 50%, #27ae60 70%, #1e8449); }
.rideau-violet { background: repeating-linear-gradient(90deg, #7d3c98, #9b59b6 30%, #7d3c98 50%, #9b59b6 70%, #7d3c98); }

.cabine-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px;
}
.cabine-statut {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.statut-libre { background: #2ecc71; border: 1px solid #27ae60; }
.statut-occupe { background: #e74c3c; border: 1px solid #c0392b; }
.cabine-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Zone droite - UI */
.sa-droite {
  width: 55%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px;
}

/* Layout droite */
.sa-droite-content {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sa-droite-col {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sa-droite-chat-col {
  flex: 1;
  min-width: 200px;
  display: flex;
}

/* Enseigne VIRUS */
.sa-enseigne {
  background: #1a1a2e;
  border: 2px solid #e74c3c;
  border-radius: 10px;
  padding: 8px 25px;
  text-align: center;
  align-self: center;
  box-shadow: 0 0 15px rgba(231,76,60,0.3);
}
.sa-enseigne h2 {
  font-family: 'Impact', 'Arial Black', sans-serif;
  color: #e74c3c;
  font-size: 28px;
  letter-spacing: 8px;
  text-shadow: 0 0 10px rgba(231,76,60,0.5);
}
.sa-enseigne span {
  color: #f39c12;
  font-size: 9px;
  letter-spacing: 4px;
}

/* Panneau joueurs */
.sa-panneau-joueurs {
  background: #1a1a2e;
  border: 2px solid #f39c12;
  border-radius: 8px;
  overflow: hidden;
  max-width: 280px;
}
.sa-panneau-joueurs-header {
  background: #2c3e50;
  padding: 6px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sa-panneau-joueurs-header h4 {
  color: #f39c12;
  font-size: 13px;
  letter-spacing: 2px;
}
.sa-panneau-joueurs-header .compteur {
  color: #e74c3c;
  font-size: 12px;
}
.sa-joueurs-liste {
  padding: 8px 12px;
}
.sa-joueur-item {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  padding: 2px 0;
}
.sa-joueur-item.connecte { color: #2ecc71; }
.sa-joueur-item.attente { color: #7f8c8d; }

/* Chat */
.sa-chat {
  background: #1a1a2e;
  border: 1.5px solid #566573;
  border-radius: 8px;
  overflow: hidden;
  max-width: 360px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sa-chat-header {
  background: #2c3e50;
  padding: 5px 15px;
  text-align: center;
}
.sa-chat-header h4 {
  color: #ecf0f1;
  font-size: 11px;
  letter-spacing: 2px;
}
.sa-chat-messages {
  flex: 1;
  padding: 8px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-msg, .chat-message {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #ffffff;
}
.chat-msg .pseudo { font-weight: bold; }
.chat-msg .texte, .chat-message { white-space: pre-wrap; }
.chat-msg-ghost { opacity: 0.6; font-style: italic; }
.chat-msg-ghost .texte { color: #95a5a6; }
.ghost-tag { background: rgba(149,165,166,0.3); color: #bdc3c7; font-size: 9px; padding: 1px 5px; border-radius: 3px; margin-right: 4px; text-transform: uppercase; letter-spacing: 1px; }
/* Bouton toggle chat (mobile only) */
.chat-toggle-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3498db, #2980b9);
  border: 2px solid #5dade2;
  color: white;
  font-size: 24px;
  z-index: 200;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(52,152,219,0.5);
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}
.chat-badge {
  display: none;
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #e74c3c;
  border-radius: 50%;
  border: 2px solid #2980b9;
  box-shadow: 0 0 6px rgba(231,76,60,0.6);
}
.chat-toggle-btn:active {
  transform: scale(0.9);
}
.chat-toggle-btn.active {
  background: linear-gradient(180deg, #e74c3c, #c0392b);
  border-color: #ff6b6b;
  box-shadow: 0 4px 15px rgba(231,76,60,0.5);
}
.sa-chat-input {
  display: flex;
  padding: 6px;
  gap: 4px;
}
.sa-chat-input input {
  flex: 1;
  background: #2c3e50;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  color: #ecf0f1;
  font-size: 12px;
  outline: none;
}
.sa-chat-input input::placeholder { color: #7f8c8d; }
.sa-chat-input button {
  width: 28px;
  height: 28px;
  background: #3498db;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 12px;
}

/* Notifications salle d'attente (bas gauche) */
.sa-notifs {
  position: absolute;
  bottom: 15px;
  left: 15px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.sa-notif {
  background: rgba(0,0,0,0.7);
  color: #ecf0f1;
  padding: 6px 14px;
  border-radius: 8px;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  animation: saNotifIn 0.3s ease;
  white-space: nowrap;
}
.sa-notif.join { border-left: 3px solid #2ecc71; }
.sa-notif.leave { border-left: 3px solid #e74c3c; }
.sa-notif.fade-out { opacity: 0; transition: opacity 0.4s; }
@keyframes saNotifIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Zone centrale - fontaine + bancs */
.sa-centre {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.fontaine {
  width: 120px;
  height: 90px;
  background: radial-gradient(ellipse, #85c1e9, #5dade2, #3498db);
  border-radius: 50%;
  border: 3px solid #7f8c8d;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  position: relative;
}
.fontaine::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 30%;
  width: 40%;
  height: 30%;
  background: rgba(174,214,241,0.4);
  border-radius: 50%;
}

/* Bouton demarrer */
.btn-demarrer {
  width: clamp(140px, 15vw, 180px);
  height: 55px;
  background: linear-gradient(180deg, #e74c3c, #c0392b);
  color: white;
  font-size: 18px;
  border-radius: 12px;
  border: 3px solid #c0392b;
  box-shadow: 0 4px 15px rgba(231,76,60,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.btn-demarrer .btn-sub {
  font-family: Arial, sans-serif;
  font-size: 8px;
  color: #fad7d3;
  font-weight: normal;
  letter-spacing: 0;
}

/* Zone spawn */
.sa-spawn {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 100px;
  border: 1.5px dashed rgba(243,156,18,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sa-spawn span {
  color: rgba(243,156,18,0.4);
  font-size: 10px;
  letter-spacing: 2px;
}

/* Entree */
.sa-entree {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 180px;
  background: #d5c4a1;
  border-left: 3px solid #566573;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.sa-entree span {
  color: #27ae60;
  font-size: 8px;
  font-weight: bold;
  writing-mode: vertical-lr;
  letter-spacing: 2px;
}
.sa-entree .fleche {
  color: #27ae60;
  font-size: 16px;
  opacity: 0.5;
}

/* Plantes */
.plante {
  position: absolute;
  width: 50px;
  height: 70px;
}
.plante-pot {
  width: 40px;
  height: 30px;
  background: #a0522d;
  border-radius: 0 0 5px 5px;
  margin: 0 auto;
  position: relative;
}
.plante-pot::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -4px;
  width: 48px;
  height: 10px;
  background: #8b4513;
  border-radius: 3px;
}
.plante-feuilles {
  width: 45px;
  height: 40px;
  background: radial-gradient(ellipse, #2ecc71, #27ae60);
  border-radius: 50%;
  margin: 0 auto -8px;
}

.plante-1 { top: 10px; right: 60px; }
.plante-2 { bottom: 10px; left: 15px; }

/* Distributeur */
.distributeur {
  position: absolute;
  top: 10px;
  right: 140px;
  width: 65px;
  height: 105px;
  background: #34495e;
  border-radius: 5px;
  border: 2px solid #2c3e50;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
}
.distributeur-vitre {
  margin: 6px 6px 0;
  height: 55px;
  background: #2c3e50;
  border-radius: 3px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 4px;
}
.canette {
  border-radius: 2px;
  height: 18px;
}
.distributeur-fente {
  width: 30px;
  height: 6px;
  background: #1a252f;
  border-radius: 2px;
  margin: 8px auto 4px;
}
.distributeur span {
  display: block;
  text-align: center;
  color: #ecf0f1;
  font-size: 7px;
}

/* ============================== */
/* LISTE DES PARTIES              */
/* ============================== */
#liste-parties {
  justify-content: center;
  gap: 0;
}

.lp-conteneur {
  width: clamp(380px, 70vw, 750px);
  background: rgba(26,26,46,0.92);
  border-radius: 16px;
  border: 2px solid #2c3e50;
  overflow: hidden;
  margin-top: 15px;
}

.lp-header {
  background: #2c3e50;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lp-header h3 {
  color: #f39c12;
  font-size: 15px;
  letter-spacing: 3px;
}
.lp-header .lp-count {
  color: #95a5a6;
  font-size: 12px;
}

.lp-tableau {
  width: 100%;
  border-collapse: collapse;
}
.lp-tableau thead th {
  background: #1a252f;
  color: #bdc3c7;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 10px 15px;
  text-align: left;
  font-weight: normal;
  border-bottom: 1px solid #34495e;
}
.lp-tableau thead th:last-child {
  text-align: center;
}

.lp-tableau tbody tr {
  border-bottom: 1px solid rgba(52,73,94,0.4);
  transition: background 0.15s;
  cursor: pointer;
}
.lp-tableau tbody tr:hover {
  background: rgba(46,134,193,0.1);
}

.lp-tableau tbody td {
  padding: 12px 15px;
  font-size: 13px;
  color: #ecf0f1;
}

.lp-nom-partie {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-icone-partie {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2c3e50;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.lp-nom-texte {
  display: flex;
  flex-direction: column;
}
.lp-nom-texte .nom {
  font-weight: bold;
  font-size: 13px;
}
.lp-nom-texte .host {
  font-size: 10px;
  color: #7f8c8d;
}
.lp-langue-badge {
  font-size: 12px;
  vertical-align: middle;
  margin-left: 4px;
}

.lp-joueurs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-barre-joueurs {
  width: 60px;
  height: 6px;
  background: #1a252f;
  border-radius: 3px;
  overflow: hidden;
}
.lp-barre-remplissage {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.lp-joueurs-texte {
  font-size: 12px;
  color: #bdc3c7;
  min-width: 35px;
}

.lp-mechants {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lp-virus-icone {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(231,76,60,0.2);
  border: 1px solid #e74c3c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #e74c3c;
}
.lp-mechants-texte {
  font-size: 12px;
  color: #e74c3c;
  font-weight: bold;
}

.btn-rejoindre {
  padding: 6px 16px;
  background: linear-gradient(180deg, #27ae60, #1e8449);
  color: white;
  border: 1.5px solid #2ecc71;
  border-radius: 6px;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-rejoindre:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.lp-vide {
  text-align: center;
  padding: 40px 20px;
  color: #7f8c8d;
  font-size: 13px;
}
.lp-vide .lp-vide-icone {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.4;
}

.btn-actualiser {
  padding: 8px 20px;
  background: transparent;
  color: #3498db;
  border: 1.5px solid #3498db;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-actualiser:hover {
  background: rgba(52,152,219,0.1);
}

.btn-admin-delete {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(231,76,60,0.2);
  border: 1.5px solid #e74c3c;
  color: #e74c3c;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.btn-admin-delete:hover {
  background: #e74c3c;
  color: white;
}

.btn-admin-purge {
  padding: 8px 20px;
  background: transparent;
  color: #e74c3c;
  border: 1.5px solid #e74c3c;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-admin-purge:hover {
  background: rgba(231,76,60,0.1);
}

/* ============================== */
/* FORMULAIRE CREATION PARTIE     */
/* ============================== */
#creer-partie {
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  padding: 0;
}
.cp-scroll {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0 40px 0;
}

.cp-formulaire {
  width: clamp(340px, 50vw, 500px);
  background: rgba(26,26,46,0.92);
  border-radius: 16px;
  border: 2px solid #e74c3c;
  overflow: hidden;
  margin-top: 20px;
}
.cp-header {
  background: #2c3e50;
  padding: 12px 20px;
  text-align: center;
}
.cp-header h3 {
  color: #f39c12;
  font-size: 15px;
  letter-spacing: 3px;
}
.cp-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cp-champ {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cp-champ label {
  color: #bdc3c7;
  font-size: 12px;
  letter-spacing: 2px;
}
.cp-champ input, .cp-champ select {
  background: #1a252f;
  border: 1.5px solid #34495e;
  border-radius: 8px;
  padding: 10px 14px;
  color: #ecf0f1;
  font-size: 14px;
  font-family: Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.cp-champ input:focus, .cp-champ select:focus {
  border-color: #e74c3c;
}
.cp-champ input::placeholder { color: #566573; }
.cp-champ select option { background: #1a252f; }

.cp-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cp-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #34495e;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}
.cp-toggle.active { background: #27ae60; }
.cp-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ecf0f1;
  border-radius: 50%;
  transition: transform 0.3s;
}
.cp-toggle.active::after { transform: translateX(20px); }
.cp-toggle-label { color: #95a5a6; font-size: 13px; font-family: Arial, sans-serif; }
.cp-toggle-label.active { color: #2ecc71; }
.cp-toggle.cp-fanatic.active { background: #8e44ad; }
.cp-toggle-label.cp-fanatic-label.active { color: #8e44ad; }
.cp-toggle.cp-spy.active { background: #9b59b6; }
.cp-toggle-label.cp-spy-label.active { color: #9b59b6; }
.cp-roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cp-role-item {
  background: #1a252f;
  border: 1px solid #34495e;
  border-radius: 8px;
  padding: 10px 12px;
}
.cp-role-item label {
  margin-bottom: 6px;
  display: block;
}
.btn-valider-creer {
  width: 100%;
  height: 50px;
  background: linear-gradient(180deg, #e74c3c, #c0392b);
  color: white;
  border: 2px solid #ff6b6b;
  border-radius: 10px;
  font-family: 'Impact', 'Arial Black', sans-serif;
  font-size: 18px;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-valider-creer:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

