/* =========================================================
   PIXEL HOTEL — Pages (accueil, login, register, profil, admin)
   ========================================================= */
:root {
  --ink: #1a1a2e;
  --cream: #f4e4c1;
  --cream-light: #fff8e7;
  --gold: #ffb700;
  --gold-dark: #c48a00;
  --coral: #e74c3c;
  --sky: #3498db;
  --sky-dark: #2980b9;
  --shadow: 4px 4px 0 rgba(0,0,0,0.4);
  --shadow-sm: 2px 2px 0 rgba(0,0,0,0.3);
  --font-pixel: 'Press Start 2P', monospace;
  --font-ui: 'Nunito', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.page {
  font-family: var(--font-ui);
  background: linear-gradient(180deg, #164d48 0%, #123f3e 100%);
  min-height: 100vh;
  color: var(--ink);
}

/* ---- Navbar ---- */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
  border-bottom: 3px solid #000;
  box-shadow: 0 3px 0 rgba(0,0,0,0.25);
}

.page-nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.page-nav .logo img {
  height: 40px;
  image-rendering: pixelated;
}

.page-nav .logo span {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #4da6ff;
  text-shadow: 2px 2px 0 #000;
}

.page-nav .nav-links { display: flex; gap: 10px; }

.page-nav .nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  padding: 7px 14px;
  border: 2px solid #000;
  border-radius: 5px;
  background: linear-gradient(180deg, #3d5a80, #2c3e50);
  box-shadow: var(--shadow-sm);
  transition: transform .05s;
}

.page-nav .nav-links a:hover {
  background: linear-gradient(180deg, var(--gold), #e0a000);
  color: var(--ink);
}

.page-nav .nav-links a:active { transform: translate(1px,1px); }

/* ---- Conteneur ---- */
.page-wrap {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 16px;
}

/* ---- HERO accueil ---- */
.hero {
  text-align: center;
  padding: 40px 20px;
  background: var(--cream);
  border: 4px solid #000;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hero img.hero-logo {
  max-width: 320px;
  width: 100%;
  image-rendering: pixelated;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--gold-dark);
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

.hero p {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 24px;
  opacity: 0.85;
}

.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Boutons ---- */
.big-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 15px;
  padding: 12px 26px;
  border: 3px solid #000;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold), #e0a000);
  transition: transform .05s;
}

.big-btn:hover { filter: brightness(1.08); }
.big-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 rgba(0,0,0,.3); }

.big-btn.blue { background: linear-gradient(180deg, var(--sky), var(--sky-dark)); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.3); }
.big-btn.coral { background: linear-gradient(180deg, var(--coral), #c0392b); color: #fff; text-shadow: 1px 1px 0 rgba(0,0,0,.3); }
.big-btn.green { background: linear-gradient(180deg, #27ae60, #1e8449); color: #fff; }
.big-btn.grey { background: linear-gradient(180deg, #95a5a6, #7f8c8d); color: #fff; }

/* ---- Carte formulaire ---- */
.form-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--cream);
  border: 4px solid #000;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-card.wide { max-width: 700px; }

.form-card .head {
  background: linear-gradient(180deg, #3d5a80, #2c3e50);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 11px;
  padding: 12px 16px;
  border-bottom: 3px solid #000;
  text-shadow: 1px 1px 0 #000;
  text-align: center;
}

.form-card .body { padding: 22px; }

.form-card label {
  display: block;
  font-weight: 900;
  font-size: 13px;
  margin: 12px 0 4px;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="file"],
.form-card select {
  width: 100%;
  border: 3px solid #000;
  border-radius: 5px;
  padding: 9px 12px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  background: #fff;
  outline: none;
}

.form-card input:focus, .form-card select:focus {
  box-shadow: 0 0 0 2px var(--sky);
}

.form-card .submit {
  width: 100%;
  margin-top: 18px;
  font-size: 15px;
}

.form-card .alt-link {
  text-align: center;
  margin-top: 14px;
  font-weight: 700;
  font-size: 13px;
}

.form-card .alt-link a { color: var(--sky-dark); }

/* ---- Choix sexe ---- */
.gender-row { display: flex; gap: 10px; }

.gender-row label.gender {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 3px solid #000;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.gender-row label.gender input { display: none; }
.gender-row label.gender .g-ic { font-size: 34px; }

.gender-row label.gender.checked {
  background: linear-gradient(180deg, #ffe9a0, #ffd56a);
  outline: 3px solid var(--coral);
  outline-offset: 1px;
}

/* ---- Input file stylé ---- */
.file-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 3px solid #000;
  background: linear-gradient(180deg, var(--sky), var(--sky-dark));
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
  white-space: nowrap;
}

.file-btn:hover { filter: brightness(1.1); }

.file-name {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* ---- Alertes ---- */
.alert {
  border: 3px solid #000;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 14px;
}

.alert.error { background: #fde8e8; color: #c0392b; border-color: #c0392b; }
.alert.success { background: #e8f8ee; color: #1e8449; border-color: #27ae60; }

/* ---- LOADING ---- */
body.loading-page {
  font-family: var(--font-ui);
  background: radial-gradient(circle at 50% 40%, #1a5c56 0%, #123f3e 70%);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
}

.loading-logo {
  max-width: 340px;
  width: 80%;
  image-rendering: pixelated;
  animation: float 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,0.4));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.loading-bar-wrap {
  width: 320px;
  max-width: 80vw;
  height: 30px;
  border: 4px solid #000;
  border-radius: 8px;
  background: #1a252f;
  margin-top: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

#loading-bar {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    45deg,
    var(--gold) 0 14px,
    #ffd44a 14px 28px
  );
  transition: width 0.15s linear;
}

.loading-text {
  margin-top: 14px;
  color: var(--cream);
  font-family: var(--font-pixel);
  font-size: 10px;
  text-shadow: 2px 2px 0 #000;
}

/* ---- Table admin ---- */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 3px solid #000;
  font-size: 13px;
}

.admin-table th, .admin-table td {
  border: 2px solid #000;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
}

.admin-table th {
  background: linear-gradient(180deg, #3d5a80, #2c3e50);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
}

.admin-table tr:nth-child(even) td { background: #f5f0e6; }

.admin-table .mini-btn {
  border: 2px solid #000;
  border-radius: 4px;
  padding: 3px 8px;
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--gold), #e0a000);
  margin-right: 4px;
}

.admin-table .mini-btn.danger { background: linear-gradient(180deg, var(--coral), #c0392b); color: #fff; }

/* ---- Profil ---- */
.profile-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
}

@media (max-width: 640px) {
  .profile-grid { grid-template-columns: 1fr; }
}

.profile-card {
  background: #fff;
  border: 3px solid #000;
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.profile-card .skin-preview {
  width: 128px;
  height: 128px;
  border: 3px solid #000;
  border-radius: 6px;
  background: repeating-conic-gradient(#ddd 0% 25%, #fff 0% 50%) 50% / 20px 20px;
  image-rendering: pixelated;
  object-fit: cover;
}

.profile-card .avatar-steve {
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  border: 3px solid #000;
  border-radius: 6px;
  background: linear-gradient(180deg, #6db3f2, #3a72cc);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid #000;
}

.badge.admin { background: var(--coral); color: #fff; }
.badge.user { background: var(--sky); color: #fff; }
.badge.m { background: #3498db; color: #fff; }
.badge.f { background: #ff5d8f; color: #fff; }

/* ---- Stats / info rows ---- */
.info-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px dashed rgba(0,0,0,0.15);
  padding: 8px 4px;
  font-weight: 700;
  font-size: 14px;
}

.info-row b { color: var(--gold-dark); }

/* Icône pièces réutilisable (même image que la barre du haut en jeu, voir
   css/habbo.css) — remplace l'emoji 💰 sur les pages hors-jeu (profil,
   admin...) pour garder un seul et même visuel de crédits partout sur le
   site, pas juste dans le jeu. `em` : suit la taille du texte autour. */
.coin-ic {
  width: 1em;
  height: 1em;
  object-fit: contain;
  vertical-align: -0.15em;
}
