/* Espace client gaelwebdesigner.fr — palette identique au site principal */
:root {
  --bg: #0a0e17;
  --bg-2: #0f1522;
  --card: #141b2d;
  --card-2: #1a2340;
  --border: rgba(255,255,255,0.08);
  --text: #ffffff;
  --text-dim: #a5b0c5;
  --text-mute: #6b7894;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --accent-3: #f472b6;
  --warm: #fb923c;
  --green: #34d399;
  --red: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Header ─── */
.ac-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.ac-logo {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px;
  color: var(--text); letter-spacing: -0.02em;
}
.ac-logo span { color: var(--text-mute); font-weight: 500; margin-left: 6px; font-size: 14px; }
.ac-header-actions { display: flex; gap: 12px; align-items: center; }
.ac-header-actions .ac-user-email { color: var(--text-dim); font-size: 13px; }

/* ─── Auth pages (login / signup) ─── */
.ac-auth-main {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 80px); padding: 40px 20px;
}
.ac-auth-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 20px 50px -20px rgba(34, 211, 238, 0.18);
}
.ac-auth-card h1 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.ac-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }

label {
  display: block; margin-bottom: 14px;
  color: var(--text-dim); font-size: 13px; font-weight: 500;
}
label small { display: block; font-weight: 400; font-size: 11px; color: var(--text-mute); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"] {
  display: block; width: 100%; margin-top: 6px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.12);
}
.ac-row { display: flex; gap: 12px; }
.ac-row label { flex: 1; }

.ac-btn-primary {
  width: 100%; margin-top: 8px;
  background: var(--accent); color: #0a0e17;
  border: none; padding: 12px 16px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}
.ac-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(34,211,238,0.5); }
.ac-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.ac-btn-secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.ac-btn-secondary:hover { background: var(--card-2); border-color: var(--accent); }

.ac-btn-danger {
  background: transparent; color: var(--red); border: 1px solid rgba(248,113,113,0.3);
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.ac-btn-danger:hover { background: rgba(248,113,113,0.08); border-color: var(--red); }

.ac-error {
  background: rgba(248,113,113,0.08); color: var(--red);
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px;
  margin: 8px 0 14px; min-height: 0;
}
.ac-error:empty { display: none; }

.ac-success {
  background: rgba(52,211,153,0.08); color: var(--green);
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px;
  margin: 8px 0 14px;
}

.ac-foot { margin-top: 22px; font-size: 13px; color: var(--text-dim); text-align: center; }

/* ─── Dashboard ─── */
.ac-dash-main {
  max-width: 980px; margin: 0 auto; padding: 32px 24px 60px;
}
.ac-dash-title { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.ac-dash-greet { color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

.ac-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.ac-card h2 {
  font-size: 17px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.ac-card h2 .ac-badge {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
}

.ac-badge.active   { background: rgba(52,211,153,0.15); color: var(--green); }
.ac-badge.canceled { background: rgba(107,120,148,0.15); color: var(--text-mute); }
.ac-badge.pending  { background: rgba(251,146,60,0.15); color: var(--warm); }
.ac-badge.past_due { background: rgba(248,113,113,0.15); color: var(--red); }

.ac-row-info {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.ac-row-info:last-child { border-bottom: none; }
.ac-row-info .ac-label { color: var(--text-dim); }
.ac-row-info .ac-value { color: var(--text); font-weight: 500; }
.ac-row-info .ac-value.muted { color: var(--text-mute); font-style: italic; }

.ac-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Tableau factures ─── */
.ac-table {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
.ac-table th {
  text-align: left; color: var(--text-dim); font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
}
.ac-table td {
  padding: 12px; border-bottom: 1px solid var(--border);
}
.ac-table tr:last-child td { border-bottom: none; }
.ac-table .ac-amount { font-variant-numeric: tabular-nums; font-weight: 500; }
.ac-table .ac-status-paid    { color: var(--green); }
.ac-table .ac-status-pending { color: var(--warm); }
.ac-table .ac-status-failed  { color: var(--red); }
.ac-table .ac-empty { color: var(--text-mute); font-style: italic; padding: 28px 12px; text-align: center; }

.ac-link-icon {
  color: var(--accent); font-size: 13px; font-weight: 500;
}

/* ─── Profil edition ─── */
.ac-profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
}
.ac-profile-grid label.full { grid-column: 1 / -1; }

@media (max-width: 600px) {
  .ac-profile-grid { grid-template-columns: 1fr; }
  .ac-row { flex-direction: column; gap: 0; }
  .ac-table th:nth-child(3), .ac-table td:nth-child(3) { display: none; }
}

/* ─── Loading ─── */
.ac-loading { color: var(--text-mute); font-style: italic; font-size: 14px; }
