:root{ --brand-1:#5b8cff; --brand-2:#7c4dff; --radius:1.25rem; --page-bg:#f6f8fb; }
body{
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(124,77,255,.12), transparent 60%),
    radial-gradient(1200px 700px at 80% 0%, rgba(91,140,255,.14), transparent 55%),
    var(--page-bg);
}
.navbar,.card{ border-radius:var(--radius); }
.card{ box-shadow:0 12px 30px rgba(15,23,42,.08); border:0; }
.btn{ border-radius:999px; }
.badge{ border-radius:999px; }
.hero{
  background:linear-gradient(135deg, rgba(91,140,255,.18), rgba(124,77,255,.18));
  border:1px solid rgba(15,23,42,.06);
}
.icon-bubble{
  width:44px;height:44px;border-radius:14px;
  display:inline-flex;align-items:center;justify-content:center;
  background:rgba(91,140,255,.14);
}
.footer-links a{ text-decoration:none; }
.footer-links a:hover{ text-decoration:underline; }



  50%{ transform: translateY(6px); }
  100%{ transform: translateY(0px); }
}


/* --- V7 Modern UI --- */
:root{
  --shadow: 0 18px 50px rgba(15,23,42,.10);
  --shadow-soft: 0 10px 28px rgba(15,23,42,.08);
  --border: rgba(15,23,42,.08);
}
body{
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}
.navbar{ box-shadow: var(--shadow-soft); border: 1px solid var(--border); }
.hero, .card{ box-shadow: var(--shadow); }
.btn-primary{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border: 0;
}
.btn-primary:hover{ filter: brightness(.98); }
.btn-outline-secondary{ border-color: rgba(15,23,42,.18); }
.badge.text-bg-secondary{ background: rgba(15,23,42,.08) !important; color: #111827; border: 1px solid rgba(15,23,42,.08); }
.section-title{ letter-spacing: -.02em; }
.kpi{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  padding: .45rem .8rem;
}
.stepper{
  display:flex; gap:.5rem; flex-wrap:wrap;
}
.stepper .step{
  padding:.35rem .75rem;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.65);
  color:#0f172a;
  font-size:.85rem;
}
.stepper .step.active{
  background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(124,77,255,.18));
  border-color: rgba(91,140,255,.35);
  font-weight:600;
}
.select-card{
  cursor:pointer;
  border:1px solid rgba(15,23,42,.08);
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
}
.select-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(91,140,255,.35);
}
.select-card.selected{
  outline: 3px solid rgba(91,140,255,.35);
}
.price-pill{
  font-weight:700;
  background: rgba(91,140,255,.10);
  border: 1px solid rgba(91,140,255,.18);
  border-radius: 999px;
  padding: .25rem .6rem;
  display:inline-flex;
  align-items:center;
  gap:.35rem;
}

.select-badge{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: rgba(91,140,255,.18);
  border: 1px solid rgba(91,140,255,.35);
  color: #0f172a;
}


/* V9 layout tweaks */
.hero-actions{ align-items: center; }
@media (max-width: 991px){
  .wave-hero .glass-card{ margin-top: 8px; }
}


/* --- V14 Wave theme (clean) --- */
body{ background: var(--page-bg); }

.wave-hero{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.06);
  background:
    radial-gradient(900px 450px at 20% 25%, rgba(91,140,255,.50), transparent 60%),
    radial-gradient(900px 450px at 85% 15%, rgba(124,77,255,.45), transparent 58%),
    linear-gradient(135deg, rgba(91,140,255,.28), rgba(124,77,255,.28));
}

.wave-hero .wave-content{ position: relative; z-index: 2; }
.wave-hero .wave-svg{
  position:absolute;
  left:0; right:0; bottom:-1px;
  width:100%;
  height:180px;
  z-index:1;
  display:block;
}

.wave-hero .wave-path-1{ fill: rgba(246,248,251,.96); }
.wave-hero .wave-path-2{ fill: rgba(246,248,251,.70); }

@keyframes waveMove{
  0%{ transform: translateX(0); }
  50%{ transform: translateX(-12px); }
  100%{ transform: translateX(0); }
}
.wave-hero .wave-svg{ animation: waveMove 10s ease-in-out infinite; }

.glass-card{
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(15,23,42,.08);
}

/* V15 layout fixes */
.scroll-panel{
  max-height: 360px;
  overflow: auto;
  padding-right: 6px;
}
.scroll-panel::-webkit-scrollbar{ width: 10px; }
.scroll-panel::-webkit-scrollbar-thumb{
  background: rgba(15,23,42,.12);
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,.7);
}
.scroll-panel::-webkit-scrollbar-track{ background: transparent; }

.sticky-card{
  position: sticky;
  top: 88px;
}

.stepper{
  display:flex; gap:.5rem; flex-wrap:wrap;
  margin-top: .75rem;
}
.stepper .step{
  padding:.35rem .75rem;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  color:#0f172a;
  font-size:.85rem;
}
.stepper .step.active{
  background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(124,77,255,.18));
  border-color: rgba(91,140,255,.35);
  font-weight:600;
}

@media (max-width: 991px){
  .scroll-panel{ max-height: none; overflow: visible; padding-right: 0; }
  .sticky-card{ position: static; top:auto; }
}

/* V16 selection visibility */
.model-card{
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}
.model-card.selected{
  border-color: rgba(91,140,255,.65) !important;
  box-shadow: 0 16px 42px rgba(91,140,255,.22);
  background: linear-gradient(135deg, rgba(91,140,255,.12), rgba(124,77,255,.10));
  outline: none !important;
}
.selected-badge{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  font-size:.75rem;
  font-weight:700;
  padding:.25rem .55rem;
  border-radius: 999px;
  background: rgba(91,140,255,.16);
  border: 1px solid rgba(91,140,255,.28);
  color:#0f172a;
}
.selected-dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

/* V17 - cleaner selection indicator */
.selected-badge{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border: 0;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(91,140,255,.28);
  padding: 0;
}
.selected-badge .selected-dot{ display:none; }

/* V21 models panel */
.scroll-panel{
  max-height: 520px; /* show more models */
}
.scroll-panel.expanded{
  max-height: none;
  overflow: visible;
  padding-right: 0;
}
.model-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
  margin-bottom:.35rem;
}
.model-search{
  max-width: 320px;
}

/* Keep models panel fully visible on mobile (override after V21 rule) */
@media (max-width: 991px){
  .scroll-panel{ max-height: none; overflow: visible; padding-right: 0; }
}

/* Brand logos (emoji or uploaded image) */
.brand-img{
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}
.icon-bubble .brand-img{
  width: 22px;
  height: 22px;
}

/* Payment micro-badges (Stripe reassurance) */
.sx-pay-badge{
  gap:.35rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.18rem .55rem;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.75);
  font-size:12px;
  line-height:1.2;
}

/* Client timeline (order status) */
.sx-timeline{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:.15rem;
}
.sx-timeline-item{
  display:flex;
  align-items:flex-start;
  gap:.75rem;
  padding:.35rem 0;
}
.sx-timeline-marker{
  width:14px;
  height:14px;
  border-radius:999px;
  border:2px solid rgba(15,23,42,.22);
  background:rgba(255,255,255,.9);
  margin-top:.25rem;
  position:relative;
  flex:0 0 auto;
}
.sx-timeline-item:not(:last-child) .sx-timeline-marker::after{
  content:"";
  position:absolute;
  left:50%;
  top:14px;
  transform:translateX(-50%);
  width:2px;
  height:22px;
  background:rgba(15,23,42,.12);
}
.sx-timeline-item.done .sx-timeline-marker{
  border-color: rgba(34,197,94,.6);
  background: rgba(34,197,94,.18);
}
.sx-timeline-item.current .sx-timeline-marker{
  border-color: rgba(91,140,255,.8);
  background: rgba(91,140,255,.18);
}
.sx-timeline-content{ min-width:0; }


.sx-pay-logo{height:14px;width:auto;display:block;}

.sx-pay-note{font-size:12px;color:#6c757d;}

/* Homepage hero badges */
.sx-hero-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}
.sx-hero-trust .badge{
  background:rgba(255,255,255,.65) !important;
  border:1px solid rgba(15,23,42,.12) !important;
}
@media (max-width: 576px){
  .sx-hero-top{ justify-content:flex-start; }
  .sx-hero-trust{ width:100%; }
}

/* Homepage chips (réparations fréquentes) */
.sx-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.sx-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#f3f4f6;
  color:rgba(15,23,42,.85);
  font-size:14px;
  font-weight:500;
  line-height:1.2;
  flex:0 0 auto;
  white-space:nowrap;

  /* reset native button rendering (Android/Chrome) */
  appearance:none;
  -webkit-appearance:none;
  box-shadow:none;
  outline:none;
}
.sx-chip--muted{
  background:#f3f4f6;
  color:rgba(15,23,42,.75);
}
.sx-chip:focus-visible{
  box-shadow:0 0 0 4px rgba(99,102,241,.18);
  border-color:rgba(99,102,241,.35);
}

@media (max-width: 480px){
  .sx-chip{
    font-size:13px;
    padding:5px 10px;
  }
}

/* Chips as menu (scroll + highlight) */
.sx-chip-link{
  cursor:pointer;
  user-select:none;
}
.sx-chip-link:hover{
  background:rgba(99,102,241,.12);
  border-color:rgba(99,102,241,.25);
  color:rgba(15,23,42,.9);
}

/* Highlight tariff card after chip click */
.sx-tariff-card.sx-highlight{
  outline:2px solid rgba(99,102,241,.55);
  box-shadow:0 0 0 6px rgba(99,102,241,.10);
}

/* ── File input custom ─────────────────────────────────────── */
.sx-file-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; overflow: hidden;
  clip: rect(0,0,0,0);
}
.sx-file-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: 1.5px dashed #d1d5db;
  border-radius: 10px;
  padding: 9px 14px;
  background: #fafafa;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .15s, background .15s, color .15s;
  width: 100%;
}
.sx-file-label:hover {
  border-color: #6366f1;
  background: #f0f0ff;
  color: #6366f1;
}
.sx-file-label--active {
  border-color: #6366f1;
  border-style: solid;
  background: #f0f0ff;
  color: #6366f1;
}
.sx-file-icon { font-size: 15px; flex-shrink: 0; }
.sx-file-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ══════════════════════════════════════════════════════════
   MODE SOMBRE — Site client
   Activé par : <html class="dark"> (toggle JS + localStorage)
   ══════════════════════════════════════════════════════════ */

html.dark {
  --page-bg: #0f1117;
  --brand-1: #7c9fff;
  --brand-2: #a07dff;
  color-scheme: dark;
}

/* Base */
html.dark body {
  background: var(--page-bg);
  color: #e2e8f0;
}
html.dark body {
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(124,77,255,.08), transparent 60%),
    radial-gradient(1200px 700px at 80% 0%, rgba(91,140,255,.09), transparent 55%),
    #0f1117;
}

/* Navbar */
html.dark .sx-nav {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
html.dark .sx-nav-brand { color: #f1f5f9; }
html.dark .sx-nav-link { color: #94a3b8; }
html.dark .sx-nav-link:hover { background: rgba(255,255,255,.06); color: #f1f5f9; }
html.dark .sx-nav .dropdown-menu {
  background: #1e2130;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
html.dark .sx-nav .dropdown-item { color: #cbd5e1; }
html.dark .sx-nav .dropdown-item:hover { background: rgba(255,255,255,.06); color: #f1f5f9; }
html.dark .sx-nav .dropdown-divider { border-color: rgba(255,255,255,.07); }
html.dark .sx-nav-sep { background: rgba(255,255,255,.1); }
html.dark .navbar-toggler-icon {
  filter: invert(1);
}

/* Cards */
html.dark .card,
html.dark .glass-card,
html.dark .auth-card,
html.dark .review-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

/* Hero wave */
html.dark .wave-hero {
  background:
    radial-gradient(900px 450px at 20% 25%, rgba(91,140,255,.35), transparent 60%),
    radial-gradient(900px 450px at 85% 15%, rgba(124,77,255,.30), transparent 58%),
    linear-gradient(135deg, rgba(91,140,255,.20), rgba(124,77,255,.20));
}
html.dark .wave-hero .wave-path-1 { fill: rgba(15,17,23,.96); }
html.dark .wave-hero .wave-path-2 { fill: rgba(15,17,23,.70); }

/* Inputs */
html.dark .auth-input,
html.dark input:not([type=radio]):not([type=checkbox]),
html.dark textarea,
html.dark select {
  background: #252836 !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #e2e8f0 !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder { color: #64748b !important; }
html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
  border-color: var(--brand-1) !important;
  box-shadow: 0 0 0 3px rgba(124,153,255,.15) !important;
}

/* Boutons */
html.dark .btn-outline-secondary {
  border-color: rgba(255,255,255,.15);
  color: #cbd5e1;
}
html.dark .btn-outline-secondary:hover {
  background: rgba(255,255,255,.07);
  color: #f1f5f9;
  border-color: rgba(255,255,255,.2);
}

/* Badges / chips */
html.dark .badge.text-bg-secondary {
  background: rgba(255,255,255,.08) !important;
  color: #cbd5e1;
  border-color: rgba(255,255,255,.08);
}
html.dark .sx-chip {
  background: #1e2130;
  border-color: rgba(255,255,255,.1);
  color: #cbd5e1;
}
html.dark .sx-chip:hover {
  background: rgba(124,153,255,.15);
  border-color: rgba(124,153,255,.3);
  color: #e2e8f0;
}

/* Stepper */
html.dark .stepper .step {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  color: #94a3b8;
}
html.dark .stepper .step.active {
  background: linear-gradient(135deg, rgba(91,140,255,.22), rgba(124,77,255,.22));
  border-color: rgba(91,140,255,.4);
  color: #e2e8f0;
}

/* Model cards */
html.dark .model-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .model-card:hover {
  border-color: rgba(124,153,255,.4);
}
html.dark .model-card.selected {
  background: linear-gradient(135deg, rgba(91,140,255,.15), rgba(124,77,255,.12));
  border-color: rgba(124,153,255,.55);
}

/* Select cards */
html.dark .select-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .select-card:hover { border-color: rgba(124,153,255,.4); }
html.dark .select-card.selected { outline-color: rgba(124,153,255,.4); }

/* KPI pills */
html.dark .kpi {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  color: #cbd5e1;
}

/* Price pill */
html.dark .price-pill {
  background: rgba(124,153,255,.12);
  border-color: rgba(124,153,255,.2);
  color: #a5b4fc;
}

/* File input */
html.dark .sx-file-label {
  background: #1e2130;
  border-color: rgba(255,255,255,.12);
  color: #64748b;
}
html.dark .sx-file-label:hover {
  border-color: var(--brand-1);
  background: rgba(124,153,255,.08);
  color: var(--brand-1);
}

/* Alerts Bootstrap */
html.dark .alert-success { background: #052e16; color: #86efac; border-color: #14532d; }
html.dark .alert-danger  { background: #2d1212; color: #fca5a5; border-color: #7f1d1d; }
html.dark .alert-warning { background: #2d2000; color: #fcd34d; border-color: #713f12; }

/* Timeline */
html.dark .sx-timeline-item .sx-timeline-marker {
  background: #252836;
  border-color: rgba(255,255,255,.2);
}
html.dark .sx-timeline-item.done .sx-timeline-marker {
  border-color: rgba(34,197,94,.5);
  background: rgba(34,197,94,.12);
}
html.dark .sx-timeline-item.current .sx-timeline-marker {
  border-color: rgba(124,153,255,.7);
  background: rgba(124,153,255,.15);
}
html.dark .sx-timeline-item:not(:last-child) .sx-timeline-marker::after {
  background: rgba(255,255,255,.08);
}

/* Textes génériques */
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5 { color: #f1f5f9; }
html.dark p, html.dark li { color: #94a3b8; }
html.dark .text-muted { color: #64748b !important; }
html.dark hr { border-color: rgba(255,255,255,.07); }
html.dark a:not(.btn):not(.sx-nav-cta):not(.sx-nav-link):not(.dropdown-item) { color: #818cf8; }

/* Scroll panel */
html.dark .scroll-panel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.04);
}

/* Bouton dark mode toggle */
.sx-dark-toggle {
  background: transparent;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 8px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.sx-dark-toggle:hover {
  background: rgba(99,102,241,.08);
  border-color: rgba(99,102,241,.2);
}
html.dark .sx-dark-toggle {
  border-color: rgba(255,255,255,.1);
}
html.dark .sx-dark-toggle:hover {
  background: rgba(255,255,255,.06);
}

/* ── Corrections dark mode — pages spécifiques ─────────────── */

/* index.php — hero CTA card */
html.dark .lp-hero-cta-card {
  background: rgba(26,29,39,.97);
  color: #e2e8f0;
}
html.dark .lp-hero-cta-card input,
html.dark .lp-hero-cta-card select { color: #e2e8f0; }

/* index.php — section titles & subtitles */
html.dark .lp-section-title { color: #f1f5f9; }
html.dark .lp-section-sub   { color: #64748b; }

/* index.php — feat cards */
html.dark .lp-feat-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .lp-feat-title { color: #f1f5f9; }
html.dark .lp-feat-sub   { color: #64748b; }

/* index.php — dash-card (sections Process, Garantie, FAQ) */
html.dark .dash-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}

/* index.php — tariff cards */
html.dark .lp-tariff-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  color: #e2e8f0;
}
html.dark .lp-tariff-card:hover,
html.dark .lp-tariff-card.active {
  border-color: rgba(124,153,255,.35);
  box-shadow: 0 8px 24px rgba(99,102,241,.12);
}
html.dark .lp-price-pill {
  background: rgba(124,153,255,.1);
  border-color: rgba(124,153,255,.2);
  color: #a5b4fc;
}

/* index.php — FAQ accordion */
html.dark .lp-faq .accordion-item {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .lp-faq .accordion-button {
  background: #1a1d27;
  color: #e2e8f0;
}
html.dark .lp-faq .accordion-button:not(.collapsed) {
  background: #1e2130;
  color: #818cf8;
}
html.dark .lp-faq .accordion-button::after {
  filter: invert(1) opacity(.5);
}
html.dark .lp-faq .accordion-collapse,
html.dark .lp-faq .accordion-body {
  background: #1a1d27;
  color: #94a3b8;
}

/* dashboard.php */
html.dark .dash-kpi,
html.dark .dash-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .dash-kpi .kpi-label { color: #64748b; }
html.dark .repair-row:hover { background: rgba(255,255,255,.03); }
html.dark .repair-device { color: #f1f5f9; }
html.dark .repair-service,
html.dark .repair-ref { color: #64748b; }
html.dark .dash-card-header {
  background: #13151f;
  border-color: rgba(255,255,255,.07);
  color: #f1f5f9;
}
html.dark .empty-state .empty-title { color: #e2e8f0; }
html.dark .empty-state .empty-sub   { color: #64748b; }

/* repair_view.php — timeline & cards */
html.dark .rv-card,
html.dark .rv-chat-bubble-admin,
html.dark [class*="rv-"] {
  background: #1a1d27 !important;
  border-color: rgba(255,255,255,.07) !important;
  color: #e2e8f0 !important;
}
html.dark .rv-tl-item .rv-tl-marker { background: #252836; }
html.dark .rv-tl-item.current .rv-tl-marker {
  background: #1a1d27;
  border-color: #6366f1;
}

/* Bootstrap components globaux */
html.dark .accordion-item {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  color: #e2e8f0;
}
html.dark .accordion-button {
  background: #1a1d27;
  color: #e2e8f0;
}
html.dark .accordion-button:not(.collapsed) {
  background: #1e2130;
  color: #818cf8;
  box-shadow: none;
}
html.dark .accordion-button::after { filter: invert(1) opacity(.5); }
html.dark .accordion-body {
  background: #1a1d27;
  color: #94a3b8;
}
html.dark .table {
  color: #e2e8f0;
  border-color: rgba(255,255,255,.07);
}
html.dark .table > :not(caption) > * > * {
  background: transparent;
  border-color: rgba(255,255,255,.06);
  color: #e2e8f0;
}
html.dark .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255,255,255,.02);
}
html.dark .modal-content {
  background: #1a1d27;
  border-color: rgba(255,255,255,.08);
  color: #e2e8f0;
}
html.dark .modal-header,
html.dark .modal-footer {
  border-color: rgba(255,255,255,.07);
}
html.dark .btn-close { filter: invert(1) opacity(.7); }
html.dark .dropdown-menu {
  background: #1e2130;
  border-color: rgba(255,255,255,.08);
}
html.dark .dropdown-item { color: #cbd5e1; }
html.dark .dropdown-item:hover { background: rgba(255,255,255,.05); color: #f1f5f9; }
html.dark .list-group-item {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  color: #e2e8f0;
}
html.dark .form-control,
html.dark .form-select {
  background: #252836 !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #e2e8f0 !important;
}
html.dark .form-control:focus,
html.dark .form-select:focus {
  background: #2a2d3e !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15) !important;
}
html.dark .form-label { color: #cbd5e1; }
html.dark .form-text  { color: #64748b; }
html.dark .input-group-text {
  background: #1e2130;
  border-color: rgba(255,255,255,.1);
  color: #94a3b8;
}
html.dark .nav-tabs { border-color: rgba(255,255,255,.07); }
html.dark .nav-tabs .nav-link { color: #64748b; }
html.dark .nav-tabs .nav-link:hover { color: #e2e8f0; border-color: rgba(255,255,255,.07); }
html.dark .nav-tabs .nav-link.active {
  background: transparent;
  border-color: rgba(255,255,255,.07) rgba(255,255,255,.07) transparent;
  color: #818cf8;
}
html.dark .tab-content { color: #e2e8f0; }

/* Inline styles fréquents dans les pages */
html.dark [style*="background:#fff"],
html.dark [style*="background: #fff"],
html.dark [style*="background-color:#fff"],
html.dark [style*="background-color: #fff"] {
  background: #1a1d27!important;
}
html.dark [style*="color:#0f172a"],
html.dark [style*="color: #0f172a"],
html.dark [style*="color:#111827"],
html.dark [style*="color: #111827"],
html.dark [style*="color:#374151"],
html.dark [style*="color: #374151"] {
  color: #e2e8f0 !important;
}
html.dark [style*="color:#6b7280"],
html.dark [style*="color: #6b7280"],
html.dark [style*="color:#9ca3af"],
html.dark [style*="color: #9ca3af"] {
  color: #64748b !important;
}
html.dark [style*="border-color:#e5e7eb"],
html.dark [style*="border: 1px solid #e5e7eb"],
html.dark [style*="border-bottom: 1px solid #f0f0f0"],
html.dark [style*="border-color: #f0f0f0"] {
  border-color: rgba(255,255,255,.07) !important;
}
html.dark [style*="background:#f8f9fa"],
html.dark [style*="background: #f8f9fa"],
html.dark [style*="background:#f3f4f6"],
html.dark [style*="background: #f3f4f6"],
html.dark [style*="background:#fafafa"],
html.dark [style*="background: #fafafa"],
html.dark [style*="background:#f8f7ff"],
html.dark [style*="background: #f8f7ff"] {
  background: #13151f !important;
}

/* ── invoices.php ───────────────────────────────────────────── */
html.dark .inv-kpi {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .inv-kpi .kpi-label { color: #64748b; }
html.dark .inv-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .inv-row { border-color: rgba(255,255,255,.06); }
html.dark .inv-num  { color: #cbd5e1; }
html.dark .inv-amount { color: #f1f5f9; }
html.dark .inv-service,
html.dark .inv-date { color: #64748b; }
html.dark .btn-inv-ghost {
  background: #1e2130;
  color: #cbd5e1;
  border-color: rgba(255,255,255,.1);
}
html.dark .btn-inv-ghost:hover {
  background: #252836;
  color: #f1f5f9;
}
html.dark .empty-state .empty-title { color: #e2e8f0; }
html.dark .empty-state .empty-sub   { color: #64748b; }

/* ── profile.php ────────────────────────────────────────────── */
html.dark .prof-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .prof-card-header {
  background: #13151f;
  border-color: rgba(255,255,255,.07);
  color: #e2e8f0;
}
html.dark .prof-card-body { color: #e2e8f0; }
html.dark .prof-label { color: #64748b; }
html.dark .prof-input {
  background: #252836;
  border-color: rgba(255,255,255,.1);
  color: #e2e8f0;
}
html.dark .prof-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
html.dark .prof-btn-ghost {
  background: #1e2130;
  color: #cbd5e1;
  border-color: rgba(255,255,255,.1);
}
html.dark .prof-btn-ghost:hover {
  background: #252836;
  color: #f1f5f9;
}
html.dark .prof-danger-card {
  background: #1a1d27;
  border-color: rgba(127,29,29,.5);
}
html.dark .prof-danger-header {
  background: rgba(127,29,29,.2);
  border-color: rgba(127,29,29,.3);
  color: #fca5a5;
}

/* ── invoice.php (voir facture) ─────────────────────────────── */
html.dark .sx-inv-wrap {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .sx-inv-header {
  background: linear-gradient(135deg, rgba(91,140,255,.08), rgba(124,77,255,.08));
  border-color: rgba(255,255,255,.07);
}
html.dark .sx-inv-number  { color: #f1f5f9; }
html.dark .sx-inv-meta    { color: #64748b; }
html.dark .sx-inv-meta b, html.dark .sx-inv-meta .text-dark { color: #e2e8f0 !important; }
html.dark .sx-inv-party   { color: #cbd5e1; }
html.dark .sx-inv-party b { color: #f1f5f9; }
html.dark .sx-inv-section-title { color: #475569; }
html.dark .sx-inv-divider { border-color: rgba(255,255,255,.07); }
html.dark .sx-inv-table thead th {
  color: #475569;
  border-color: rgba(255,255,255,.07);
}
html.dark .sx-inv-table tbody td { color: #e2e8f0; }
html.dark .sx-inv-table tbody tr:not(:last-child) td {
  border-color: rgba(255,255,255,.05);
}
html.dark .sx-inv-total-row   { color: #94a3b8; }
html.dark .sx-inv-total-final {
  color: #f1f5f9;
  border-color: rgba(255,255,255,.12);
}
html.dark .sx-inv-ref {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  color: #cbd5e1;
}
html.dark .sx-inv-status-badge.unpaid {
  background: rgba(161,98,7,.2);
  color: #fde68a;
  border-color: rgba(161,98,7,.3);
}
/* Alerte non payée */
html.dark .sx-inv-header .alert-warning {
  background: rgba(45,32,0,.8);
  color: #fcd34d;
  border-color: rgba(113,63,18,.5);
}
/* Boutons outline */
html.dark .sx-inv-wrap .btn-outline-secondary {
  background: #1e2130;
  color: #cbd5e1;
  border-color: rgba(255,255,255,.12);
}
html.dark .sx-inv-wrap .btn-outline-secondary:hover {
  background: #252836;
  color: #f1f5f9;
}
/* Impression : forcer fond blanc même en dark */
@media print {
  html.dark .sx-inv-wrap,
  html.dark .sx-inv-wrap * {
    background: #fff !important;
    color: #000 !important;
    border-color: #e5e7eb !important;
  }
}

/* ── reparation.php ─────────────────────────────────────────── */

/* Stepper steps */
html.dark .rep-step {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  color: #94a3b8;
}
html.dark .rep-step .rep-step-num {
  background: rgba(255,255,255,.08);
  color: #cbd5e1;
}
html.dark .rep-step.active {
  background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(139,92,246,.18));
  border-color: rgba(99,102,241,.4);
  color: #a5b4fc;
}

/* Brand pills */
html.dark .rep-brand-pill {
  background: #1a1d27;
  border-color: rgba(255,255,255,.08);
  color: #cbd5e1;
  box-shadow: none;
}
html.dark .rep-brand-pill:hover {
  border-color: rgba(99,102,241,.35);
  background: rgba(99,102,241,.08);
}
html.dark .rep-brand-pill.active {
  background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(139,92,246,.14));
  border-color: #6366f1;
  color: #a5b4fc;
}

/* Model cards */
html.dark .rep-model-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  box-shadow: none;
  color: #e2e8f0;
}
html.dark .rep-model-card:hover {
  border-color: rgba(99,102,241,.3);
  background: rgba(99,102,241,.06);
}
html.dark .rep-model-card.selected {
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(139,92,246,.10));
  border-color: #6366f1 !important;
}

/* Model search input */
html.dark .model-search {
  background: #1e2130;
  border-color: rgba(255,255,255,.1);
  color: #e2e8f0;
}
html.dark .model-search::placeholder { color: #64748b; }

/* Service cards */
html.dark .rep-svc-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  box-shadow: none;
}
html.dark .rep-svc-card:hover {
  border-color: rgba(99,102,241,.3);
}
html.dark .rep-svc-card.selected {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08));
  border-color: #6366f1;
}

/* Summary card */
html.dark .rep-summary-card {
  background: rgba(99,102,241,.06);
  border-color: rgba(99,102,241,.2);
}

/* dash-card dans reparation */
html.dark .dash-card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
}
html.dark .dash-card-header {
  background: #13151f;
  border-color: rgba(255,255,255,.07);
  color: #f1f5f9;
}

/* ── Mondial Relay widget card ──────────────────────────────── */
/* La card utilise .card.bg-white (Bootstrap utilitaire) */
html.dark .bg-white {
  background: #1a1d27 !important;
  color: #e2e8f0;
}
html.dark .card {
  background: #1a1d27;
  border-color: rgba(255,255,255,.07);
  color: #e2e8f0;
}
html.dark .card-body { background: #1a1d27; }
html.dark .text-muted { color: #64748b !important; }
html.dark .small.text-muted { color: #64748b !important; }
