/* ============================================================
   LOGIN + OTP — CSS
   ============================================================ */

.auth-root {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* ── Panneau gauche desktop ── */
.auth-left {
  display: none;
  flex: 1;
  background: linear-gradient(145deg, var(--p-d) 0%, var(--p) 55%, #3577f1 100%);
  position: relative; overflow: hidden;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 48px;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M30 0L37 15L52 15L40 24L46 39L30 30L14 39L20 24L8 15L23 15z'/%3E%3C/g%3E%3C/svg%3E");
}
.auth-left-inner { position: relative; z-index: 2; text-align: center; color: #fff; max-width: 380px; }
.al-logo {
  width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255,255,255,.15); border: 1.5px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: #fff; margin: 0 auto 28px;
}
.al-title { font-size: 32px; font-weight: 900; margin-bottom: 10px; line-height: 1.2; }
.al-sub   { font-size: 15px; color: rgba(255,255,255,.7); line-height: 1.6; }
.al-features { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.al-feat {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.10); border-radius: 12px; padding: 12px 16px;
}
.al-feat i    { font-size: 20px; color: rgba(255,255,255,.9); flex-shrink: 0; }
.al-feat span { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); }

/* ── Panneau droit ── */
.auth-right {
  flex: 0 0 100%;
  display: flex; flex-direction: column;
  min-height: 100vh; background: var(--bg);
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .auth-left  { display: flex; flex: 1; }
  .auth-right { flex: 0 0 480px; }
}
@media (min-width: 1280px) {
  .auth-right { flex: 0 0 520px; }
}

/* ── App bar ── */
.auth-bar {
  height: 56px; background: var(--surf);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 10;
}
.auth-bar-title { font-size: 17px; font-weight: 800; color: var(--text); }
.auth-bar-back  {
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text);
}
.auth-bar-action {
  font-size: 14px; font-weight: 700; color: var(--p);
  background: none; border: none; cursor: pointer; font-family: 'Nunito', sans-serif;
}
.auth-bar-ph { width: 60px; }

@media (min-width: 1024px) { .auth-bar { display: none; } }

/* ── Contenu auth ── */
.auth-content {
  flex: 1; padding: 0 20px 40px;
  display: flex; flex-direction: column;
}
@media (min-width: 1024px) {
  .auth-content { padding: 52px 48px; justify-content: center; }
}

/* ── Header de vue ── */
.view-header { padding: 28px 0 24px; }
.view-title  { font-size: 28px; font-weight: 900; color: var(--text); margin-bottom: 6px; }
.view-sub    { font-size: 15px; color: var(--muted); line-height: 1.55; }
@media (min-width: 1024px) {
  .view-header { padding: 0 0 28px; }
  .view-title  { font-size: 30px; }
}

/* ── Card formulaire ── */
.auth-card {
  background: var(--surf); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--sh); border: 1px solid var(--border);
}

/* ── Groupe tel ── */
.phone-row { display: flex; gap: 10px; }
.dial-sel {
  flex: 0 0 96px; height: 52px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text);
  font-size: 14px; font-weight: 700; font-family: 'Nunito', sans-serif;
  padding: 0 10px; cursor: pointer; appearance: auto;
}
.dial-sel:focus { outline: none; border-color: var(--p); }
.phone-input {
  flex: 1; height: 52px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text);
  font-size: 16px; font-family: 'Nunito', sans-serif; font-weight: 500;
  padding: 0 16px; transition: all .2s;
}
.phone-input:focus { outline: none; border-color: var(--p); background: #fff; box-shadow: 0 0 0 3px var(--p-l); }
.phone-input.err  { border-color: var(--danger); }

.field-hint { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* ── OTP 6 cases ── */
.otp-grid {
  display: flex; gap: 8px; justify-content: center; margin: 6px 0;
}
.otp-box {
  flex: 1; max-width: 50px; height: 58px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text);
  font-size: 22px; font-weight: 900; font-family: 'Nunito', sans-serif;
  text-align: center; transition: all .2s; 
  caret-color: transparent;
}
.otp-box:focus {
  outline: none; border-color: var(--p);
  background: #fff; box-shadow: 0 0 0 3px var(--p-l);
}
.otp-box.filled { border-color: var(--p); background: var(--p-l); }
.otp-box.err    { border-color: var(--danger); animation: shake .3s ease; }
@keyframes shake {
  0%,100%{ transform: translateX(0); }
  25%    { transform: translateX(-4px); }
  75%    { transform: translateX(4px); }
}

/* Timer */
.otp-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
}
.otp-timer { font-size: 13px; color: var(--muted); }
.otp-timer strong { color: var(--p); font-weight: 800; }
.otp-resend {
  font-size: 14px; font-weight: 700; background: none; border: none;
  font-family: 'Nunito', sans-serif; cursor: default; color: var(--muted); transition: color .2s;
}
.otp-resend.on { color: var(--p); cursor: pointer; }

/* ── Btn ── */
.auth-btn {
  width: 100%; height: 54px; margin-top: 20px;
  background: var(--p); border: none; border-radius: var(--r-sm);
  color: #fff; font-size: 16px; font-weight: 800;
  font-family: 'Nunito', sans-serif; cursor: pointer; transition: all .22s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-btn:hover { background: var(--p-d); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(64,81,137,.3); }
.auth-btn:active{ transform: translateY(0); }

/* ── Aide ── */
.auth-help {
  text-align: center; margin-top: auto; padding-top: 32px;
  font-size: 14px; font-weight: 700; color: var(--p); cursor: pointer;
}