/* =====================================================
   POKÉLANDS – Auth CSS (login.html + compte.html)
   ===================================================== */

/* ====== LOGIN PAGE ====== */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}

/* --- Visual Panel (left) --- */
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 60px 48px;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(232,158,26,0.3) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 20% 80%, rgba(229,90,0,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 80% 10%, rgba(255,214,10,0.18) 0%, transparent 50%),
    linear-gradient(180deg, #0A0804 0%, #130F07 100%);
}
.auth-visual-logo {
  position: absolute;
  top: 48px; left: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.auth-visual-logo img { width: 36px; }
.auth-visual-logo span {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
}
.auth-visual-art {
  display: flex;
  gap: -20px;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 40px;
  position: relative;
}
.auth-pokemon-sprite {
  width: 110px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 20px rgba(232,158,26,0.55));
  animation: float 3s ease-in-out infinite;
}
.auth-pokemon-sprite:nth-child(2) {
  animation-delay: 0.8s;
  margin: 0 -10px;
}
.auth-pokemon-sprite:nth-child(3) { animation-delay: 1.6s; }
.auth-visual-text { text-align: center; z-index: 2; }
.auth-visual-text h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
}
.auth-visual-text p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.65; }

/* Floating Pokéballs decoration */
.auth-floating-ball {
  position: absolute;
  border-radius: 50%;
  animation: floatBall linear infinite;
  opacity: 0.15;
  pointer-events: none;
}

/* --- Form Panel (right) --- */
.auth-form-panel {
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  overflow-y: auto;
}
@media (max-width: 860px) { .auth-form-panel { padding: 40px 24px; } }

.auth-back-link {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 36px;
  transition: color var(--transition);
}
.auth-back-link:hover { color: var(--text-primary); }

.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-logo-mobile {
  display: none;
  margin-bottom: 28px;
}
@media (max-width: 860px) { .auth-logo-mobile { display: block; text-align: center; } }

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  background: none;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
}

/* Discord OAuth button */
.btn-discord-auth {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-discord-auth:hover {
  background: #4752C4;
  box-shadow: 0 4px 20px rgba(88,101,242,0.4);
  transform: translateY(-1px);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.auth-divider span {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* Form fields */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.94rem;
  transition: all var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: rgba(232,158,26,0.6);
  background: rgba(255,185,0,0.06);
  box-shadow: 0 0 0 3px rgba(232,158,26,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error {
  border-color: rgba(232,158,26,0.5);
  box-shadow: 0 0 0 3px rgba(232,158,26,0.1);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-hint { display: flex; justify-content: flex-end; margin-top: -8px; margin-bottom: 4px; }
.form-hint a {
  font-size: 0.8rem;
  color: var(--color-blue-light);
  text-decoration: none;
}
.form-hint a:hover { text-decoration: underline; }

/* Password strength bar */
.password-strength {
  height: 4px;
  background: var(--bg-glass);
  border-radius: 2px;
  overflow: hidden;
  margin-top: -12px;
  margin-bottom: 12px;
}
.password-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.4s;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.form-check input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-gold);
  margin-top: 1px;
}
.form-check a { color: var(--color-blue-light); }

/* Submit button */
.btn-auth-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(232,158,26,0.4);
}
.btn-auth-submit:hover {
  opacity: 0.9;
  box-shadow: 0 6px 24px rgba(232,158,26,0.55);
  transform: translateY(-1px);
}

/* Error / success message */
.auth-message {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}
.auth-message.show { display: block; animation: fadeInDown 0.3s ease; }
.auth-message--error { background: rgba(220,60,0,0.12); border: 1px solid rgba(220,60,0,0.3); color: #ff9970; }
.auth-message--success { background: rgba(57,203,125,0.12); border: 1px solid rgba(57,203,125,0.3); color: var(--color-green); }

/* ====== COMPTE DASHBOARD ====== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 0;
}

/* Sidebar */
.dash-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-dark);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  overflow-y: auto;
}
@media (max-width: 860px) { .dash-sidebar { display: none; } }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  margin-bottom: 16px;
}
.sidebar-logo img { width: 32px; }
.sidebar-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
}

.sidebar-user {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}
.sidebar-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-red), #ff6b6b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-username {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.sidebar-rank {
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  background: rgba(255,214,10,0.15);
  color: var(--color-yellow);
  display: inline-block;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; flex: 1; }
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.sidebar-nav-link:hover { background: var(--bg-glass); color: var(--text-primary); }
.sidebar-nav-link.active { background: rgba(232,158,26,0.12); color: var(--color-red); }
.sidebar-nav-link svg { flex-shrink: 0; }

.sidebar-bottom { padding: 16px 12px 0; border-top: 1px solid var(--border-subtle); margin-top: auto; }

/* Dashboard Main */
.dash-main {
  margin-left: 240px;
  flex: 1;
  padding: 0;
  min-height: 100vh;
}
@media (max-width: 860px) { .dash-main { margin-left: 0; } }

/* Profile Banner */
.profile-banner {
  height: 200px;
  background:
    radial-gradient(ellipse 80% 60% at 30% 60%, rgba(232,158,26,0.35), transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(229,90,0,0.25), transparent 55%),
    linear-gradient(135deg, #130F07, #241A0C);
  position: relative;
  overflow: hidden;
}
.profile-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E");
}

.profile-header-info {
  padding: 0 32px 32px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}
@media (max-width: 640px) { .profile-header-info { padding: 0 16px 24px; flex-wrap: wrap; } }

.profile-avatar-large {
  width: 96px; height: 96px;
  border-radius: var(--radius-lg);
  border: 4px solid var(--bg-dark);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2.5rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.profile-details { padding-bottom: 6px; }
.profile-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.profile-username {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
}
.profile-rank-badge {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-heading);
}
.badge--free   { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.badge--vip    { background: rgba(76,201,240,0.15);  color: #4CC9F0; }
.badge--maitre { background: rgba(155,93,229,0.15);  color: #9B5DE5; }
.badge--champ  { background: rgba(232,158,26,0.15);  color: var(--color-gold); }
.badge--legend { background: rgba(255,214,10,0.15);  color: var(--color-yellow); }
.profile-joined { color: var(--text-muted); font-size: 0.85rem; }

/* Profile Actions */
.profile-actions {
  padding: 0 32px 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
}

/* Dash Content */
.dash-content { padding: 32px; }
@media (max-width: 640px) { .dash-content { padding: 20px 16px; } }

.dash-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.stat-icon { font-size: 1.4rem; margin-bottom: 4px; }
.stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label { color: var(--text-muted); font-size: 0.82rem; }

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
@media (max-width: 860px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

.team-slot {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}
.team-slot:hover {
  border-color: rgba(232,158,26,0.35);
  box-shadow: 0 4px 16px rgba(232,158,26,0.15);
  transform: translateY(-2px);
}
.team-slot--empty {
  border-style: dashed;
  cursor: default;
  opacity: 0.5;
}
.team-slot--empty:hover {
  border-color: var(--border-subtle);
  box-shadow: none;
  transform: none;
}

.team-pokemon-img {
  width: 72px;
  height: 72px;
  image-rendering: pixelated;
}
.team-pokemon-name {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.team-pokemon-lvl {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  padding: 1px 8px;
  border-radius: var(--radius-pill);
}
.shiny-badge {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 0.6rem;
  background: rgba(255,214,10,0.15);
  color: var(--color-yellow);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

/* Recent activity */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.88rem;
}
.activity-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.activity-text { flex: 1; color: var(--text-secondary); }
.activity-text strong { color: var(--text-primary); }
.activity-time { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatBall {
  0%   { transform: translateY(110vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.15; }
  90%  { opacity: 0.15; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}
