﻿/* ============================================================
   AUTH.CSS — Login, Register, Forgot Password
   Kezas Univers
   ============================================================ */

/* Reset body pour les pages auth */
.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #fff;
}

/* ===== Layout principal ===== */
.auth-page {
  display: flex;
  min-height: 100vh;
}

/* ===== Panneau gauche (Marque) ===== */
.auth-page__brand {
  width: 45%;
  flex-shrink: 0;
  background: linear-gradient(150deg, #F7B600 0%, #C48F00 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  position: relative;
  overflow: hidden;
}

/* Cercles décoratifs */
.auth-page__brand::before,
.auth-page__brand::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
}

.auth-page__brand::before {
  width: 380px;
  height: 380px;
  top: -140px;
  right: -120px;
}

.auth-page__brand::after {
  width: 240px;
  height: 240px;
  bottom: -80px;
  left: -80px;
}

.auth-page__brand-inner {
  position: relative;
  z-index: 1;
}

.auth-page__brand-logo {
  display: inline-block;
  margin-bottom: 48px;
}

.auth-page__brand-logo img {
  max-width: 150px;
  filter: brightness(0) invert(1);
}

.auth-page__brand-tagline {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 18px;
}

.auth-page__brand-desc {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .82);
  margin: 0 0 44px;
}

.auth-page__brand-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-page__brand-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, .9);
}

.auth-page__brand-features li .feat-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* Lien retour boutique sur le panneau marque */
.auth-page__back {
  position: absolute;
  top: 28px;
  left: 32px;
  color: rgba(255, 255, 255, .75);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color .2s;
  z-index: 10;
}

.auth-page__back:hover {
  color: #fff;
}

/* ===== Panneau droit (Formulaires) ===== */
.auth-page__forms {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 72px;
  background: #fff;
  overflow-y: auto;
}

.auth-page__forms-header {
  display: none; /* visible seulement en mobile */
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

/* ===== Sélecteur d'onglet ===== */
.auth-tabs {
  display: inline-flex;
  background: #f4f4f4;
  border-radius: 50px;
  padding: 5px;
  margin-bottom: 36px;
}

.auth-tab {
  padding: 10px 28px;
  border: none;
  background: transparent;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: all .25s ease;
  white-space: nowrap;
}

.auth-tab.active {
  background: #F7B600;
  color: #fff;
  box-shadow: 0 4px 14px rgba(247, 182, 0, .35);
}

/* ===== Panneaux de formulaire ===== */
.auth-form-panel {
  display: none;
}

.auth-form-panel.active {
  display: block;
  animation: authSlideIn .28s ease;
  will-change: opacity, transform;
}

@keyframes authSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form-panel__title {
  font-size: 27px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
  line-height: 1.25;
}

.auth-form-panel__subtitle {
  font-size: 14px;
  color: #999;
  margin: 0 0 32px;
}

/* ===== Éléments de formulaire ===== */
.auth-form__group {
  margin-bottom: 20px;
}

.auth-form__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.auth-form__label-hint {
  font-weight: 400;
  color: #aaa;
  font-size: 12px;
  margin-left: 6px;
}

/* Input de base */
.auth-form__input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1.5px solid #e6e6e6;
  border-radius: 10px;
  font-size: 14px;
  color: #1a1a1a;
  background: #fafafa;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-form__input:focus {
  border-color: #F7B600;
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(247, 182, 0, .1);
}

.auth-form__input::placeholder {
  color: #c0c0c0;
  font-size: 13px;
}

/* Select */
select.auth-form__input {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

/* ===== Wrapper avec préfixe téléphone ===== */
.auth-input-phone {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #e6e6e6;
  border-radius: 10px;
  background: #fafafa;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.auth-input-phone:focus-within {
  border-color: #F7B600;
  box-shadow: 0 0 0 3.5px rgba(247, 182, 0, .1);
  background: #fff;
}

.auth-input-phone__prefix {
  flex-shrink: 0;
  padding: 0 14px;
  background: #f0f0f0;
  border-right: 1.5px solid #e6e6e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
  min-width: 56px;
  transition: border-color .2s;
}

.auth-input-phone:focus-within .auth-input-phone__prefix {
  border-right-color: #F7B600;
}

.auth-input-phone .auth-form__input {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}

/* ===== Wrapper avec bouton toggle password ===== */
.auth-input-pass {
  position: relative;
}

.auth-input-pass .auth-form__input {
  padding-right: 48px;
}

.auth-input-pass__toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #bbb;
  font-size: 15px;
  line-height: 1;
  transition: color .2s;
}

.auth-input-pass__toggle:hover {
  color: #F7B600;
}

/* ===== Options (remember + forgot) ===== */
.auth-form__options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.auth-form__remember {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

.auth-form__remember input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #F7B600;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.auth-form__forgot {
  font-size: 13px;
  color: #F7B600;
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
  white-space: nowrap;
}

.auth-form__forgot:hover {
  opacity: .7;
  color: #F7B600;
}

/* ===== Liens ===== */
.auth-link {
  color: #F7B600;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
}

.auth-link:hover {
  opacity: .75;
  color: #F7B600;
}

/* ===== Pied de formulaire ===== */
.auth-form-panel__footer {
  margin-top: 26px;
  text-align: center;
  font-size: 13px;
  color: #aaa;
}

/* ===== Bouton submit pleine largeur ===== */
.auth-page .rr-btn-button {
  width: 100%;
  justify-content: center;
  height: 52px;
  font-size: 15px;
  letter-spacing: .3px;
}

/* ===== Séparateur ===== */
.auth-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 36px 0;
}

/* ===== État succès (forgot password) ===== */
.auth-success {
  text-align: center;
  padding: 20px 0;
}

.auth-success__icon {
  width: 72px;
  height: 72px;
  background: rgba(247, 182, 0, .1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 28px;
  color: #F7B600;
}

.auth-success__title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin-bottom: 12px;
}

.auth-success__text {
  font-size: 14px;
  color: #888;
  line-height: 1.75;
  margin-bottom: 28px;
}

/* ===== État chargement bouton ===== */
.btn--loading {
  opacity: .82;
  cursor: not-allowed !important;
  pointer-events: none;
  transition: opacity .2s;
}

.btn-spinner {
  display: inline-block;
  animation: btnSpin .7s linear infinite;
  font-size: 15px;
  will-change: transform;
}

@keyframes btnSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== Alertes flash ===== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.5;
}

.alert-error   { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .auth-page__forms {
    padding: 50px 48px;
  }
}

@media (max-width: 991px) {
  .auth-page__brand {
    display: none;
  }

  .auth-page__forms {
    padding: 40px 36px;
  }

  .auth-page__forms-header {
    display: flex;
  }
}

@media (max-width: 575px) {
  .auth-page__forms {
    padding: 32px 20px;
  }

  .auth-form-panel__title {
    font-size: 23px;
  }

  .auth-tabs {
    width: 100%;
  }

  .auth-tab {
    flex: 1;
    text-align: center;
  }
}
