* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #eee;
  min-height: 100vh;
}

/* ===== Navigation ===== */
nav {
  background: #0f1626;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2a3a5a;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  flex-wrap: wrap;
  gap: 10px;
}
.logo {
  font-weight: bold;
  font-size: 1.1em;
  background: linear-gradient(to right, #00fffb, #fb00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  color: #aaa;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}
.nav-links a:hover { background: #1e2a4a; color: #fff; }
.nav-links a.active {
  background: linear-gradient(to right, #00fffb, #fb00ff);
  color: #000;
  font-weight: bold;
}

main { padding: 20px; }

header.page-header { text-align: center; margin-bottom: 24px; }
header.page-header h1 {
  margin: 0 0 6px 0;
  font-size: 1.6em;
  background: linear-gradient(to right, #00fffb, #fb00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
header.page-header p { margin: 0; color: #aaa; font-size: 0.9em; }

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; }
}

.panel {
  background: #16213e;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a3a5a;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.panel-header h2 {
  margin: 0;
  font-size: 0.85em;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn {
  background: #2a3a5a;
  color: #eee;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s;
}
.btn:hover { background: #3a4a7a; }
.btn.primary {
  background: linear-gradient(to right, #00fffb, #fb00ff);
  color: #000;
  font-weight: bold;
}
.btn.primary:hover { opacity: 0.9; }
.btn.danger:hover { background: #7a3a3a; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px;
  background: #0f1626;
  border-radius: 6px;
}
.toolbar button {
  background: #2a3a5a;
  color: #eee;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.toolbar button:hover { background: #3a4a7a; }

textarea {
  width: 100%;
  height: 380px;
  background: #0f1626;
  color: #eee;
  border: 1px solid #2a3a5a;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  resize: vertical;
  line-height: 1.5;
}
textarea:focus, input[type="text"]:focus, input[type="url"]:focus {
  outline: none;
  border-color: #00fffb;
  box-shadow: 0 0 0 2px rgba(0,255,251,0.2);
}

.footer-info {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: #888;
}

.preview-stage {
  background: #2c3e50;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255,255,255,0.05) 0%, transparent 50%);
  border-radius: 8px;
  padding: 30px 20px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Popup d'alerte ===== */
.alert-popup {
  background: #1e1e2e;
  border: 2px solid #3a3a5a;
  border-radius: 14px;
  padding: 24px 28px;
  max-width: 500px;
  width: 100%;
  color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.alert-content { font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.alert-button {
  display: block;
  margin: 20px auto 0;
  background: #3a3a5a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 28px;
  font-size: 13px;
  cursor: pointer;
  font-weight: bold;
}
.alert-button:hover { background: #4a4a7a; }

.templates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.template-btn {
  background: #2a3a5a;
  color: #eee;
  border: 1px solid #3a4a7a;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  cursor: pointer;
}
.template-btn:hover { background: #3a4a7a; }

/* ===== Formulaires ===== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
input[type="text"], input[type="url"], select {
  width: 100%;
  background: #0f1626;
  color: #eee;
  border: 1px solid #2a3a5a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }

/* ===== Profil HabboCity (testeur de bannière) ===== */
.profile-card {
  background: #1e1e2e;
  border: 2px solid #3a3a5a;
  border-radius: 16px;
  padding: 16px;
  max-width: 380px;
  width: 100%;
  color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.profile-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1em;
  font-weight: 600;
}
.profile-close { color: #aaa; cursor: pointer; font-size: 1.2em; }

.profile-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.banner-zone {
  position: relative;
  background: #3a3a5a;
  border-radius: 8px;
  overflow: hidden;
  width: 134px; /* 2x les dimensions exactes (67x170) */
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.banner-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  display: block;
}
.banner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 11px;
  text-align: center;
  padding: 8px;
}
.avatar-image {
  position: relative;
  z-index: 2;
  max-height: 50%;
  max-width: 85%;
  image-rendering: pixelated;
}

.badges-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}
.badge {
  width: 100%;
  aspect-ratio: 1;
  background: #2a3a5a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 10px;
}
.badges-zone {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.profile-bio {
  background: #0f1626;
  border-radius: 20px;
  padding: 10px 14px;
  margin-top: 14px;
  color: #777;
  font-size: 13px;
}

.profile-stats {
  margin-top: 12px;
  font-size: 13px;
  color: #ccc;
}

.hint-text {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e1e2e;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid #00fffb;
  transition: transform 0.3s;
  z-index: 1000;
}
.toast.show { transform: translateX(-50%) translateY(0); }

footer {
  text-align: center;
  margin-top: 24px;
  padding: 20px;
  color: #666;
  font-size: 12px;
}
