:root {
  --bg: #150c0a;
  --bg-alt: #1e1310;
  --card: #241713;
  --card-alt: #2c1c17;
  --border: #3a2620;
  --text: #f1e6df;
  --text-dim: #b8a297;
  --redwood: #9c3b2e;
  --redwood-light: #c9503c;
  --amber: #e0a343;
  --green: #4caf6d;
  --red: #e05252;
  --blue: #4a90c4;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

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

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--text-dim); }

/* ── NAVBAR ─────────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.6rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.6rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
}
.navbar-brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--redwood), var(--amber));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover;
}
.brand-accent { color: var(--amber); }
.navbar-links { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.nav-link {
  color: var(--text-dim);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-link:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav-link.active { color: var(--text); background: var(--card-alt); }
.nav-cta { color: var(--amber); font-weight: 700; }
.navbar-user { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.6rem; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-placeholder-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--redwood); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.page-wrap { max-width: 1080px; margin: 0 auto; padding: 1.8rem 1.6rem 4rem; }
.site-footer { text-align: center; padding: 2rem 1rem; color: var(--text-dim); font-size: 0.85rem; border-top: 1px solid var(--border); margin-top: 3rem; }

.flash { padding: 0.8rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-size: 0.92rem; }
.flash-success { background: rgba(76, 175, 109, 0.15); color: var(--green); border: 1px solid rgba(76, 175, 109, 0.35); }
.flash-error { background: rgba(224, 82, 82, 0.15); color: var(--red); border: 1px solid rgba(224, 82, 82, 0.35); }

/* ── CARDS ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1.2rem; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ── STAT TILES ─────────────────────────────────────────────────────────── */
.stat-tile { background: var(--card-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--amber); }
.stat-label { font-size: 0.82rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-dim); }
input, select, textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--redwood-light); }
textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.3rem; }
.form-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 160px; }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--redwood);
  color: #fff;
}
.btn:hover { background: var(--redwood-light); text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--card-alt); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #f06868; }
.btn-discord { background: #5865F2; }
.btn-discord:hover { background: #6b74f5; }

/* ── TABLES ─────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }
.table-wrap { overflow-x: auto; }

/* ── BADGES ─────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.badge-role-employe { background: rgba(74, 144, 196, 0.18); color: var(--blue); }
.badge-role-manager { background: rgba(224, 163, 67, 0.18); color: var(--amber); }
.badge-role-co_pdg { background: rgba(156, 59, 46, 0.25); color: var(--redwood-light); }
.badge-role-pdg { background: rgba(224, 82, 82, 0.2); color: var(--red); }
.badge-partner { background: rgba(76, 175, 109, 0.18); color: var(--green); }

.status-nouvelle { background: rgba(74, 144, 196, 0.18); color: var(--blue); }
.status-validee { background: rgba(224, 163, 67, 0.18); color: var(--amber); }
.status-en_preparation { background: rgba(224, 163, 67, 0.28); color: var(--amber); }
.status-expediee { background: rgba(156, 59, 46, 0.25); color: var(--redwood-light); }
.status-livree { background: rgba(76, 175, 109, 0.18); color: var(--green); }
.status-annulee { background: rgba(224, 82, 82, 0.18); color: var(--red); }

/* ── PRICING TABLE ──────────────────────────────────────────────────────── */
.tier-table td.active-tier, .tier-table tr.active-tier td { color: var(--amber); font-weight: 700; }

/* ── AUTH ───────────────────────────────────────────────────────────────── */
.auth-wrap { display: flex; justify-content: center; padding: 3rem 1rem; }
.auth-card { max-width: 420px; text-align: center; }
.auth-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.6rem; }
.auth-text { margin-bottom: 1.4rem; }

/* ── LANDING ────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1 { font-size: 2.3rem; }
.hero .brand-accent { color: var(--amber); }

/* ── QUOTE / TOTAL BOX ──────────────────────────────────────────────────── */
.quote-box { background: var(--card-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.quote-line { display: flex; justify-content: space-between; padding: 0.35rem 0; font-size: 0.92rem; color: var(--text-dim); }
.quote-line.total { font-size: 1.3rem; font-weight: 800; color: var(--amber); border-top: 1px solid var(--border); margin-top: 0.5rem; padding-top: 0.7rem; }
.quote-line.discount { color: var(--green); }

/* ── ACTIVITY / TIMELINE ────────────────────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.timeline li:last-child { border-bottom: none; }
.timeline time { color: var(--text-dim); font-size: 0.78rem; display: block; }

.text-dim { color: var(--text-dim); }
.mt-1 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-dim); }
