/* ============================================================
   style.css — Styles globaux
   ============================================================ */

/* ---------- Reset & variables ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #f5f6fa;
  --card-bg:     #ffffff;
  --border:      #e2e6ef;
  --text:        #1a1d27;
  --text-muted:  #6b7280;
  --primary:     #2563eb;
  --primary-hover: #1d4ed8;
  --danger:      #dc2626;
  --radius:      12px;
  --shadow:      0 2px 12px rgba(0, 0, 0, 0.07);
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---------- Layout ---------- */
.page-center {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  width: 100%;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

/* ---------- Auth layout (2 colonnes) ---------- */
.auth-container {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 820px;
}

@media (max-width: 600px) {
  .auth-container {
    flex-direction: column;
  }
}

/* ---------- Form elements ---------- */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fff;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  width: 100%;
  padding: 11px;
  margin-top: 6px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

/* ---------- Error messages ---------- */
.error-msg {
  display: none;
  margin-top: 10px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: var(--danger);
  font-size: 0.85rem;
}

/* ---------- Connected page ---------- */
.connected-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px;
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.connected-box .icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.connected-box h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

.connected-box p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}