/* ============================================================
   Le Hub — styles d'authentification (Phase 1).
   Variante Bold avec photo voilée (background: photo + voile encre).
   Chargé uniquement par les templates auth/*.html — isolation
   parfaite, n'interfère pas avec le reste du Hub.
   ============================================================ */

/* ── Reset léger pour ce périmètre uniquement ── */
.auth-page, .auth-page * { box-sizing: border-box; }
.auth-page { margin: 0; padding: 0; min-height: 100vh; background: #fff; }

.auth-board {
  width: 100%; min-height: 100vh;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  color: #1C1C1A;
  display: grid; grid-template-columns: 60% 40%;
  background: #fff;
}

/* ───── Scene (gauche) : photo + voile + titres ───── */
.auth-scene {
  position: relative; overflow: hidden;
  padding: 54px 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 100vh;
  background: #1C1C1A; color: #fff;
}
.auth-photo { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.auth-photo img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: 38% center; display: block;
}
.auth-photo-veil {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(20,20,18,.78) 0%, rgba(20,20,18,.55) 55%, rgba(20,20,18,.7) 100%);
}
.auth-scene-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: space-between;
  flex: 1; gap: 30px;
}
.auth-scene-top { display: flex; align-items: center; gap: 12px; }
.auth-scene-logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.auth-scene-logo img { width: 30px; height: 30px; object-fit: contain; }
.auth-scene-brand {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 900; font-size: 18px;
  letter-spacing: -.005em; line-height: 1; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
}
.auth-scene-brand small {
  display: block; font-family: Arial, sans-serif; font-weight: 600; font-size: 10px;
  text-transform: uppercase; letter-spacing: .18em;
  color: rgba(255,255,255,.55); margin-top: 3px;
}

.auth-headline-wrap { position: relative; z-index: 2; max-width: 540px; }
.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.65); margin-bottom: 18px;
}
.auth-eyebrow-bar { width: 28px; height: 2px; background: #A12423; flex-shrink: 0; }
.auth-h1 {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 900;
  font-size: clamp(56px, 8vw, 104px); line-height: .88; letter-spacing: -.035em;
  color: #fff; margin: 0;
  display: flex; flex-direction: column;
}
.auth-h1-l2 { display: block; color: #fff; position: relative; padding-left: 38px; }
.auth-h1-l2::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 24px; height: .16em; background: #A12423;
}
.auth-tag {
  font-size: 18px; color: rgba(255,255,255,.8); margin: 24px 0 0;
  font-family: Arial, sans-serif; font-weight: 400; line-height: 1.4;
  max-width: 36ch;
}
.auth-context {
  font-size: 13.5px; color: rgba(255,255,255,.55); margin: 10px 0 0;
  max-width: 40ch; line-height: 1.55;
}
.auth-context strong { color: #fff; font-weight: 600; }

.auth-scene-foot {
  margin-top: auto; align-items: center;
  display: flex; justify-content: space-between; gap: 18px;
  position: relative; z-index: 2;
  font-size: 11.5px; color: rgba(255,255,255,.5);
}
.auth-scene-foot strong { color: #fff; font-weight: 700; }

/* ───── Form (droite) ───── */
.auth-form {
  background: #fff;
  padding: 48px 44px;
  display: flex; flex-direction: column; gap: 18px;
  min-height: 100vh; overflow-y: auto;
}
.auth-form-head { display: flex; flex-direction: column; gap: 6px; }
.auth-step {
  display: inline-block;
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 700;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: #A12423; padding: 5px 11px; background: #FBE0DE;
  border-radius: 999px; margin-bottom: 14px; width: max-content;
}
.auth-form-h1 {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 800;
  font-size: 36px; line-height: 1; letter-spacing: -.018em;
  margin: 0; color: #1C1C1A;
}
.auth-form-h1 .accent { color: #A12423; }
.auth-sub {
  font-size: 13.5px; color: rgba(28,28,26,.6); line-height: 1.55; margin: 0;
}

/* ── Inputs ── */
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(28,28,26,.55);
}
.auth-input {
  border-radius: 0; border-width: 0 0 2px 0; border-color: #C9C6BB; border-style: solid;
  padding: 0 2px; height: 46px; background: transparent;
  font-size: 15px; color: #1C1C1A; font-weight: 600;
  font-family: Arial, sans-serif;
  width: 100%; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.auth-input::placeholder { color: rgba(28,28,26,.35); font-weight: 400; }
.auth-input:hover { border-color: #7A7973; }
.auth-input:focus { border-color: #A12423; box-shadow: 0 1px 0 0 #A12423; }
.auth-input.is-error { border-color: #A12423; box-shadow: 0 1px 0 0 #A12423; }

.auth-input-wrap { position: relative; }
.auth-input-eye {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; padding: 6px; cursor: pointer;
  color: rgba(28,28,26,.5); border-radius: 5px;
}
.auth-input-eye:hover { color: #1C1C1A; background: #F7F6F2; }
.auth-input-eye svg { width: 18px; height: 18px; }

.auth-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.auth-row.between { justify-content: space-between; }
.auth-checkbox {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  color: rgba(28,28,26,.7); font-size: 12.5px; font-weight: 500;
}
.auth-checkbox input {
  accent-color: #A12423; width: 15px; height: 15px; cursor: pointer; margin: 0;
}
.auth-link {
  color: #A12423; font-size: 12.5px; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .12s;
}
.auth-link:hover { border-color: currentColor; }

/* ── CTA ── */
.auth-cta {
  position: relative;
  height: 50px; background: #A12423; color: #fff;
  border: 0; border-radius: 9px;
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 700; font-size: 15px;
  letter-spacing: -.005em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 14px rgba(161,36,35,.25);
  transition: background .14s, transform .14s, box-shadow .14s;
  cursor: pointer; width: 100%;
}
.auth-cta:hover { background: #8C1512; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(161,36,35,.35); }
.auth-cta:active { transform: translateY(0); }
.auth-cta svg { width: 17px; height: 17px; }
.auth-cta-ghost {
  height: 42px; background: transparent; color: rgba(28,28,26,.7);
  border: 1px solid #C9C6BB; border-radius: 8px;
  font-family: Arial, sans-serif; font-weight: 600; font-size: 13.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; padding: 0 16px; text-decoration: none;
  transition: all .14s;
}
.auth-cta-ghost:hover { color: #1C1C1A; border-color: #1C1C1A; background: #F7F6F2; }
.auth-cta-ghost svg { width: 14px; height: 14px; }

/* ── Retour ── */
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(28,28,26,.55); font-size: 12.5px; font-weight: 600;
  background: transparent; border: 0; padding: 0;
  text-decoration: none; cursor: pointer;
  border-bottom: 1px solid transparent; transition: all .12s;
  align-self: flex-start;
}
.auth-back:hover { color: #1C1C1A; border-color: currentColor; }
.auth-back svg { width: 13px; height: 13px; }

/* ── Notices ── */
.auth-notice {
  display: flex; gap: 11px; padding: 12px 14px;
  background: #F7F6F2; border: 1px solid #EEEDE7; border-radius: 9px;
  font-size: 12.5px; line-height: 1.5; color: rgba(28,28,26,.7);
}
.auth-notice.is-error { background: #FDF5F5; border-color: #F2A2A0; color: #8C1512; }
.auth-notice.is-success { background: #F5F9EE; border-color: #C9DEB3; color: #2A5318; }
.auth-notice .ic { flex-shrink: 0; width: 16px; height: 16px; margin-top: 1px; }

/* ── Footer form (lien sous bouton) ── */
.auth-foot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; color: rgba(28,28,26,.6); margin-top: auto;
  padding-top: 18px;
}

/* ── OTP (6 cases) ── */
.otp { display: flex; gap: 8px; justify-content: flex-start; flex-wrap: nowrap; }
.otp input {
  border-radius: 0; border-width: 0 0 3px 0; border-color: #C9C6BB; border-style: solid;
  height: 60px; width: 42px; background: transparent;
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 800; font-size: 28px;
  text-align: center; color: #1C1C1A; font-variant-numeric: tabular-nums;
  outline: none; caret-color: #A12423;
  transition: all .14s; padding: 0;
}
.otp input:hover { border-color: #7A7973; }
.otp input:focus { border-color: #A12423; background: #FBE0DE; }
.otp input.is-filled { background: #F7F6F2; border-color: #1C1C1A; }
.otp.is-error input { border-color: #A12423; animation: auth-shake .35s; }
@keyframes auth-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ── Renvoi (countdown) ── */
.auth-resend {
  font-size: 12.5px; color: rgba(28,28,26,.55);
  display: flex; align-items: center; gap: 6px;
}
.auth-resend strong { color: #A12423; font-weight: 600; }
.auth-resend button {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  color: #A12423; font-weight: 600; font-family: inherit; font-size: inherit;
  border-bottom: 1px solid transparent; transition: border-color .12s;
}
.auth-resend button:hover { border-color: currentColor; }

/* ── Bandeau TOTP (en haut du form totp) ── */
.auth-totp-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; background: #1C1C1A; color: #fff;
  position: relative; overflow: hidden;
}
.auth-totp-strip::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #A12423;
}
.auth-totp-strip-tag {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 800; font-size: 10px;
  letter-spacing: .18em; background: rgba(255,255,255,.12); padding: 3px 8px;
}
.auth-totp-strip-name { flex: 1; font-family: 'Roboto Slab', Georgia, serif; font-weight: 700; font-size: 13px; }
.auth-totp-strip-tick {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 800; font-size: 14px;
  color: #A12423; font-variant-numeric: tabular-nums;
}

/* ── Stepper visuel (multi-étapes) ── */
.auth-step-track { display: flex; gap: 6px; margin-top: auto; padding-top: 18px; }
.auth-step-bar { flex: 1; height: 3px; background: #EEEDE7; transition: background .2s; }
.auth-step-bar.is-active { background: #A12423; }
.auth-step-bar.is-done { background: #1C1C1A; }

/* ── Écran « lien envoyé » / success ── */
.auth-success {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 18px; padding: 40px 0; flex: 1;
}
.auth-success-ic {
  width: 64px; height: 64px; border-radius: 50%;
  background: #DEEBD0; color: #3E6B25;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.auth-success-ic::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(127,185,87,.2), transparent 70%);
}
.auth-success-ic svg { width: 32px; height: 32px; position: relative; z-index: 1; }
.auth-success h2 {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 800;
  font-size: 22px; margin: 0; color: #1C1C1A; letter-spacing: -.005em;
}
.auth-success p { margin: 0; color: rgba(28,28,26,.6); font-size: 13.5px; line-height: 1.55; }
.auth-success-meta {
  margin-top: 8px; font-size: 11.5px; color: rgba(28,28,26,.5);
  display: flex; align-items: center; gap: 6px;
}

/* ── Captcha (forgot password) ── */
.auth-captcha {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #F7F6F2; border: 1px solid #EEEDE7; border-radius: 9px;
}
.auth-captcha-q {
  font-family: 'Roboto Slab', Georgia, serif; font-weight: 800; font-size: 18px;
  color: #1C1C1A; letter-spacing: .02em;
}
.auth-captcha input {
  border-width: 0 0 2px 0; border-color: #C9C6BB; border-style: solid;
  height: 36px; width: 80px; padding: 0 4px; background: transparent;
  font-size: 16px; font-weight: 700; text-align: center;
  outline: none; font-family: 'Roboto Slab', Georgia, serif;
}
.auth-captcha input:focus { border-color: #A12423; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .auth-board { grid-template-columns: 1fr; }
  .auth-scene { display: none; }
  .auth-form { padding: 32px 24px; min-height: 100vh; }
  .auth-form-h1 { font-size: 28px; }
}
