:root {
  --bg-body: #0a0e17;
  --bg-card: #121826;
  --bg-card-hover: #1b2336;
  --primary: #00d2ff;
  --primary-glow: rgba(0, 210, 255, 0.25);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-card: #1e293b;
  --danger: #ef4444;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Header Profil */
.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
  object-fit: cover;
  background: #1e293b;
}

.user-details h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.user-details .email {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-weight: 700;
}

.badge-admin {
  background: rgba(0, 210, 255, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.badge-user {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
}

.btn-logout {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: var(--danger);
  color: #ffffff;
}

/* Grille d'applications */
.section-title {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.app-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px var(--primary-glow);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.app-icon {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-card);
}

.app-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.app-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.app-action {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

/* Page Login */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.brand-logo {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.login-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.25rem;
}

.btn-login {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  color: #050b14;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

@media (max-width: 640px) {
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-logout {
    width: 100%;
    text-align: center;
  }
}
