/* SINVEX AUTOMOBILE — configurateur « Choisissez votre véhicule » (ajout 2026-09)
   Utilise les variables du site (--ink, --paper, --line…) : le mode sombre suit html[data-theme="dark"]. */
.sx-conf {
  --sx-gold: #C9A227; --sx-cta: #F2A900;
  --sx-text: var(--ink, #14120F); --sx-muted: var(--ink3, #5F5A50);
  --sx-line: var(--line, rgba(20,18,15,.10)); --sx-border: var(--line2, rgba(20,18,15,.16));
  --sx-bg: var(--paper2, #F5F2EA);
  --sx-sel-bg: var(--ink, #14120F); --sx-sel-text: var(--paper, #EDEAE1);
  --sx-panel: #14120F; --sx-ptext: #F2EBDC; --sx-pmuted: rgba(242,235,220,.64); --sx-pline: rgba(242,235,220,.22);
  --sx-f-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --sx-f-serif: 'Spectral', Georgia, 'Songti SC', 'Noto Serif SC', 'Times New Roman', serif;
  --sx-f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  position: relative;
  margin-top: 52px;
  scroll-margin-top: 96px; /* le menu fixe ne cache pas le titre quand on arrive par un lien */
  color: var(--sx-text);
  font-family: var(--sx-f-ui); font-weight: 500; font-size: 16px; line-height: 1.45;
}
.sx-conf:lang(ar) { --sx-f-ui: 'Tajawal', Tahoma, 'Segoe UI', sans-serif; --sx-f-serif: 'Tajawal', Tahoma, serif; }
html[data-theme="dark"] .sx-conf { --sx-panel: #24211B; --sx-pline: rgba(242,235,220,.16); }
html[data-theme="dark"] .sx-ledger { border: 1px solid rgba(226,220,206,.12); }

.sx-conf *, .sx-conf *::before, .sx-conf *::after { box-sizing: border-box; }
.sx-conf :focus-visible { outline: 2px solid var(--sx-gold); outline-offset: 2px; }
.sx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête */
.sx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 40px; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid var(--sx-gold); }
.sx-title { margin: 0; font-family: var(--sx-f-serif); font-weight: 600; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.15; letter-spacing: .14em; text-transform: uppercase; color: var(--sx-text); }
.sx-conf:lang(zh) .sx-title, .sx-conf:lang(ar) .sx-title { letter-spacing: 0; text-transform: none; }
.sx-intro { margin: 0; max-width: 34rem; font-family: var(--sx-f-serif); font-weight: 400; font-size: 16px; line-height: 1.6; color: var(--ink2, #4A453D); }

/* Grille */
.sx-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 44px; }
@media (min-width: 960px) {
  .sx-grid { grid-template-columns: minmax(0, 7fr) minmax(21rem, 5fr); align-items: start; }
  .sx-ledger { position: sticky; top: var(--sx-sticky-top, 96px); margin-top: 16px; }
}

/* Étapes */
.sx-steps { list-style: none; margin: 0; padding: 0; }
.sx-step { display: grid; grid-template-columns: 2rem 8rem minmax(0, 1fr); gap: 5px 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--sx-line); transition: opacity .2s; }
.sx-step:last-child { border-bottom: 0; }
.sx-step[aria-disabled="true"] { opacity: .42; }
.sx-step[aria-disabled="true"] .sx-ctrl { pointer-events: none; }
.sx-num { font-family: var(--sx-f-mono); font-weight: 400; font-size: 13px; color: var(--sx-muted); padding-top: 8px; }
.sx-label { font-size: 15px; font-weight: 600; padding-top: 7px; }
.sx-ctrl { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.sx-hint { grid-column: 3; margin: 3px 0 0; font-weight: 400; font-size: 13px; color: var(--sx-muted); }
.sx-hintlink { color: var(--sx-muted); text-decoration: underline; text-decoration-color: var(--sx-gold); text-underline-offset: 3px; }
.sx-hintlink:hover { color: var(--sx-text); }
.sx-placeholder { margin: 7px 0 0; font-weight: 400; font-size: 14px; color: var(--sx-muted); }
@media (max-width: 600px) {
  .sx-step { grid-template-columns: 1.6rem minmax(0, 1fr); align-items: baseline; }
  .sx-ctrl, .sx-hint { grid-column: 1 / -1; }
  .sx-num, .sx-label { padding-top: 0; }
}

/* Choix */
.sx-chip { font: inherit; font-size: 14px; line-height: 1.1; padding: 9px 14px; border: 1px solid var(--sx-border); border-radius: 40px; background: transparent; color: var(--sx-text); cursor: pointer; box-shadow: inset 0 -2px 0 transparent; transition: background-color .15s, color .15s, border-color .15s; }
.sx-chip:hover:not(:disabled) { border-color: var(--sx-text); }
.sx-chip[aria-pressed="true"] { background: var(--sx-sel-bg); color: var(--sx-sel-text); border-color: var(--sx-sel-bg); box-shadow: inset 0 -2px 0 var(--sx-gold); }
.sx-chip:disabled { cursor: default; }

/* Budget */
.sx-budget { display: flex; align-items: center; gap: 16px; width: 100%; max-width: 30rem; }
.sx-range { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 24px; margin: 0; background: transparent; cursor: pointer; }
.sx-range:disabled { cursor: default; }
.sx-range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--sx-text) var(--p, 50%), var(--sx-border) var(--p, 50%)); }
.sx-conf[dir="rtl"] .sx-range::-webkit-slider-runnable-track { background: linear-gradient(to left, var(--sx-text) var(--p, 50%), var(--sx-border) var(--p, 50%)); }
.sx-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--sx-bg); border: 2px solid var(--sx-text); }
.sx-range::-moz-range-track { height: 2px; background: var(--sx-border); }
.sx-range::-moz-range-progress { height: 2px; background: var(--sx-text); }
.sx-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--sx-bg); border: 2px solid var(--sx-text); }
.sx-budget-val { font-family: var(--sx-f-mono); font-size: 16px; font-variant-numeric: tabular-nums; min-width: 9ch; text-align: end; unicode-bidi: isolate; }

/* Relevé de coûts */
.sx-ledger { background: var(--sx-panel); color: var(--sx-ptext); padding: clamp(20px, 2.5vw, 28px); border-radius: 16px; box-shadow: var(--shadow, none); }
.sx-lhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--sx-pline); }
.sx-vehicle { margin: 0; font-family: var(--sx-f-serif); font-weight: 600; font-size: 21px; line-height: 1.2; color: var(--sx-ptext); }
.sx-vmeta { margin: 5px 0 0; font-weight: 400; font-size: 13px; color: var(--sx-pmuted); }
.sx-cur { display: flex; flex-shrink: 0; border: 1px solid var(--sx-pline); border-radius: 40px; overflow: hidden; }
.sx-cur button { font-family: var(--sx-f-mono); font-size: 11px; padding: 6px 9px; border: 0; background: transparent; color: var(--sx-pmuted); cursor: pointer; }
.sx-cur button[aria-pressed="true"] { background: var(--sx-ptext); color: #14120F; }
@media (max-width: 600px) { .sx-cur button { font-size: 12px; padding: 10px 11px; } }
.sx-lines { list-style: none; margin: 0; padding: 5px 0 0; }
.sx-line { padding: 10px 0; }
.sx-line-main { display: flex; align-items: baseline; gap: 8px; }
.sx-line-label { font-size: 15px; }
.sx-leader { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--sx-pline); transform: translateY(-.28em); }
.sx-amt { font-family: var(--sx-f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; unicode-bidi: isolate; }
.sx-line-detail { margin: 3px 0 0; font-weight: 400; font-size: 12.5px; line-height: 1.4; color: var(--sx-pmuted); }
.sx-total { margin-top: 6px; padding-top: 16px; border-top: 3px double var(--sx-gold); }
.sx-total-label { display: block; font-size: 15px; }
.sx-total-amt { display: block; margin: 2px 0; font-family: var(--sx-f-mono); font-weight: 500; font-size: clamp(32px, 4vw, 42px); line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; unicode-bidi: isolate; color: var(--sx-ptext); }
.sx-range-txt { font-weight: 400; font-size: 13px; color: var(--sx-pmuted); }
.sx-bbar { position: relative; height: 6px; margin: 18px 0 9px; border-radius: 3px; background: rgba(242,235,220,.14); }
.sx-bfill { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); border-radius: 3px; background: var(--sx-ptext); transition: width .3s ease-out; }
.sx-btick { position: absolute; top: -5px; bottom: -5px; width: 2px; inset-inline-start: var(--t); background: var(--sx-gold); }
.sx-verdict { margin: 0; font-size: 14px; }
.sx-noalt { margin: 10px 0 0; font-weight: 400; font-size: 13px; color: var(--sx-pmuted); }
.sx-alts { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--sx-pline); }
.sx-alts-title { margin: 0 0 3px; font-weight: 500; font-size: 13px; color: var(--sx-pmuted); }
.sx-alt { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border: 0; border-bottom: 1px dotted var(--sx-pline); background: none; color: var(--sx-ptext); font: inherit; font-size: 14px; text-align: start; cursor: pointer; }
.sx-alt:last-child { border-bottom: 0; }
.sx-alt small { display: block; margin-top: 2px; font-weight: 400; font-size: 12px; color: var(--sx-pmuted); }
.sx-alt:hover .sx-alt-name { text-decoration: underline; text-decoration-color: var(--sx-gold); text-underline-offset: 3px; }
.sx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.sx-btn { flex: 1 1 auto; display: inline-flex; justify-content: center; padding: 15px 24px; border-radius: 46px; border: 1px solid var(--sx-cta); background: var(--sx-cta); color: #14120F !important; font-family: var(--sx-f-ui); font-weight: 600; font-size: 15px; text-align: center; text-decoration: none; transition: background .2s, transform .2s; }
.sx-btn:hover { background: #FFB81A; transform: translateY(-1px); }
.sx-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.sx-link { color: var(--sx-ptext); font-size: 14px; text-decoration: underline; text-decoration-color: var(--sx-gold); text-underline-offset: 4px; }
.sx-notes { margin-top: 18px; font-weight: 400; font-size: 12px; line-height: 1.5; color: var(--sx-pmuted); }
.sx-notes p { margin: 7px 0 0; }
.sx-flag { color: var(--sx-ptext); padding-inline-start: 11px; border-inline-start: 2px solid var(--sx-gold); }

/* Rappel du total en bas d'écran (mobile) — marge à droite pour le bouton « haut de page » */
.sx-peek { display: none; }
@media (max-width: 959px) {
  .sx-peek { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; margin-top: 16px; padding: 13px 76px calc(13px + env(safe-area-inset-bottom, 0px)) 16px; border: 0; border-top: 1px solid var(--sx-gold); border-radius: 14px 14px 0 0; background: var(--sx-panel); color: var(--sx-ptext); font: inherit; font-size: 14px; cursor: pointer; }
  .sx-peek[hidden] { display: none; }
  .sx-peek .sx-amt { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-conf *, .sx-conf *::before, .sx-conf *::after { transition: none !important; }
}
