/* ==========================================================================
   AUTHENTIFICATION PARTENAIRE PUBLICITE & AFFILIATION - STYLES EPURES
   ========================================================================== */

.auth-wrapper {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-container {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 36px;
}

/* Header */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-badge {
  display: inline-block;
  background: rgba(150, 29, 0, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.auth-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.2;
}

.auth-header p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

/* Onglets Connexion / Inscription */
.auth-mode-toggle {
  display: flex;
  background: var(--bg);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
}

.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 0;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.mode-btn.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Bouton Google International Standard */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-google:hover {
  background: #fdfdfd;
  border-color: rgba(26, 26, 26, 0.25);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Séparateur élégant */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.auth-divider span {
  padding: 0 14px;
}

/* Sélecteur de méthode (Email vs Téléphone) */
.method-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.method-choice {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.method-choice:hover {
  color: var(--ink);
  border-color: rgba(26, 26, 26, 0.2);
}

.method-choice.active {
  background: var(--bg);
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}

/* Formulaires & Champs */
.auth-form-panel {
  display: none;
}

.auth-form-panel.active {
  display: block;
}

.input-block {
  margin-bottom: 16px;
}

.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.input-block label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.link-forgot {
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
}

.link-forgot:hover {
  text-decoration: underline;
}

.input-field {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  transition: all 0.2s ease;
}

.input-field:focus {
  outline: none;
  background: var(--white);
  border-color: var(--primary);
}

/* Champ de téléphone avec préfixe pays */
.phone-input-wrap {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.phone-input-wrap:focus-within {
  background: var(--white);
  border-color: var(--primary);
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: rgba(26, 26, 26, 0.04);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  border-right: 1px solid var(--line);
  user-select: none;
}

.phone-input-wrap .input-field {
  border: none;
  background: transparent;
  flex: 1;
}

/* Bouton Soumettre */
.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  font-family: inherit;
}

.btn-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Mention Légale / Bas de formulaire */
.auth-footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 22px;
  line-height: 1.5;
}

.auth-footer-note a {
  color: var(--ink);
  text-decoration: underline;
}

/* Message d'état (feedback) */
.auth-feedback {
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-feedback.success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-feedback.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 480px) {
  .auth-container {
    padding: 30px 20px;
    border: none;
    background: transparent;
  }
  .auth-wrapper {
    padding: 20px 10px;
  }
}
