/* =====================================================
   VARIABLES
===================================================== */
:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --primary: #1f2937;
  --secondary: #374151;
  --accent: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
}

/* =====================================================
   RESET / BASE
===================================================== */
* {
  box-sizing: border-box;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h2, h3 {
  margin-top: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}


/* =====================================================
   LAYOUT
===================================================== */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 2rem;
}

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

.card-header {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary);
}

.card {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  color: #6b7280;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 0.3rem;
}

/* =====================================================
   HEADER / NAVIGATION
===================================================== */
.header {
  background: var(--primary);
  color: #fff;
  padding: 1rem 2rem;
}

.header-inner {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.header-logo:hover {
  text-decoration: underline;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.nav-link {
  color: #e5e7eb;
  font-weight: 500;
}

.nav-link:hover {
  color: #fff;
}

.nav-user {
  color: #f9fafb;
  font-weight: 600;
}

.nav-role {
  color: #9ca3af;
  font-weight: 500;
}

.nav-separator {
  color: #9ca3af;
}

/* =====================================================
   FOOTER
===================================================== */
.footer {
  background: #111827;
  color: #d1d5db;
  padding: 1.5rem 2rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-left {
  text-align: left;
}

.footer-center {
  text-align: center;
}

.footer-center a {
  color: #9ca3af;
  text-decoration: none;
  font-weight: 500;
}

.footer-center a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-right {
  text-align: right;
  color: #9ca3af;
}

.footer small {
  color: #9ca3af;
}

/* =====================================================
   FORMS
===================================================== */
label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-help {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: -0.5rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
}

input[type="checkbox"] {
  width: auto;
}

/* =====================================================
   BUTTONS
===================================================== */
button,
.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  display: inline-block;
  font-size: 0.9rem;
}

.btn.primary {
  background: var(--accent);
}

.btn.secondary,
button.secondary {
  background: var(--secondary);
}

.btn.danger,
button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =====================================================
   ALERTS
===================================================== */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #dcfce7;
  color: var(--success);
}

.alert-error {
  background: #fee2e2;
  color: var(--danger);
}

/* =====================================================
   TABLES
===================================================== */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  background: #f9fafb;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.table-actions a {
  margin-right: 0.5rem;
  font-size: 0.85rem;
}

.table-actions a.danger {
  color: var(--danger);
}

/* =====================================================
   BADGES
===================================================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.3rem;
}

.badge-admin {
  background: #fee2e2;
  color: #991b1b;
}

.badge-investor {
  background: #dbeafe;
  color: #1e40af;
}

.badge-entrepreneur {
  background: #dcfce7;
  color: #166534;
}

.badge-user {
  background: #e5e7eb;
  color: #374151;
}


/* =====================================================
   QUIZ
===================================================== */
.quiz-details {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.quiz-block {
  margin-bottom: 1rem;
}

.quiz-block strong {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.quiz-impact {
  background: #f0f9ff;
  border-left: 4px solid var(--accent);
  padding: 0.75rem;
  font-weight: 600;
}

/* =========================
   QUIZ STEPPER
========================= */
.quiz-progress {
  margin: 1.5rem 0 1rem;
}

.quiz-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.quiz-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.quiz-status {
  color: var(--muted);
  font-size: 0.85rem;
}

.progress-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.quiz-card {
  border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
  border-left: 6px solid var(--accent);
}

.quiz-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-card-title {
  font-weight: 800;
  color: var(--primary);
}

.quiz-card-pill {
  background: #eef2ff;
  color: #1e40af;
  border: 1px solid #c7d2fe;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.quiz-details {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.quiz-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .quiz-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quiz-block strong {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.quiz-block p {
  margin: 0;
  line-height: 1.5;
}

.quiz-impact {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: #f0f9ff;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  font-weight: 700;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.quiz-block ul {
  margin: 0.5rem 0 0 1.2rem;
  padding: 0;
}

.quiz-block li {
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

/* =====================================================
   rapport
===================================================== */
.factor-card {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.factor-card.good { border-left: 6px solid #22c55e; }
.factor-card.bad  { border-left: 6px solid #ef4444; }

.factor-card-inner {
  padding: 1.5rem;
}

.factor-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.factor-header h4 {
  margin: 0;
  font-size: 1.25rem;
}

.factor-desc {
  color: #64748b;
  margin-top: .4rem;
}

.tier-badge {
  padding: .4rem .8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .8rem;
}

.tier-strong { background:#dcfce7; color:#166534; }
.tier-critical { background:#fee2e2; color:#991b1b; }

.factor-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.metric-box {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
}

.metric-box small {
  color:#64748b;
  font-weight:600;
}

.metric-value {
  font-size:2rem;
  font-weight:700;
}

.metric-value.green { color:#22c55e; }
.metric-value.orange { color:#f97316; }

.verified {
  background:#dcfce7;
  color:#166534;
  display:inline-block;
  padding:.4rem .8rem;
  border-radius:999px;
  font-weight:600;
  margin-bottom:1rem;
}

.impact-bar {
  height:8px;
  background:#e5e7eb;
  border-radius:999px;
  overflow:hidden;
  margin:.5rem 0;
}

.impact-fill {
  height:100%;
  background:linear-gradient(90deg,#6366f1,#7c3aed);
}
/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  tr {
    margin-bottom: 1rem;
  }

  th {
    display: none;
  }

  td {
    border: none;
    padding: 0.4rem 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    text-align: center;
  }

}
