/*
 * assets/css/login.css
 * Styles de la page connexion / inscription
 */

:root {
  --bg:           #f7f9fc;
  --surface:      #fff;
  --border:       #e2e8f0;
  --text:         #0f172a;
  --muted:        #64748b;
  --primary:      #22c55e;
  --primary-dark: #16a34a;
  --accent:       #0ea5e9;
  --accent-dark:  #0369a1;
  --danger:       #ef4444;
  --radius:       14px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 'DM Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ──────────────────────────────────────────── */
.login-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.login-nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.login-nav-logo img  { height: 32px; width: auto; }
.login-nav-logo span { font-weight: 800; font-size: 17px; color: #0c4a6e; }
.login-nav-back {
  font-size: 13px; color: var(--accent-dark);
  text-decoration: none; padding: 7px 14px;
  border-radius: 8px; border: 1.5px solid var(--border);
  font-weight: 600; transition: .15s;
}
.login-nav-back:hover { background: #f0f9ff; border-color: var(--accent); text-decoration: none; }

/* ── Layout ──────────────────────────────────────────────── */
.login-page {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ""; position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,197,94,.06) 0%, transparent 70%);
  border-radius: 50%;
}
.login-page::after {
  content: ""; position: absolute; bottom: -200px; left: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(14,165,233,.05) 0%, transparent 70%);
  border-radius: 50%;
}

.login-container {
  display: grid; gap: 48px;
  grid-template-columns: 1fr;
  max-width: 480px; width: 100%;
  position: relative; z-index: 1;
}
@media (min-width: 960px) {
  .login-container { max-width: 960px; grid-template-columns: 1fr 1fr; align-items: center; }
}

/* ── Panneau gauche ──────────────────────────────────────── */
.login-info { display: none; }
@media (min-width: 960px) { .login-info { display: flex; flex-direction: column; gap: 20px; } }

.login-info h1 { font-size: 32px; font-weight: 800; color: #0c4a6e; line-height: 1.2; margin-bottom: 8px; }
.login-info h1 strong { color: var(--primary); }
.login-info-sub { font-size: 16px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }

.login-features   { display: flex; flex-direction: column; gap: 12px; }
.login-feature    { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 500; color: var(--text); }
.login-feature-ico {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #ecfdf5, #e0f2fe);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

.login-trust { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.login-trust-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* ── Carte auth ──────────────────────────────────────────── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(15,23,42,.08);
  overflow: hidden;
}

.tab-nav { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.tab-btn {
  appearance: none; background: transparent; border: none;
  padding: 16px; font-weight: 800; font-size: 15px;
  color: var(--muted); cursor: pointer; transition: .2s;
  border-bottom: 3px solid transparent; font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
  background: linear-gradient(180deg, #f0f9ff, transparent);
}

.tab-body { padding: 28px 28px 32px; }
.pane { display: none; }
.pane.active { display: block; }
.pane h2 { font-size: 22px; font-weight: 800; color: #0c4a6e; text-align: center; margin-bottom: 20px; }

/* ── Formulaires ─────────────────────────────────────────── */
.field         { margin-bottom: 16px; }
.field-label   { display: block; font-weight: 700; font-size: 13px; color: #334155; margin-bottom: 6px; letter-spacing: .2px; }
.field-input   {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  font-size: 15px; font-family: inherit; outline: none;
  transition: .15s; background: var(--surface); color: var(--text);
}
.field-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.field-input::placeholder { color: #94a3b8; }

select.field-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pw-wrap     { position: relative; }
.pw-toggle   {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--accent);
  font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px; font-family: inherit;
}

.btn-submit {
  display: block; width: 100%; padding: 14px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 12px; font-size: 16px; font-weight: 800;
  cursor: pointer; font-family: inherit; transition: .15s;
  box-shadow: 0 6px 20px rgba(34,197,94,.25); margin-top: 8px;
}
.btn-submit:hover  { background: var(--primary-dark); box-shadow: 0 8px 24px rgba(34,197,94,.3); }
.btn-submit:active { transform: translateY(1px); }

.switch-hint { margin-top: 16px; text-align: center; font-size: 14px; color: var(--muted); }
.switch-hint a { color: var(--accent-dark); font-weight: 700; }
.switch-hint a:hover { text-decoration: underline; }

.alert    { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; line-height: 1.5; }
.alert-err { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-ok  { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* ── Footer ──────────────────────────────────────────────── */
.login-foot { text-align: center; padding: 20px; font-size: 12px; color: var(--muted); }
.login-foot a { color: var(--accent); font-weight: 600; margin: 0 6px; }
.login-foot a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .login-page { padding: 24px 16px; }
  .tab-body   { padding: 20px 18px 24px; }
  .field-row  { grid-template-columns: 1fr; }
}
