/* =============================================
   AUTH.CSS — Pages Login & Register
============================================= */

/* ============================
   LAYOUT GÉNÉRAL AUTH
============================ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ============================
   PANNEAU GAUCHE — visuel de marque
============================ */
.auth-brand {
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

/* Cercles décoratifs */
.auth-brand::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0.08;
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -60px;
  width: 400px;
  height: 400px;
  background: var(--yellow);
  border-radius: 50%;
  opacity: 0.05;
}

.auth-brand__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.auth-brand__logo-mark {
  width: 40px;
  height: 40px;
  background: var(--yellow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--black);
}

.auth-brand__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--white);
}

.auth-brand__logo-text span {
  color: var(--yellow);
}

/* Contenu central de la marque */
.auth-brand__body {
  position: relative;
  z-index: 1;
}

.auth-brand__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.auth-brand__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.auth-brand__title .accent {
  color: var(--yellow);
}

.auth-brand__desc {
  font-size: 0.97rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 380px;
}

/* Avantages listés */
.auth-brand__perks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.auth-brand__perk {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
}

.auth-brand__perk-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 193, 7, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Témoignage bas de panneau */
.auth-brand__testimonial {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  position: relative;
  z-index: 1;
}

.auth-brand__testimonial-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 14px;
}

.auth-brand__testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand__testimonial-avatar {
  width: 36px;
  height: 36px;
  background: var(--yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--black);
  flex-shrink: 0;
}

.auth-brand__testimonial-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
}

.auth-brand__testimonial-role {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================
   PANNEAU DROIT — formulaire
============================ */
.auth-form-panel {
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  overflow-y: auto;
}

.auth-form-panel__inner {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

/* Header formulaire */
.auth-form-header {
  margin-bottom: 36px;
}

.auth-form-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-mid);
  margin-bottom: 28px;
  transition: color var(--transition);
}

.auth-form-header__back:hover {
  color: var(--black);
}

.auth-form-header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 8px;
}

.auth-form-header__sub {
  font-size: 0.92rem;
  color: var(--gray-mid);
}

.auth-form-header__sub a {
  color: var(--yellow-dark);
  font-weight: 600;
}

.auth-form-header__sub a:hover {
  text-decoration: underline;
}

/* ============================
   FORMULAIRE — champs
============================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--black);
  margin-bottom: 7px;
}

.form-label .required {
  color: #E53935;
  margin-left: 3px;
}

.form-input-wrap {
  position: relative;
}

.form-input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--gray-mid);
  pointer-events: none;
}

.form-input-wrap .input-icon-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--gray-mid);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition);
}

.form-input-wrap .input-icon-right:hover {
  color: var(--black);
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--black);
  background: var(--white);
  transition: all var(--transition);
  outline: none;
}

.form-control.has-icon-left  { padding-left: 42px; }
.form-control.has-icon-right { padding-right: 42px; }

.form-control::placeholder {
  color: #BDBDBD;
}

.form-control:hover {
  border-color: #BDBDBD;
}

.form-control:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.18);
}

.form-control.is-error {
  border-color: #E53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.form-control.is-success {
  border-color: #43A047;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.12);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-top: 5px;
}

.form-error {
  font-size: 0.8rem;
  color: #E53935;
  margin-top: 5px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* Select stylisé */
.form-select {
  width: 100%;
  height: 48px;
  padding: 0 40px 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--black);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23757575' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}

.form-select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.18);
}

/* Grid 2 colonnes dans form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================
   TYPE DE BOUTIQUE — sélection visuelle
============================ */
.shop-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.shop-type-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.shop-type-card:hover {
  border-color: var(--yellow-mid);
  background: var(--yellow-light);
}

.shop-type-card.selected {
  border-color: var(--yellow);
  background: var(--yellow-light);
}

.shop-type-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow-dark);
  font-family: var(--font-display);
}

.shop-type-card__icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.shop-type-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--black);
  margin-bottom: 3px;
}

.shop-type-card__desc {
  font-size: 0.75rem;
  color: var(--gray-mid);
  line-height: 1.4;
}

/* ============================
   FORCE DU MOT DE PASSE
============================ */
.password-strength {
  margin-top: 8px;
}

.password-strength__bars {
  display: flex;
  gap: 4px;
  margin-bottom: 5px;
}

.password-strength__bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  transition: background var(--transition);
}

.password-strength__bar.weak   { background: #E53935; }
.password-strength__bar.medium { background: #FB8C00; }
.password-strength__bar.strong { background: #43A047; }

.password-strength__label {
  font-size: 0.76rem;
  color: var(--gray-mid);
}

/* ============================
   CHECKBOX & TOGGLE
============================ */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-check-input {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--yellow-dark);
}

.form-check-label {
  font-size: 0.85rem;
  color: var(--gray-dark);
  line-height: 1.5;
}

.form-check-label a {
  color: var(--yellow-dark);
  font-weight: 600;
}

/* ============================
   DIVIDER "ou continuer avec"
============================ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}

.auth-divider__line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider__text {
  font-size: 0.8rem;
  color: var(--gray-mid);
  white-space: nowrap;
}

/* ============================
   BOUTON SUBMIT
============================ */
.btn-submit {
  width: 100%;
  height: 50px;
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--yellow);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  margin-top: 8px;
}

.btn-submit:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  box-shadow: var(--shadow-yellow);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-submit .spinner {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--black);
}

/* ============================
   ÉTAPES D'INSCRIPTION (steps)
============================ */
.register-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 36px;
}

.register-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.register-step__num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gray-mid);
  background: var(--white);
  flex-shrink: 0;
  transition: all var(--transition);
}

.register-step__label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-mid);
  transition: color var(--transition);
}

.register-step.active .register-step__num {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

.register-step.active .register-step__label {
  color: var(--black);
}

.register-step.done .register-step__num {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.register-step.done .register-step__num::after {
  content: '✓';
}

.register-step__line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  transition: background var(--transition);
}

.register-step__line.done {
  background: var(--black);
}

/* ============================
   PANNEAU D'ÉTAPE (step panel)
============================ */
.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
  animation: fadeInUp 0.35s ease both;
}

/* ============================
   RESPONSIVE AUTH
============================ */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-panel {
    padding: 40px 24px;
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: 40px;
  }

  .auth-form-panel__inner {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .shop-type-grid {
    grid-template-columns: 1fr;
  }
}