:root {
  --bg: #f7f7f5;
  --card-bg: #ffffff;
  --text: #1c1c1e;
  --text-muted: #6b6b70;
  --border: #e2e2e0;
  --accent: #2b2b2e;

  --achat-fort: #1a7a3c;
  --achat: #4f9d5f;
  --neutre: #8a8a8e;
  --vente: #d97a2b;
  --vente-fort: #c23b3b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page--wide { max-width: 900px; }

header.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header.top h1 {
  font-size: 1.4rem;
  margin: 0;
}

header.top .user-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

header.top .user-info button {
  margin-left: 0.75rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.85rem;
}

h1, h2 { font-weight: 600; }

form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  max-width: 380px;
  margin: 0 auto;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  margin-top: 1rem;
}

label:first-of-type { margin-top: 0; }

input[type="email"], input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
}

button.primary {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.7rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

button.primary:hover { opacity: 0.9; }

.tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tabs button {
  background: none;
  border: none;
  font-size: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
}

.tabs button.active {
  background: var(--card-bg);
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--border);
}

.message {
  max-width: 380px;
  margin: 1rem auto 0;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}

.message--error { background: #fdecea; color: #a12a2a; }
.message--success { background: #e8f5e9; color: #256029; }

.centered { text-align: center; }

/* Assets list */

.asset-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.asset-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.asset-card__title {
  font-size: 1.2rem;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
}

.badge--achat-fort { background: var(--achat-fort); }
.badge--achat { background: var(--achat); }
.badge--neutre { background: var(--neutre); }
.badge--vente { background: var(--vente); }
.badge--vente-fort { background: var(--vente-fort); }

.asset-card__meta {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.asset-card__raisons {
  margin-top: 1rem;
  padding-left: 1.1rem;
}

.asset-card__raisons li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.asset-card__backtest {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.7rem;
}

.asset-card--error {
  color: var(--text-muted);
  font-style: italic;
}

a { color: var(--accent); }

.footer-note {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
