/* ============================================================
   OILRIGHT – CSS Principal
   Stack : CSS custom properties + Flexbox + Grid
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Variables --- */
:root {
  --color-primary:     #0f172a;
  --color-secondary:   #1e293b;
  --color-accent:      #00d4aa;
  --color-accent-dark: #00a886;

  --color-ok:          #22c55e;
  --color-watch:       #f59e0b;
  --color-alert:       #ef4444;

  --color-bg:          #f1f5f9;
  --color-surface:     #ffffff;
  --color-border:      #e2e8f0;
  --color-text:        #1e293b;
  --color-text-muted:  #64748b;
  --color-text-light:  #94a3b8;

  --score-a:  #22c55e;
  --score-b:  #86efac;
  --score-c:  #f59e0b;
  --score-d:  #f97316;
  --score-e:  #ef4444;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --nav-height: 64px;
  --sidebar-w:  240px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ============================================================
   LAYOUT PUBLIC
   ============================================================ */

.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-primary);
  height: var(--nav-height);
  display: flex; align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-container {
  max-width: 1200px; width: 100%;
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.25rem; font-weight: 800; color: #fff; letter-spacing: -.5px;
}
.nav-logo-dot { color: var(--color-accent); font-size: 1.5rem; }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-md);
  color: rgba(255,255,255,.7); font-size: .875rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.6);
  padding: 48px 24px 24px;
  margin-top: 80px;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand { color: rgba(255,255,255,.9); }
.footer-tagline { font-size: .875rem; color: rgba(255,255,255,.5); margin-top: 8px; }
.footer-heading { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.4); margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-link { font-size: .875rem; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-link:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; font-size: .8125rem; display: flex; justify-content: space-between; align-items: center; }

/* ============================================================
   COMPOSANTS GÉNÉRAUX
   ============================================================ */

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-weight: 600; font-size: .9375rem; cursor: pointer;
  border: none; transition: all .15s; white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--color-accent); color: var(--color-primary); }
.btn-primary:hover { background: var(--color-accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-dark { background: var(--color-primary); color: #fff; }
.btn-dark:hover { background: var(--color-secondary); }
.btn-outline { background: transparent; color: var(--color-text); border: 1.5px solid var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-sm { padding: 6px 14px; font-size: .8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1.0625rem; }
.btn-danger { background: var(--color-alert); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost { background: transparent; color: var(--color-text-muted); border: none; }
.btn-ghost:hover { color: var(--color-text); background: var(--color-border); }

/* --- Cartes --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--color-text); }
.card-subtitle { font-size: .8125rem; color: var(--color-text-muted); margin-top: 2px; }

/* --- Badges statut --- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.badge--green  { background: #dcfce7; color: #16a34a; }
.badge--blue   { background: #dbeafe; color: #2563eb; }
.badge--yellow { background: #fef9c3; color: #a16207; }
.badge--orange { background: #fff7ed; color: #c2410c; }
.badge--red    { background: #fee2e2; color: #dc2626; }
.badge--gray   { background: #f1f5f9; color: #64748b; }

/* --- Score Oilright (A-E) --- */
.score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.1875rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.score-badge--a { background: var(--score-a); }
.score-badge--b { background: var(--score-b); color: #14532d; }
.score-badge--c { background: var(--score-c); }
.score-badge--d { background: var(--score-d); }
.score-badge--e { background: var(--score-e); }
.score-badge--gray { background: var(--color-text-light); }

.score-badge-lg {
  width: 80px; height: 80px; font-size: 2.25rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; color: #fff; flex-shrink: 0;
}

/* --- Niveaux paramètres (ok/watch/alert) --- */
.level-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
}
.level--ok      { color: #16a34a; }
.level--watch   { color: #a16207; }
.level--alert   { color: #dc2626; }
.level--unknown { color: var(--color-text-light); }

.level-pill.level--ok      { background: #dcfce7; }
.level-pill.level--watch   { background: #fef9c3; }
.level-pill.level--alert   { background: #fee2e2; }
.level-pill.level--unknown { background: #f1f5f9; }

/* --- Alertes flash --- */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-md);
  margin-bottom: 16px; font-size: .9375rem;
  border: 1px solid transparent;
}
.alert--success { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.alert--error   { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.alert--warning { background: #fffbeb; border-color: #fde68a; color: #d97706; }
.alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.alert__icon    { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert__close   { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 1.25rem; opacity: .6; padding: 0 4px; }
.alert__close:hover { opacity: 1; }

/* --- Formulaires --- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: .875rem; font-weight: 600;
  margin-bottom: 6px; color: var(--color-text);
}
.form-label-hint { font-weight: 400; color: var(--color-text-muted); font-size: .8125rem; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: .9375rem; color: var(--color-text);
  background: var(--color-surface);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}
.form-control::placeholder { color: var(--color-text-light); }
.form-control[readonly] { background: var(--color-bg); }
.form-hint { font-size: .8125rem; color: var(--color-text-muted); margin-top: 5px; }
.form-error { font-size: .8125rem; color: var(--color-alert); margin-top: 5px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-section-title {
  font-size: 1rem; font-weight: 700; margin: 28px 0 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--color-accent);
  color: var(--color-text);
}

/* --- Tableaux --- */
.table-container { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.data-table { width: 100%; }
.data-table thead { background: var(--color-bg); }
.data-table th {
  padding: 12px 16px; text-align: left;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--color-text-muted); white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
}
.data-table td {
  padding: 14px 16px; font-size: .875rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text); vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fafc; }
.data-table .actions { display: flex; gap: 8px; align-items: center; }

/* --- Pagination --- */
.pagination { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; }
.pagination__list { display: flex; align-items: center; gap: 4px; list-style: none; flex-wrap: wrap; justify-content: center; }
.pagination__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border-radius: var(--radius-md); font-size: .875rem; font-weight: 500;
  border: 1.5px solid var(--color-border); color: var(--color-text);
  transition: all .15s;
}
.pagination__btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.pagination__btn--active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination__dots { padding: 0 4px; color: var(--color-text-muted); }
.pagination__info { font-size: .8125rem; color: var(--color-text-muted); }

/* ============================================================
   HERO & SECTIONS PUBLIQUES
   ============================================================ */

.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3a5f 50%, #0f2744 100%);
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(0,212,170,.12) 0%, transparent 60%),
              radial-gradient(circle at 70% 30%, rgba(0,100,200,.1) 0%, transparent 50%);
}
.hero-container { max-width: 860px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,212,170,.15); border: 1px solid rgba(0,212,170,.3);
  color: var(--color-accent); padding: 6px 16px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600; margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; color: #fff; line-height: 1.15;
  margin-bottom: 20px; letter-spacing: -.5px;
}
.hero-title span { color: var(--color-accent); }
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,.7); max-width: 600px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800; color: var(--color-text);
  letter-spacing: -.3px; margin-bottom: 12px;
}
.section-subtitle { font-size: 1.0625rem; color: var(--color-text-muted); max-width: 600px; }
.section-header { text-align: center; margin-bottom: 48px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-alt { background: var(--color-surface); }

/* Étapes "comment ça marche" */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 32px 24px;
  text-align: center; position: relative;
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-primary); color: var(--color-accent);
  font-size: 1.25rem; font-weight: 800; margin-bottom: 16px;
}
.step-icon { font-size: 2.5rem; margin-bottom: 12px; }
.step-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-desc { font-size: .875rem; color: var(--color-text-muted); line-height: 1.6; }

/* Kits */
.kits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.kit-card {
  background: var(--color-surface); border: 2px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 32px 28px;
  display: flex; flex-direction: column; position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.kit-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow-lg); }
.kit-card--popular { border-color: var(--color-accent); }
.kit-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--color-accent); color: var(--color-primary);
  padding: 4px 16px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.kit-name { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.kit-desc { font-size: .875rem; color: var(--color-text-muted); margin-bottom: 20px; }
.kit-price { font-size: 2rem; font-weight: 900; color: var(--color-primary); }
.kit-price sup { font-size: 1rem; vertical-align: super; }
.kit-price-hint { font-size: .8125rem; color: var(--color-text-muted); }
.kit-delay { font-size: .8125rem; color: var(--color-text-muted); margin: 12px 0 20px; }
.kit-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kit-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .875rem; color: var(--color-text);
}
.kit-features li::before { content: '✓'; color: var(--color-ok); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

/* Témoignages */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.testimonial-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 24px;
}
.testimonial-stars { color: #f59e0b; margin-bottom: 12px; font-size: 1rem; }
.testimonial-text { font-size: .9375rem; color: var(--color-text); margin-bottom: 16px; line-height: 1.6; font-style: italic; }
.testimonial-author { font-size: .875rem; font-weight: 600; }
.testimonial-meta { font-size: .8125rem; color: var(--color-text-muted); }

/* ============================================================
   RAPPORT D'ANALYSE
   ============================================================ */

.report-header {
  background: var(--color-primary);
  color: #fff;
  padding: 32px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.report-score-circle {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.report-vehicle-info h2 { font-size: 1.5rem; font-weight: 800; }
.report-vehicle-info p { color: rgba(255,255,255,.65); font-size: .9375rem; margin-top: 4px; }
.report-meta { display: flex; gap: 24px; margin-top: 12px; flex-wrap: wrap; }
.report-meta-item { font-size: .875rem; color: rgba(255,255,255,.6); }
.report-meta-item strong { color: #fff; }

.report-scores-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--color-border);
}
.report-score-item {
  background: var(--color-surface);
  padding: 20px; text-align: center;
}
.report-score-num { font-size: 2rem; font-weight: 900; color: var(--color-primary); line-height: 1; }
.report-score-label { font-size: .8125rem; color: var(--color-text-muted); margin-top: 4px; }
.report-score-bar { height: 4px; background: var(--color-border); border-radius: 999px; margin-top: 8px; }
.report-score-bar-fill { height: 4px; border-radius: 999px; background: var(--color-accent); }

.report-section { margin-bottom: 32px; }
.report-section-title {
  font-size: 1rem; font-weight: 700; color: var(--color-text);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.report-section-icon { font-size: 1.25rem; }

.param-row {
  display: grid; grid-template-columns: 1fr auto auto auto;
  gap: 12px 16px; align-items: center;
  padding: 12px 16px; border-radius: var(--radius-md);
  border-bottom: 1px solid var(--color-border);
  font-size: .875rem;
}
.param-row:last-child { border-bottom: none; }
.param-row:hover { background: var(--color-bg); }
.param-name { font-weight: 500; }
.param-explain { font-size: .75rem; color: var(--color-text-muted); margin-top: 2px; }
.param-value { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.param-unit { color: var(--color-text-muted); font-size: .75rem; min-width: 60px; }

.interpretation-box {
  background: linear-gradient(135deg, #f0fdf4, #eff6ff);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
}
.interpretation-box.anomaly {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  border-color: #fca5a5;
}
.interpretation-box.watch {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  border-color: #fde68a;
}
.interpretation-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.interpretation-text { font-size: .9375rem; color: var(--color-text); line-height: 1.7; }

.expert-comment {
  background: #f8fafc;
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin-top: 8px;
}
.expert-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--color-text-muted); margin-bottom: 8px; }
.expert-text { font-size: .9375rem; line-height: 1.7; }

.age-check-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex; align-items: center; gap: 20px;
}
.age-check-score-circle {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0; font-weight: 800;
}
.age-check-num { font-size: 1.5rem; }
.age-check-label { font-size: .625rem; text-transform: uppercase; letter-spacing: .5px; }

/* ============================================================
   ESPACE CLIENT
   ============================================================ */

.client-layout { display: flex; min-height: 100vh; }
.client-sidebar {
  width: var(--sidebar-w); background: var(--color-primary);
  position: fixed; left: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column;
  padding: 0; overflow-y: auto; z-index: 50;
}
.sidebar-header {
  padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo { font-size: 1.1rem; font-weight: 800; color: #fff; }
.sidebar-logo-dot { color: var(--color-accent); }
.sidebar-user {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-username { font-size: .875rem; font-weight: 600; color: #fff; }
.sidebar-role { font-size: .75rem; color: rgba(255,255,255,.4); margin-top: 2px; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  font-size: .875rem; font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: color .15s, background .15s;
  cursor: pointer;
}
.sidebar-nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-nav-item.active { color: #fff; background: rgba(255,255,255,.1); border-right: 3px solid var(--color-accent); }
.sidebar-nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08);
}

.client-main {
  margin-left: var(--sidebar-w);
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.client-topbar {
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 1.125rem; font-weight: 700; color: var(--color-text); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.client-content { padding: 32px; flex: 1; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.stat-icon--primary { background: rgba(0,212,170,.1); color: var(--color-accent); }
.stat-icon--blue    { background: #dbeafe; color: #2563eb; }
.stat-icon--green   { background: #dcfce7; color: #16a34a; }
.stat-icon--orange  { background: #fff7ed; color: #ea580c; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--color-text); line-height: 1; }
.stat-label { font-size: .8125rem; color: var(--color-text-muted); margin-top: 3px; }

/* Tableau de bord commandes */
.order-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 20px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  transition: box-shadow .15s; margin-bottom: 12px;
}
.order-card:hover { box-shadow: var(--shadow-md); }
.order-score-area { flex-shrink: 0; }
.order-info { flex: 1; min-width: 200px; }
.order-vehicle { font-weight: 700; font-size: .9375rem; }
.order-number { font-size: .8125rem; color: var(--color-text-muted); margin-top: 2px; }
.order-meta { display: flex; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.order-meta-item { font-size: .8125rem; color: var(--color-text-muted); }
.order-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   FAQ
   ============================================================ */

.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: 8px; overflow: hidden; }
.faq-question {
  padding: 18px 20px; font-weight: 600; font-size: .9375rem;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  background: var(--color-surface); user-select: none;
}
.faq-question:hover { background: #f8fafc; }
.faq-toggle { font-size: 1.25rem; color: var(--color-text-muted); transition: transform .2s; font-weight: 400; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer { padding: 16px 20px; background: #f8fafc; font-size: .9375rem; color: var(--color-text); line-height: 1.7; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-category-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-muted); margin: 28px 0 12px; }

/* ============================================================
   STATUT TIMELINE
   ============================================================ */

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-line {
  display: flex; flex-direction: column; align-items: center;
}
.timeline-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0; z-index: 1;
}
.timeline-dot--done    { background: var(--color-ok); color: #fff; }
.timeline-dot--current { background: var(--color-watch); color: #fff; }
.timeline-dot--pending { background: var(--color-border); color: var(--color-text-muted); }
.timeline-connector {
  width: 2px; flex: 1; background: var(--color-border); margin: 2px 0;
}
.timeline-connector--done { background: var(--color-ok); }
.timeline-content { padding-top: 4px; padding-bottom: 4px; }
.timeline-title { font-weight: 600; font-size: .875rem; }
.timeline-date { font-size: .75rem; color: var(--color-text-muted); margin-top: 2px; }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */

.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-w); background: #0f172a;
  position: fixed; left: 0; top: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 50; overflow-y: auto;
}
.admin-sidebar .sidebar-nav-item { padding: 10px 20px; }
.admin-main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
.admin-content { padding: 32px; }

.admin-topbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; position: sticky; top: 0; z-index: 40;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--color-text-muted); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent); }
.breadcrumb-sep { color: var(--color-border); }

/* Formulaire analyse laboratoire */
.lab-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
}
.lab-section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}
.lab-section-title { font-size: 1rem; font-weight: 700; }
.lab-section-icon { font-size: 1.25rem; }

.lab-field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.lab-field label { font-size: .8125rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 4px; display: block; }
.lab-field input { padding: 8px 12px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); font-size: .9375rem; width: 100%; }
.lab-field input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(0,212,170,.15); }
.lab-field .unit { font-size: .75rem; color: var(--color-text-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .client-sidebar, .admin-sidebar { display: none; }
  .client-main, .admin-main { margin-left: 0; }
  .client-content, .admin-content { padding: 16px; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 60px 16px 48px; }
  .section { padding: 48px 0; }
  .param-row { grid-template-columns: 1fr; gap: 4px; }
  .report-scores-row { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .kits-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .btn-lg { padding: 12px 20px; font-size: .9375rem; }
  .hero-title { font-size: 1.75rem; }
  .stat-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   UTILITAIRES
   ============================================================ */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--color-text-muted); }
.text-small  { font-size: .875rem; }
.text-xs     { font-size: .75rem; }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: var(--font-mono); }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.hidden { display: none; }
.divider { border: none; border-top: 1px solid var(--color-border); margin: 24px 0; }
.empty-state { text-align: center; padding: 64px 24px; color: var(--color-text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state-title { font-size: 1.125rem; font-weight: 600; color: var(--color-text); margin-bottom: 8px; }
