/* ═══════════════════════════════════════════════
   AR2C Maintenance — login.css
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:      #0d1117;
  --bg2:     #161b22;
  --bg3:     #1c2333;
  --border:  #30363d;
  --text:    #e6edf3;
  --text2:   #8b949e;
  --text3:   #6e7681;
  --accent:  #f0a443;
  --accent2: #e08620;
  --red:     #f85149;
  --red2:    #da3633;
  --font:    'Syne', sans-serif;
}

/* ─── THÈME LIGHT ─────────────────────────────────────────── */
[data-theme="light"] {
  --bg:      #f6f8fa;
  --bg2:     #ffffff;
  --bg3:     #f0f2f5;
  --border:  #d0d7de;
  --text:    #1a1f2e;
  --text2:   #57606a;
  --text3:   #8c959f;
  --accent:  #e08620;
  --accent2: #c97317;
  --red:     #cf222e;
  --red2:    #a40e26;
}

html, body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: background .2s, color .2s;
}

/* ── Layout ───────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* Panneau gauche : formulaire */
.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Panneau droit : branding */
.login-right {
  width: 380px;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  gap: 32px;
}

@media (max-width: 720px) {
  .login-right { display: none; }
}

/* ── Logo ─────────────────────────────────────── */

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-logo-mark {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #0d1117;
  flex-shrink: 0;
}

.login-logo-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

/* ── Titre ────────────────────────────────────── */

.login-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-title h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.login-title p {
  font-size: 13px;
  color: var(--text2);
}

/* ── Alerte erreur ────────────────────────────── */

.login-error {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: #2c1315;
  border: 1px solid var(--red2);
  color: var(--red);
  animation: fadeIn .2s ease;
}

/* ── Formulaire ───────────────────────────────── */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--text3);
}

.field input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 164, 67, .12);
}

.field input::placeholder {
  color: var(--text3);
}

/* ── Bouton ───────────────────────────────────── */

.login-btn {
  margin-top: 6px;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  width: 100%;
  background: var(--accent);
  color: #0d1117;
  letter-spacing: -0.2px;
  transition: background .15s, transform .1s;
}

.login-btn:hover  { background: var(--accent2); }
.login-btn:active { transform: scale(0.99); }

/* ── Panneau droit : features ─────────────────── */

.login-illus {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.feat {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.feat-ico {
  width: 34px;
  height: 34px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.feat-txt strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}

.feat-txt span {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
}

/* ── Animation ────────────────────────────────── */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── iOS : empêche le zoom auto au focus ─────────────────── */
@media (max-width: 768px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}