/* ============================================================
   OtoMaths — auth.css
   Styles partagés : connexion.html + demande-prof.html
   ============================================================ */

/* ── LAYOUT SPLIT ─────────────────────────────────────────── */
.auth-body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* ── PANNEAU GAUCHE (marine) ──────────────────────────────── */
.auth-left {
  background: var(--navy);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-left-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(46,204,113,0.15) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(26,107,176,0.25) 0%, transparent 50%);
  pointer-events: none;
}

/* Logo dans le panneau gauche */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.3px;
  text-decoration: none;
  position: relative;
  width: fit-content;
}

.auth-logo span { color: var(--green); }

.auth-logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--white);
  flex-shrink: 0;
}

.auth-left-body {
  position: relative;
}

.auth-left-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(46,204,113,0.15);
  border: 1px solid rgba(46,204,113,0.25);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.auth-left-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.auth-left-title span { color: var(--green); }

.auth-left-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.auth-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 14px;
}

.auth-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-badge-icon--light {
  background: rgba(255,255,255,0.1);
}

.auth-badge-text {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.35;
}

.auth-badge-text strong {
  color: var(--white);
  font-weight: 600;
  display: block;
  margin-bottom: 1px;
}

.auth-left-foot {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  position: relative;
}


/* ── PANNEAU DROIT (blanc) ────────────────────────────────── */
.auth-right {
  background: var(--white);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-right--scroll {
  overflow-y: auto;
  justify-content: flex-start;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.auth-right-inner {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}

.auth-right-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
  display: block;
}

.auth-right-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.auth-right-sub {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 2rem;
}


/* ── SÉLECTEUR PROF / ÉLÈVE ───────────────────────────────── */
.auth-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.auth-seg-btn {
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-light);
  transition: all var(--t-fast);
}

.auth-seg-btn.active {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.auth-seg-btn:hover:not(.active) {
  color: var(--text-mid);
}


/* ── FORMULAIRES ──────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.auth-input {
  padding: 10px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  background: #F9FAFB;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
  width: 100%;
}

.auth-input:focus {
  border-color: var(--navy);
  background: var(--white);
}

.auth-input--green:focus {
  border-color: var(--green);
}

.auth-input::placeholder { color: var(--text-muted); }

.auth-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-select {
  padding: 10px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  background: #F9FAFB;
  outline: none;
  width: 100%;
  cursor: pointer;
  appearance: none;
  background-image: 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='%23B0BDC8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.auth-select:focus {
  border-color: var(--navy);
  background-color: var(--white);
}

.auth-textarea {
  padding: 10px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  color: var(--text);
  font-family: var(--font);
  background: #F9FAFB;
  outline: none;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
  width: 100%;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.auth-textarea:focus {
  border-color: var(--green);
  background: var(--white);
}

.auth-textarea::placeholder { color: var(--text-muted); }

/* Section title dans le form */
.auth-form-section {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-top: 4px;
}

.auth-form-section-opt {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* Lien mot de passe oublié */
.auth-forgot {
  text-align: right;
  margin-top: -6px;
}

.auth-forgot-link {
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

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

/* Code élève */
.auth-code-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font);
  background: #F9FAFB;
  outline: none;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: border-color var(--t-fast);
}

.auth-code-input:focus {
  border-color: var(--green);
  background: var(--white);
}

.auth-code-input::placeholder {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-muted);
  text-transform: none;
}

/* Séparateur */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

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

/* Bouton principal */
.auth-btn-primary {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  background: var(--navy);
  color: var(--white);
  transition: background var(--t-fast);
}

.auth-btn-primary:hover { background: #0A2050; }

.auth-btn-primary--green { background: var(--green); }
.auth-btn-primary--green:hover { background: var(--green-hover); }

/* Lien bas de form */
.auth-link {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
}

.auth-link a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

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

/* Notice info */
.auth-notice {
  background: #F0F7FF;
  border: 1px solid #C5DEFF;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--blue);
  line-height: 1.5;
}

.auth-notice strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

/* Étapes d'inscription */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2rem;
}

.auth-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.auth-step-dot--done    { background: var(--green); color: var(--white); }
.auth-step-dot--current { background: var(--navy);  color: var(--white); }
.auth-step-dot--todo    { background: var(--border-light); color: var(--text-muted); }

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

.auth-step-line--done { background: var(--green); }

/* CGU checkbox */
.auth-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.5;
  cursor: pointer;
}

.auth-checkbox-real {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.auth-checkbox-custom {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--white);
  transition: border-color var(--t-fast), background var(--t-fast);
  display: block;
}

.auth-checkbox-real:checked + .auth-checkbox-custom {
  background: var(--green);
  border-color: var(--green);
}

.auth-check-row a {
  color: var(--blue);
}

.auth-check-row a:hover { text-decoration: underline; }


/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .auth-left {
    padding: 2rem 1.5rem;
    min-height: auto;
  }

  .auth-left-body { margin: 2rem 0; }

  .auth-badges { display: none; } /* simplifié sur mobile */

  .auth-right {
    padding: 2rem 1.5rem;
    justify-content: flex-start;
  }

  .auth-right-inner {
    max-width: 100%;
  }
}
