/* ====================================================================
   Écran de sélection des profils
   ==================================================================== */

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(
    180deg,
    var(--paper) 0%,
    var(--paper-2) 100%
  );
}
.login-screen.hide {
  display: none;
}

.login-brand {
  text-align: center;
  margin-bottom: 48px;
}
.login-brand .display {
  font-size: 42px;
  margin-bottom: 8px;
}
.login-brand .sub {
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.login-prompt {
  text-align: center;
  margin-bottom: 32px;
}
.login-prompt h2 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 6px;
}
.login-prompt p {
  color: var(--ink-3);
  font-size: 14px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1100px;
  width: 100%;
}

.role-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 26px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.role-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--role-color);
}
.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 20, 25, 0.08);
  border-color: var(--role-color);
}
.role-card[data-role="commercial"] {
  --role-color: var(--role-commercial);
  --role-color-soft: var(--role-commercial-soft);
}
.role-card[data-role="manager"] {
  --role-color: var(--role-manager);
  --role-color-soft: var(--role-manager-soft);
}
.role-card[data-role="admin"] {
  --role-color: var(--role-admin);
  --role-color-soft: var(--role-admin-soft);
}

.role-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--role-color-soft);
  color: var(--role-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 16px;
}

.role-name {
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 2px;
}
.role-title {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--role-color-soft);
  color: var(--role-color);
  margin-bottom: 18px;
}

.role-perms {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 0;
}
.role-perms li {
  font-size: 12px;
  color: var(--ink-2);
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.role-perms li::before {
  content: "✓";
  color: var(--role-color);
  font-weight: 600;
  flex-shrink: 0;
}
.role-perms li.deny {
  color: var(--ink-4);
}
.role-perms li.deny::before {
  content: "✕";
  color: var(--ink-4);
}

.role-cta {
  margin-top: 18px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--role-color);
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.role-card:hover .role-cta {
  color: var(--role-color);
}
.role-cta::after {
  content: " →";
  transition: margin 0.2s;
}
.role-card:hover .role-cta::after {
  margin-left: 4px;
}

.login-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  max-width: 600px;
  line-height: 1.6;
}

/* ====================================================================
   Responsive — login screen
   ==================================================================== */

@media (max-width: 1024px) {
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 720px;
  }
  .login-brand .display {
    font-size: 36px;
  }
}

@media (max-width: 640px) {
  .login-screen {
    padding: 28px 16px;
  }
  .login-brand {
    margin-bottom: 28px;
  }
  .login-brand .display {
    font-size: 30px;
  }
  .login-brand .sub {
    font-size: 13px;
  }
  .login-prompt {
    margin-bottom: 22px;
  }
  .login-prompt h2 {
    font-size: 19px;
  }
  .role-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .role-card {
    padding: 22px 20px;
  }
  .login-footer {
    margin-top: 28px;
    font-size: 11px;
  }
}
