/* ============================================================
   R-Advertising Data API - ecrans d'authentification.
   Autonome : ces pages ne chargent pas style.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #124014;
  --accent:  #3F8F43;
  --accent-subtle: #E3F1E4;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-700: #334155;
  --slate-900: #0F172A;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--slate-700);
  background: linear-gradient(160deg, #1D5E21 0%, #124014 45%, #0B2A0D 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.auth-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(8, 20, 33, 0.35);
  width: 100%;
  max-width: 400px;
  padding: 34px 32px 28px;
}

.auth-brand {
  margin-bottom: 24px;
}
.auth-brand img {
  /* Ratio du logo : 712x217, soit 3,28. Hauteur seule, largeur automatique,
     pour ne jamais l'etirer. */
  height: 38px;
  width: auto;
  display: block;
}

.auth-card h1 { font-size: 20px; font-weight: 600; color: var(--slate-900); letter-spacing: -0.3px; }
.auth-card .lead { color: var(--slate-500); font-size: 13px; margin-top: 5px; margin-bottom: 22px; }

.input-group { margin-bottom: 15px; }
.input-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--slate-500);
  margin-bottom: 5px;
}
.input-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  color: var(--slate-900);
}
.input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* Champ de saisie du code OTP : chiffres espaces, lisibles d'un coup d'oeil. */
.otp-input {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 26px !important;
  letter-spacing: 10px;
  padding: 12px 10px !important;
  font-weight: 600;
}

.submit-btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.submit-btn:hover { background: #1D5E21; }
.submit-btn.accent { background: var(--accent); }
.submit-btn.accent:hover { background: #2E6B31; }

.auth-alert {
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid;
}
.auth-alert-error   { background: #FEE2E2; color: #7F1D1D; border-color: #B91C1C; }
.auth-alert-success { background: #DCFCE7; color: #14532D; border-color: #15803D; }
.auth-alert-info    { background: #DBEAFE; color: #1E3A8A; border-color: #1D4ED8; }

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 18px;
  font-size: 12.5px;
}
.form-options a { color: var(--accent); text-decoration: none; }
.form-options a:hover { text-decoration: underline; }

.auth-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--slate-200);
  text-align: center;
  font-size: 12.5px;
}
.auth-footer a { color: var(--slate-500); text-decoration: none; }
.auth-footer a:hover { color: var(--primary); }

/* Choix du canal OTP (email / SMS) */
.channel-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.channel {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.channel:hover { border-color: var(--accent); background: #F8FEFE; }
.channel-icon {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: var(--accent-subtle);
  color: #2E6B31;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.channel-title { font-size: 13.5px; font-weight: 600; color: var(--slate-900); }
.channel-dest { font-size: 12px; color: var(--slate-500); }

.otp-meta { font-size: 12.5px; color: var(--slate-500); margin-bottom: 18px; }
.otp-meta strong { color: var(--slate-900); }
.resend-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12.5px; }
.resend-row button {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
}
.resend-row button:hover { text-decoration: underline; }
.resend-row a { color: var(--slate-500); text-decoration: none; }
.resend-row a:hover { color: var(--primary); }
