/* =====================================================
   Walflow Prototype — Login page multi-tabs
   ===================================================== */

body.demo-gated .app { display: none; }

.demo-gate {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #F5FAFC 0%, #FFFFFF 50%, #EEF5F8 100%);
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  animation: demoFadeIn .25s ease-out;
}
.demo-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(53, 149, 169, 0.1), transparent 35%),
    radial-gradient(circle at 85% 85%, rgba(231, 180, 111, 0.08), transparent 40%);
  pointer-events: none;
}
@keyframes demoFadeIn { from { opacity: 0; } to { opacity: 1; } }

.demo-login-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: white;
  border: 1px solid #E3EBF2;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 29, 75, 0.08), 0 4px 10px rgba(0, 29, 75, 0.04);
  padding: 32px 40px 28px;
  animation: demoCardIn .3s ease-out;
}
@keyframes demoCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.demo-login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.demo-login-logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--role-accent, #3595A9);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--role-accent, #3595A9) 30%, transparent);
  transition: background .25s, box-shadow .25s;
}
.demo-login-brand-name {
  font-weight: 800;
  font-size: 22px;
  color: #001D4B;
  letter-spacing: -0.4px;
}

/* ==== Onglets rôle ==== */
.demo-login-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: #F5FAFC;
  border: 1px solid #E3EBF2;
  border-radius: 12px;
  margin-bottom: 22px;
}
.demo-login-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: none;
  background: transparent;
  color: #6B7A8C;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  letter-spacing: 0.1px;
}
.demo-login-tab:hover {
  color: var(--tab-accent, #3595A9);
}
.demo-login-tab.active {
  background: white;
  color: var(--tab-accent, #3595A9);
  box-shadow: 0 1px 3px rgba(0, 29, 75, 0.08);
}
.demo-login-tab-icon { font-size: 14px; line-height: 1; }

.demo-login-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: #001D4B;
  letter-spacing: -0.4px;
  text-align: center;
}
.demo-login-sub {
  margin: 0 0 22px;
  font-size: 13px;
  color: #6B7A8C;
  text-align: center;
  line-height: 1.5;
}

.demo-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.demo-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.demo-login-field label {
  font-size: 12px;
  font-weight: 700;
  color: #4A5A70;
}
.demo-login-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid #E3EBF2;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: #001D4B;
  background: white;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.demo-login-field input:focus {
  border-color: var(--role-accent, #3595A9);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-accent, #3595A9) 18%, transparent);
}

.demo-login-error {
  display: none;
  padding: 8px 12px;
  background: rgba(238, 46, 107, 0.1);
  color: #EE2E6B;
  font-size: 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}
.demo-login-error.show { display: block; animation: demoShake .3s; }
@keyframes demoShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.demo-login-submit {
  margin-top: 6px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--role-accent, #3595A9);
  color: white;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--role-accent, #3595A9) 22%, transparent);
}
.demo-login-submit:hover {
  background: color-mix(in srgb, var(--role-accent, #3595A9) 85%, black);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--role-accent, #3595A9) 30%, transparent);
}
.demo-login-submit:active { transform: scale(0.99); }

.demo-login-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  min-height: 22px;
}
.demo-login-link {
  background: transparent;
  border: none;
  color: var(--role-accent, #3595A9);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.demo-login-link:hover { text-decoration: underline; }
.demo-login-staff {
  font-size: 11px;
  color: #98A6B8;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-left: auto;
}

.demo-login-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #F0F4F8;
  font-size: 11px;
  color: #98A6B8;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.demo-login-foot a {
  color: #98A6B8;
  text-decoration: none;
  font-weight: 600;
}
.demo-login-foot a:hover { color: var(--role-accent, #3595A9); }
.demo-login-foot-sep { color: #C7D2DE; }
