/* RESET SIMPLE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(circle at top, #222 0%, #111 40%, #000 100%);
  color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* LAYOUT GENERAL */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;   /* 👈 clé du problème */
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-left {
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-badge {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.header-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  background: rgba(12, 12, 12, 0.95);
  border-radius: 1.2rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* TITRES / TEXTES */

.card-title {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.card-subtitle {
  font-size: 0.9rem;
  color: #b3b3b3;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.text-muted {
  font-size: 0.85rem;
  color: #9a9a9a;
}

/* BOUTONS */

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #ff4b8b, #f89c1b);
  color: #fff;
  box-shadow: 0 8px 24px rgba(248, 156, 27, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(248, 156, 27, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f5;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

/* FORMULAIRES */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

label {
  font-size: 0.85rem;
  color: #d0d0d0;
}

input,
select,
textarea {
  padding: 0.6rem 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.6);
  color: #f5f5f5;
  font-size: 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f89c1b;
  box-shadow: 0 0 0 1px rgba(248, 156, 27, 0.7);
}

/* TAGS / BADGES / LISTES */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
}

/* SALLE D'ATTENTE / ELEMENTS LIVE */

.waiting-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2ecc71;
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(46, 204, 113, 0.6);
  opacity: 0;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* TIMER */

.timer {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}

.timer-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b3b3b3;
}

.timer-value {
  font-size: 1.6rem;
  font-weight: 700;
}

/* LISTE DE JEUX / JOUEURS */

.list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.list-item {
  padding: 0.6rem 0.75rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-item-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.list-item-meta {
  font-size: 0.78rem;
  color: #a0a0a0;
}

/* ADMIN LAYOUT */

.admin-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

/* FOOTER */

.footer {
  text-align: center;
  padding: 0.7rem;
  font-size: 0.75rem;
  color: #888;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s;
}

.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.btn-danger {
  background: #c0392b;
  color: #fff;
}

.btn-danger:hover {
  background: #e74c3c;
}

.btn-danger:active {
  transform: scale(0.97);
}

/* === Creator - Mes jeux === */

.center-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-title {
  margin-bottom: 20px;
}

.actions-top {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.card {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.table {
  width: 100%;
  text-align: center;
}

.table th,
.table td {
  padding: 12px;
  vertical-align: middle;
}

.actions-cell {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Boutons */
.btn {
  text-decoration: none;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
}

.btn-secondary {
  background: #4b5563;
  color: #fff;
}

.btn-info {
  background: #0ea5e9;
  color: #fff;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-disabled {
  background: #6b7280;
  color: #ddd;
  cursor: not-allowed;
}

/* Pour le form inline du bouton supprimer */
.inline-form {
  display: inline;
}

/* === Creator - Home === */
.creator-home {
  max-width: 700px;
  text-align: center;
  padding: 24px;
}

.muted {
  opacity: 0.85;
  margin-bottom: 16px;
}

/* === Barre haute créateur === */
.topbar {
  width: 100%;
  padding: 12px 20px;
  display: flex;
  justify-content: flex-start;
}

.btn-outline {
  background: transparent;
  border: 1px solid #4a90e2;
  color: #4a90e2;
}

.btn-outline:hover {
  background: #4a90e2;
  color: #fff;
}
