/* ============================================================
   X-PROFESSO — auth.css
   Styles dédiés aux pages login / register / forgot / reset
   Chargé dans <head> via $extraHead → priorité sur Bootstrap
   ============================================================ */

/* ── Layout principal ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1929 0%, #1B4F72 45%, #2471A3 100%);
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* Animated blobs */
.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.auth-blob-1 { width:500px; height:500px; background:#2471A3; top:-200px; right:-100px; animation: blobFloat 9s ease-in-out infinite; }
.auth-blob-2 { width:350px; height:350px; background:#F39C12; bottom:-150px; left:-80px;  animation: blobFloat 12s ease-in-out infinite reverse; }
@keyframes blobFloat { 0%,100%{transform:translate(0,0)} 50%{transform:translate(24px,-24px)} }

/* ── Colonnes ── */
.auth-left {
  width: 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
  position: relative;
  z-index: 1;
}

.auth-right {
  width: 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  position: relative;
  z-index: 1;
  overflow-y: auto;
}

/* ── Card formulaire ── */
.auth-card {
  background: #fff;
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08);
  animation: authCardIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
.auth-card.wide { max-width: 520px; }

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Champs de saisie — override complet de Bootstrap ── */
.auth-card .xp-field {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

.auth-card .xp-field:focus-within {
  border-color: #2471A3;
  box-shadow: 0 0 0 4px rgba(36,113,163,0.13);
}

.auth-card .xp-field .xp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  background: #f0f5fa;
  color: #2471A3;
  font-size: 1rem;
  flex-shrink: 0;
  border-right: 1.5px solid #e2e8f0;
  transition: background 0.25s, color 0.25s;
}

.auth-card .xp-field:focus-within .xp-icon {
  background: rgba(36,113,163,0.1);
  color: #1B4F72;
}

.auth-card .xp-field input,
.auth-card .xp-field select {
  flex: 1;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 13px 16px;
  font-size: 0.92rem;
  background: transparent;
  color: #1a202c;
  font-family: 'Inter', sans-serif;
  min-width: 0;
}

.auth-card .xp-field .xp-eye {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  background: transparent;
  color: #9aa5b4;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  flex-shrink: 0;
}
.auth-card .xp-field .xp-eye:hover { color: #2471A3; }

/* Label */
.auth-card .auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}

/* ── Bouton principal ── */
.btn-auth-primary {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1B4F72, #2471A3);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(27,79,114,0.3);
}
.btn-auth-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(27,79,114,0.45);
  background: linear-gradient(135deg, #154060, #1B4F72);
}
.btn-auth-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ── Sélecteur type (Client/Commercial) ── */
.auth-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.auth-type-btn {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: #fff;
  position: relative;
}

.auth-type-btn:hover {
  border-color: #2471A3;
  background: rgba(36,113,163,0.03);
}

.auth-type-btn.selected-client {
  border-color: #2471A3;
  background: rgba(36,113,163,0.07);
  box-shadow: 0 0 0 3px rgba(36,113,163,0.18);
}

.auth-type-btn.selected-commercial {
  border-color: #F39C12;
  background: rgba(243,156,18,0.07);
  box-shadow: 0 0 0 3px rgba(243,156,18,0.22);
}

.auth-type-btn .type-emoji { font-size: 1.8rem; margin-bottom: 6px; display: block; }
.auth-type-btn .type-name  { font-weight: 800; font-size: 0.88rem; color: #1B4F72; }
.auth-type-btn .type-hint  { font-size: 0.72rem; color: #94a3b8; margin-top: 2px; }

/* Check indicator */
.auth-type-btn .type-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #2471A3;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}
.auth-type-btn.selected-client .type-check,
.auth-type-btn.selected-commercial .type-check {
  display: flex;
}
.auth-type-btn.selected-commercial .type-check {
  background: #F39C12;
}

/* ── Row gauge password ── */
.pw-strength { height: 4px; border-radius: 2px; background: #eee; margin-top: 8px; transition: all 0.3s; }

/* ── Checkbox CGU ── */
.auth-check-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
}
.auth-check-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #2471A3;
}
.auth-check-wrapper label {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  cursor: pointer;
}

/* ── Left branding ── */
.auth-tagline { font-family: 'Montserrat', sans-serif; font-weight: 900; color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.2; margin-bottom: 1rem; }
.auth-tagline .highlight { color: #F39C12; text-shadow: 0 0 30px rgba(243,156,18,0.35); }
.auth-desc { color: rgba(255,255,255,0.72); font-size: 1rem; line-height: 1.7; margin-bottom: 2rem; max-width: 380px; }

.auth-feature-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  animation: featureSlide 0.6s ease both;
}
@keyframes featureSlide { from{opacity:0;transform:translateX(-20px)} to{opacity:1;transform:translateX(0)} }

.auth-feature-card .feat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.auth-stat-row { display: flex; gap: 2rem; margin-top: 2rem; }
.auth-stat { text-align: center; }
.auth-stat .stat-val { font-family: 'Montserrat', sans-serif; font-weight: 900; color: #fff; font-size: 2rem; line-height: 1; }
.auth-stat .stat-lbl { font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-top: 3px; }
.auth-stat-sep { width: 1px; background: rgba(255,255,255,0.15); align-self: stretch; }

/* ── Lien rapide (tracking) ── */
.auth-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(36,113,163,0.18);
  background: rgba(36,113,163,0.05);
  text-decoration: none;
  transition: all 0.25s;
  margin-bottom: 1rem;
}
.auth-quick-link:hover {
  border-color: rgba(36,113,163,0.4);
  background: rgba(36,113,163,0.1);
}
.auth-quick-link .ql-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1B4F72, #2471A3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
.auth-quick-link .ql-text .ql-title { font-size: 0.85rem; font-weight: 700; color: #1B4F72; }
.auth-quick-link .ql-text .ql-sub   { font-size: 0.75rem; color: #94a3b8; }
.auth-quick-link .ql-arrow { color: #cbd5e1; margin-left: auto; transition: transform 0.2s; }
.auth-quick-link:hover .ql-arrow { color: #2471A3; transform: translateX(3px); }

/* ── Divider ── */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 1.1rem 0; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:#e2e8f0; }
.auth-divider span { font-size: 0.78rem; color: #94a3b8; white-space: nowrap; }

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Mobile login — inspiré maquette 02-login.png */
  .auth-page { background: #f0f2f5 !important; }
  .auth-left { display: none; }
  .auth-right {
    width: 100%;
    padding: 0;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  /* Header bleu mobile avec logo */
  .auth-right::before {
    content: '';
    display: block;
    background: linear-gradient(135deg, #1B4F72, #2471A3);
    height: 180px;
    border-radius: 0 0 32px 32px;
    position: absolute;
    top: 0; left: 0; right: 0;
  }
  .auth-mobile-header {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 48px 20px 24px;
    color: white;
  }
  .auth-card {
    position: relative;
    z-index: 2;
    margin: 0 16px;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
    padding: 24px 20px !important;
  }
  .auth-card .card-title { font-size: 1.2rem !important; }
  .reg-row-2 { grid-template-columns: 1fr !important; }
}

/* ── Grille 2 colonnes responsive formulaire inscription ── */
.reg-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}
@media (max-width: 480px) {
  .reg-row-2 { grid-template-columns: 1fr; }
}
