/* Connexion v2.1 · Celyntor. Style sobre : aplats, une seule couleur d'accent, mouvements discrets.
   Ne s'applique qu'à la page de connexion (body.au2). */

/* ---------- Panneau gauche ---------- */
.au2 .n-auth-story,
:root[data-theme="light"] .au2 .n-auth-story {
  background: radial-gradient(60% 50% at 90% 0%, rgba(46, 102, 245, 0.14), transparent 70%), #05070c;
}
.au-aurora { display: none; }
.au-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}
.au2 .n-auth-art { height: 44%; }
.au-spark { opacity: 0; animation: au-fade 0.4s 2.5s forwards; }
@keyframes au-fade { to { opacity: 1; } }

.au2 .n-auth-story,
.au2 .n-auth-story h1,
.au2 .n-auth-story strong,
.au2 .n-auth-story .n-logo,
.au2 .n-auth-story .n-logo span { color: #edf1f7; }
.au-chip { color: #8eb0ff !important; }
.au-pulse { display: none; }
.au2 .n-auth-story h1 {
  margin-top: 18px;
  max-width: none;
  font-size: clamp(42px, 5vw, 72px);
  letter-spacing: -0.048em;
  line-height: 1;
}
.au2 .n-auth-story h1 em {
  color: #5b8cff;
  background: none;
  -webkit-text-fill-color: currentColor;
}
.au-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  animation: au-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.au2 .n-auth-story h1 em.au-word { animation-delay: 0.1s; }
@keyframes au-in { to { opacity: 1; transform: none; } }
.au2 .au-lead {
  max-width: 44ch;
  margin-top: 20px;
  color: rgba(214, 222, 235, 0.7);
  font-size: 16px;
  line-height: 1.65;
  opacity: 0;
  animation: au-in 0.7s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.au-features {
  max-width: 440px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  opacity: 0;
  animation: au-in 0.7s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.au-features li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.au-features strong { display: block; font-size: 14px; font-weight: 600; }
.au-features small { display: block; margin-top: 3px; color: rgba(186, 197, 214, 0.58); font-size: 12.5px; line-height: 1.45; }
.au-num { flex: none; color: #8eb0ff; font: 600 11px var(--f-mono); letter-spacing: 0.06em; }
.au-story-foot { color: rgba(186, 197, 214, 0.5) !important; }

/* ---------- Panneau droit ---------- */
.au2 .n-auth-box {
  width: min(420px, 100%);
  gap: 14px;
  animation: au-card 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes au-card { from { opacity: 0; transform: translateY(10px); } }
.au2 .n-auth-title { font-size: 27px; letter-spacing: -0.035em; }

/* Onglets soulignés */
.au-tabs {
  position: relative;
  display: flex;
  gap: 26px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--c-line);
}
.au-tabs[hidden] { display: none; }
.au-tabs button {
  padding: 0 0 12px;
  border: 0;
  background: none;
  color: var(--c-ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}
.au-tabs button:hover,
.au-tabs button[aria-selected="true"] { color: var(--c-ink); }
.au-tabs button:focus-visible { outline: 2px solid var(--c-blue-line); outline-offset: 4px; border-radius: 4px; }
.au-glider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: var(--gw, 0);
  height: 2px;
  border-radius: 2px;
  background: var(--c-blue);
  transform: translateX(var(--gx, 0));
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.au-has-tabs .au-tabs:not([hidden]) ~ #registration-actions,
.au-has-tabs #back-login { display: none !important; }

/* Champs avec icône */
.au-control { position: relative; }
.au-control .n-input { width: 100%; padding-left: 40px; }
.au-control[data-secret] .n-input { padding-right: 46px; }
.au-lead-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--c-ink-3);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 0.2s;
}
.au-control:focus-within .au-lead-icon { stroke: var(--c-ink); }
.au2 .n-auth-box .n-input { min-height: 46px; }
.au-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--c-ink-3);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.2s, background 0.2s;
}
.au-eye:hover { background: var(--c-hover); color: var(--c-ink); }
.au-eye:focus-visible { outline: 2px solid var(--c-blue-line); }
.au-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.au-eye .au-slash { stroke-dasharray: 23; stroke-dashoffset: 0; transition: stroke-dashoffset 0.25s; }
.au-eye[aria-pressed="true"] .au-slash { stroke-dashoffset: 23; }
.au-caps {
  position: absolute;
  top: -25px;
  right: 0;
  color: var(--c-warning);
  font-size: 11.5px;
  font-weight: 600;
}
.au-caps[hidden] { display: none; }

/* Bouton principal : aplat, juste la flèche qui avance */
.au2 .au-submit { position: relative; min-height: 46px !important; }
.au-arrow { display: inline-block; transition: transform 0.2s; }
.au-submit:hover .au-arrow { transform: translateX(3px); }
.au2 .au-submit:disabled { cursor: progress; }
.au2 .au-submit:disabled > span { opacity: 0; }
.au2 .au-submit:disabled::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: au-spin 0.7s linear infinite;
}
@keyframes au-spin { to { transform: rotate(360deg); } }

/* Erreur */
.au-shake { animation: au-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important; }
@keyframes au-shake { 20%, 80% { transform: translateX(-2px); } 40%, 60% { transform: translateX(4px); } 50% { transform: translateX(-4px); } }

.au2 .n-check { user-select: none; }
.au2 .n-auth-foot { line-height: 1.4; }
.au2 .n-auth-foot::before { flex: none; }

/* ---------- Tablette et mobile ---------- */
@media (max-width: 900px) {
  .au2 .n-auth-story { padding-bottom: 26px; }
  .au2 .n-auth-story h1 { margin-top: 12px; font-size: clamp(32px, 8vw, 44px); }
  .au2 .au-lead { margin-top: 12px; font-size: 14.5px; }
  .au-features, .au-story-foot { display: none; }
  .au2 .n-auth-art { height: 70%; opacity: 0.7; }
  .au2 .n-auth-form { padding-top: 28px; }
}
@media (max-width: 560px) {
  .au2 .n-auth-story { gap: 18px; padding: 18px 16px 22px; }
  .au2 .au-lead { display: none; }
  .au2 .n-auth-form { padding: 24px 16px 40px; }
  .au2 .n-auth-title { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .au-word, .au2 .au-lead, .au-features, .au-spark, .au2 .n-auth-box { animation: none !important; opacity: 1; transform: none; }
}
