/* ===========================
   MEMOWAYS — Fonction:Cinéma OSS Study
   Design System
   =========================== */

:root {
  --gold: #f59e0b;
  --gold-light: #fde68a;
  --silver: #94a3b8;
  --bronze: #cd7f32;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --green: #22c55e;
  --green-light: #bbf7d0;
  --red: #ef4444;
  --red-light: #fee2e2;
  --yellow: #f59e0b;
  --yellow-light: #fef3c7;
  --blue: #3b82f6;
  --blue-light: #dbeafe;

  --bg-dark: #0f172a;
  --bg-dark-2: #1e293b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --bg-accent: #1d1466;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #f1f5f9;
  --text-muted: #94a3b8;

  --border: #e2e8f0;
  --border-dark: #334155;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);

  --font: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(99,102,241,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(245,158,11,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.badge-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99,102,241,0.18);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  max-width: 700px;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--gold), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.pill-green { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.pill-blue  { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.pill-orange{ background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #4f46e5; text-decoration: none; color:#fff; }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); text-decoration: none; color:#fff; }

/* ===========================
   CONTEXT BAR
   =========================== */
.context-bar {
  background: var(--bg-dark-2);
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  padding: 1.5rem 0;
}

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

.ctx-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-light);
}

.ctx-item i {
  font-size: 1.4rem;
  color: var(--gold);
  width: 28px;
  text-align: center;
}

.ctx-item div { font-size: 0.95rem; font-weight: 600; color: #fff; }
.ctx-item strong { color: #fff; font-size: 0.95rem; }

/* ===========================
   SECTIONS
   =========================== */
.section { padding: 5rem 0; }
.section-light { background: var(--bg-light); }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-accent { background: var(--bg-accent); color: var(--text-light); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header.light { color: var(--text-light); }
.section-header.light p { color: var(--text-muted); }

.section-tag {
  display: inline-block;
  background: rgba(99,102,241,0.1);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 100px;
  padding: 0.25rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-dark .section-tag,
.section-accent .section-tag {
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.35);
  color: var(--accent-light);
}

.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* ===========================
   VERDICT CARDS
   =========================== */
.verdict-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.vcard {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.vcard-gold { border-color: var(--gold); box-shadow: 0 4px 24px rgba(245,158,11,0.15); }
.vcard-silver { border-color: var(--silver); }
.vcard-bronze { border-color: var(--bronze); }

.vcard-rank { font-size: 2rem; }
.vcard-logo-name { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

.vcard-score-big {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.vcard-score-big span { font-size: 1rem; font-weight: 500; color: var(--text-secondary); }

.vcard-gold .vcard-score-big { color: var(--gold); }
.vcard-silver .vcard-score-big { color: var(--silver); }

.vcard-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }

.vcard-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
}
.tag-green { background: var(--green-light); color: #166534; }
.tag-yellow { background: var(--yellow-light); color: #92400e; }
.tag-blue  { background: var(--blue-light);  color: #1e40af; }

.key-insight {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--yellow-light);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  font-size: 0.95rem;
  color: #451a03;
}

.key-insight i { color: var(--yellow); font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }

/* ===========================
   SCORE BARS
   =========================== */
.score-bars-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 760px;
  margin: 0 auto;
}

.score-bar-item { }

.sb-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.sb-name { font-size: 1rem; font-weight: 600; color: var(--text-light); }
.sb-score { font-size: 1.1rem; font-weight: 800; color: #fff; }

.sb-track {
  height: 16px;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  overflow: hidden;
}

.sb-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s ease;
}

.sb-fill-gold   { background: linear-gradient(90deg, var(--gold), #fbbf24); }
.sb-fill-silver { background: linear-gradient(90deg, #64748b, var(--silver)); }
.sb-fill-bronze { background: linear-gradient(90deg, #92400e, var(--bronze)); }
.sb-fill-four   { background: linear-gradient(90deg, #334155, #475569); }

/* ===========================
   LEGEND
   =========================== */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.leg-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-5 { background: #166534; }
.dot-4 { background: #15803d; }
.dot-3 { background: #ca8a04; }
.dot-2 { background: #b45309; }
.dot-1 { background: var(--red); }
.dot-highlight { background: var(--gold); }
.dot-winner { background: var(--accent); }

/* ===========================
   FILTER BAR
   =========================== */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===========================
   MATRIX TABLE
   =========================== */
.matrix-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--bg-white);
}

.matrix-table thead tr {
  background: var(--bg-dark);
  color: var(--text-light);
}

.matrix-table th {
  padding: 1rem 1.2rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.th-chantier { min-width: 260px; }
.th-priority { min-width: 100px; }
.th-sol      { min-width: 88px; text-align: center; }
.th-budget   { min-width: 130px; text-align: right; font-size: 0.78rem; line-height: 1.3; }

/* Row styles */
.matrix-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.matrix-table tbody tr:hover { background: #f8fafc; }

.row-critique { background: rgba(239,68,68,0.02); }
.row-important { background: rgba(245,158,11,0.02); }
.row-highlight { background: rgba(245,158,11,0.06) !important; }

.row-detail { cursor: default; display: none; }
.row-detail.visible { display: table-row; }

td {
  padding: 0.9rem 1.2rem;
  vertical-align: middle;
}

.td-chantier { vertical-align: top; }

.chantier-num {
  display: inline-block;
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.4rem;
}

.chantier-title {
  font-weight: 700;
  display: block;
  color: var(--text-primary);
  margin-top: 0.2rem;
}

.chantier-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

.badge-critique {
  display: inline-block;
  background: var(--red-light);
  color: #991b1b;
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-important {
  display: inline-block;
  background: var(--yellow-light);
  color: #92400e;
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.td-score { text-align: center; }

.score-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-weight: 800;
  font-size: 1rem;
  min-width: 70px;
  padding: 0.4rem 0;
}

.sc-5 { color: #166534; }
.sc-4 { color: #15803d; }
.sc-3 { color: #ca8a04; }
.sc-2 { color: #b45309; }
.sc-1 { color: var(--red); }

.score-bar-mini {
  width: 60px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 100px;
  overflow: hidden;
}

.score-bar-mini div {
  height: 100%;
  background: currentColor;
  border-radius: 100px;
  opacity: 0.6;
}

/* ===========================
   DETAIL BLOCKS
   =========================== */
.detail-block {
  background: #f0f4ff;
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-block-highlight {
  background: #fffbeb;
  border-left-color: var(--gold);
}

.detail-alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #451a03;
  margin-bottom: 1rem;
}

.detail-alert-info {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.25);
  color: #1e3a5f;
}

.detail-alert-warning {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
  color: #7f1d1d;
}

.detail-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.dcol {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid var(--border);
}

.dcol h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dcol p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

.dcol ul {
  list-style: none;
  padding: 0;
}

.dcol ul li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  padding-left: 1rem;
  position: relative;
}

.dcol ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.dcol-winner {
  border-color: var(--gold);
  background: rgba(245,158,11,0.04);
}

.dcol-winner h4 { color: #92400e; }

.dcol-winner-small {
  border-color: var(--accent);
  background: rgba(99,102,241,0.04);
}

.dcol-winner-small h4 { color: var(--accent); }

.dcol-objects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.dcol-objects span {
  background: rgba(245,158,11,0.15);
  color: #92400e;
  border-radius: 100px;
  padding: 0.15rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.mw-insight {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.83rem;
  color: #312e81;
  margin-top: 1rem;
}

.mw-insight i { color: var(--accent); flex-shrink: 0; }

/* Progress phases */
.progress-phases {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pp {
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pp-num {
  font-weight: 700;
  color: var(--accent-light);
}

.pp-arrow {
  color: var(--text-muted);
  font-weight: 700;
}

/* ===========================
   SIMULATEUR
   =========================== */
.sim-solution-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.sim-sol-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.sim-sol-btn:hover { border-color: var(--accent); color: var(--accent); }
.sim-sol-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}

.sim-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

/* Chantiers list */
.sim-chantiers {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.sim-chantiers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 700;
}

.sim-check-all-wrap { display: flex; gap: 0.5rem; }

.sim-check-all,
.sim-check-none {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.sim-check-all:hover  { background: rgba(255,255,255,0.2); }
.sim-check-none:hover { background: rgba(239,68,68,0.3); }

.sim-chantier-list { display: flex; flex-direction: column; }

.sim-chantier-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}

.sim-chantier-item:last-child { border-bottom: none; }
.sim-chantier-item:hover { background: #f0f4ff; }
.sim-item-highlight { background: #fffbeb !important; }
.sim-item-highlight:hover { background: #fef3c7 !important; }

.sim-chantier-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.sim-chantier-item.unchecked {
  opacity: 0.45;
  background: #f8fafc !important;
}

.sim-badge {
  border-radius: 100px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sim-badge.critique  { background: var(--red-light);    color: #991b1b; }
.sim-badge.important { background: var(--yellow-light); color: #92400e; }

.sim-num {
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-dark);
  color: var(--text-light);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  flex-shrink: 0;
}

.sim-title { flex: 1; font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }

.sim-cost-display {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  min-width: 90px;
  text-align: right;
}

/* Result panel */
.sim-result {
  background: var(--bg-dark);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 1.5rem;
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-lg);
}

.sim-result-sol {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.sim-result-chantiers {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.sim-budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-dark);
  font-size: 0.88rem;
}
.sim-budget-row span { color: var(--text-muted); }
.sim-budget-row strong { color: var(--text-light); font-size: 1rem; }

.sim-budget-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0 0.5rem;
  font-size: 0.9rem;
}
.sim-budget-total span { color: var(--text-muted); font-weight: 600; }
.sim-budget-total strong {
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 800;
}

.sim-result-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.4;
}
.sim-result-note i { flex-shrink: 0; margin-top: 0.1rem; color: var(--accent-light); }

.sim-disclaimer {
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.76rem;
  color: var(--gold-light);
  margin-top: 0.75rem;
  line-height: 1.4;
}
.sim-disclaimer.visible { display: flex; }
.sim-disclaimer i { flex-shrink: 0; margin-top: 0.1rem; }

/* Compare bars */
.sim-compare {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.sim-compare h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sim-compare h4 i { color: var(--accent); }

.sim-compare-bars { display: flex; flex-direction: column; gap: 0.9rem; }

.scb-row { display: flex; flex-direction: column; gap: 0.3rem; }
.scb-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
}
.scb-name { font-weight: 600; color: var(--text-primary); }
.scb-val  { font-weight: 700; color: var(--text-secondary); font-size: 0.82rem; }
.scb-track {
  height: 12px;
  background: #e2e8f0;
  border-radius: 100px;
  overflow: hidden;
}
.scb-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.5s ease;
}
.scb-erpnext  { background: linear-gradient(90deg, #6366f1, #818cf8); }
.scb-odoo     { background: linear-gradient(90deg, #8B5CF6, #a78bfa); }
.scb-civicrm  { background: linear-gradient(90deg, #059669, #34d399); }
.scb-dolibarr { background: linear-gradient(90deg, #0891b2, #22d3ee); }

@media (max-width: 900px) {
  .sim-body {
    grid-template-columns: 1fr;
  }
  .sim-result { position: static; }
}

/* ===========================
   COSTS
   =========================== */
.costs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.cost-card {
  background: var(--bg-dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.cost-card-recommended {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(245,158,11,0.2);
}

.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cc-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-light);
}

.cc-badge {
  background: var(--gold);
  color: var(--bg-dark);
  border-radius: 100px;
  padding: 0.2rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc-badge-alt    { background: var(--silver); }
.cc-badge-assoc  { background: #a855f7; color: #fff; }
.cc-badge-budget { background: #22c55e; color: #fff; }

.cc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.cc-table th {
  color: var(--text-muted);
  text-align: left;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-dark);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cc-table td {
  padding: 0.5rem 0;
  color: var(--text-light);
  border-bottom: 1px solid rgba(51,65,85,0.5);
}

.cc-table td:nth-child(2),
.cc-table td:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}

.tr-total td { font-weight: 800; color: var(--gold); border-top: 2px solid var(--border-dark); }

.cc-realistic {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.82rem;
  color: var(--gold-light);
}

.cc-note {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cc-note i { margin-right: 0.3rem; }

/* Hosting block */
.hosting-block {
  background: var(--bg-dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 2rem;
}

.hosting-block h3 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.hosting-block h3 i { color: var(--accent-light); margin-right: 0.5rem; }

.hosting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.hb-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hb-item i { color: var(--accent-light); font-size: 1.2rem; }
.hb-item strong { color: var(--text-light); font-size: 0.9rem; }
.hb-item span { color: var(--text-muted); font-size: 0.82rem; }

/* ===========================
   RISKS
   =========================== */
.risks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.risk-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-left: 4px solid var(--border);
  box-shadow: var(--shadow);
}

.risk-high   { border-left-color: var(--red); }
.risk-med    { border-left-color: var(--yellow); }
.risk-low    { border-left-color: var(--green); }

.risk-level {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.risk-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.risk-item p  { font-size: 0.85rem; color: var(--text-secondary); }

/* ===========================
   QUICK WINS
   =========================== */
.qw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.qw-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.qw-icon {
  width: 48px;
  height: 48px;
  background: rgba(99,102,241,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent-light);
}

.qw-item h4 { font-size: 0.95rem; font-weight: 700; color: var(--text-light); }
.qw-item p  { font-size: 0.83rem; color: var(--text-muted); flex: 1; }

.qw-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-light);
}

/* ===========================
   QUESTIONS PRESTATAIRE
   =========================== */
.questions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.qcat {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.qcat h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qcat ul { list-style: none; padding: 0; }
.qcat ul li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.83rem;
  color: var(--text-secondary);
  padding-left: 1.2rem;
  position: relative;
}
.qcat ul li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.qcat ul li:last-child { border-bottom: none; }

/* ===========================
   VERDICT FINAL
   =========================== */
.verdict-final-block {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

.vf-main {
  background: rgba(245,158,11,0.08);
  border: 2px solid rgba(245,158,11,0.3);
  border-radius: var(--radius);
  padding: 2rem;
}

.vf-crown { font-size: 3rem; margin-bottom: 0.5rem; }
.vf-main h3 { font-size: 1.5rem; font-weight: 800; color: var(--gold); margin-bottom: 0.75rem; }
.vf-why { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1rem; }

.vf-three { display: flex; flex-direction: column; gap: 0.75rem; }

.vf-t {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-light);
}

.vf-t i {
  background: var(--gold);
  color: var(--bg-dark);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.arch-block {
  background: var(--bg-dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 2rem;
}

.arch-block h4 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}
.arch-block h4 i { color: var(--accent-light); margin-right: 0.5rem; }

.arch-layers { display: flex; flex-direction: column; gap: 0.75rem; }

.arch-layer {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.arch-layer-2 { border-left: 3px solid var(--accent); }
.arch-layer-3 { border-left: 3px solid var(--green); }

.al-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.al-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.al-items span {
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  padding: 0.2rem 0.7rem;
  font-size: 0.76rem;
  color: var(--text-light);
}

/* Alternatives */
.alternatives-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.alt-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-dark-2);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.alt-rank { font-size: 1.8rem; flex-shrink: 0; }

/* MW Block */
.mw-block {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(99,102,241,0.06));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius);
  padding: 2rem;
}

.mw-block-inner h4 {
  color: var(--accent-light);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

.mws {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.mws-num {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.mws div {
  font-size: 0.85rem;
  color: var(--text-light);
  padding-top: 0.35rem;
}
.mws strong { display: block; font-weight: 700; }

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
  padding: 2.5rem 0 1.5rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-brand { color: var(--text-light); font-size: 0.9rem; }
.footer-brand strong { font-size: 1rem; }
.footer-brand span { color: var(--text-muted); font-size: 0.82rem; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent-light); text-decoration: none; }

.footer-note {
  color: var(--text-muted);
  font-size: 0.78rem;
  border-top: 1px solid var(--border-dark);
  padding-top: 1.5rem;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .verdict-final-block {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .section { padding: 3.5rem 0; }
  .hero { padding: 5rem 0 3.5rem; }
  
  .matrix-table th.th-chantier,
  .matrix-table td.td-chantier {
    min-width: 220px;
  }
  
  .detail-cols {
    grid-template-columns: 1fr;
  }
  
  .context-grid {
    justify-content: flex-start;
  }
  
  .verdict-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .costs-grid { grid-template-columns: 1fr; }
  .hosting-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.vcard { animation: fadeInUp 0.4s ease both; }
.vcard:nth-child(1) { animation-delay: 0.05s; }
.vcard:nth-child(2) { animation-delay: 0.10s; }
.vcard:nth-child(3) { animation-delay: 0.15s; }
.vcard:nth-child(4) { animation-delay: 0.20s; }

/* Budget column */
.td-budget { text-align: right; white-space: nowrap; }
.budget-range {
  display: inline-block;
  background: rgba(99,102,241,0.08);
  color: #312e81;
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Row hidden state */
.row-hidden { display: none !important; }

/* Toggle icon on row */
.toggle-icon {
  display: inline-block;
  transition: transform 0.2s;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 0.4rem;
}
.row-open .toggle-icon { transform: rotate(90deg); color: var(--accent); }
