/* Codes défauts: aide f formulaire, page "Codes défauts", lignes f rapport */
.dtc-help { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.dtc-help:empty { display: none; }
.dtc-help-hd { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-size: 13px; }
.dtc-help-hd span { color: var(--muted); font-size: 12px; }
.dtc-sug { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 13px; }
.dtc-sug b.s-h { color: #e9645b; } .dtc-sug b.s-m { color: #c99a00; }
.dtc-done { color: #16a34a; font-weight: 600; font-size: 12.5px; }

.dtc-card { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .03); }
body.light .dtc-card { background: #fff; }
.pane .dtc-card { margin-bottom: 12px; background: linear-gradient(180deg, rgba(18, 26, 60, .78), rgba(13, 20, 48, .78)); }
.dtc-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dtc-code { font-family: 'Sora', monospace; font-weight: 700; font-size: 15px; letter-spacing: .06em; background: #0b1128; color: #ffb21e; padding: 7px 9px; border-radius: 8px; }
.dtc-ttl { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dtc-ttl b { font-family: 'Sora', sans-serif; font-size: 14px; line-height: 1.3; color: var(--text); }
.dtc-ttl small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.dtc-pill { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.dtc-pill.s-c { background: rgba(233, 100, 91, .16); color: #e9645b; }
.dtc-pill.s-h { background: rgba(240, 145, 58, .16); color: #e07a1f; }
.dtc-pill.s-m { background: rgba(242, 201, 76, .2); color: #b08600; }
.dtc-pill.s-l { background: rgba(22, 163, 74, .14); color: #16a34a; }
.dtc-pill.s-u { background: rgba(138, 147, 173, .16); color: var(--muted); }
@media (max-width: 560px) { .dtc-head { grid-template-columns: auto 1fr; } .dtc-head .dtc-pill { grid-column: 1 / -1; justify-self: start; } }

.dtc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.dtc-body p { margin: 0; }
.dtc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.dtc-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .dtc-grid { grid-template-columns: 1fr; } }
.dtc-h { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cyan); margin-bottom: 6px; }
body.light .dtc-h { color: #4b5bd1; }
.dtc-muted { color: var(--muted); font-size: 12.5px; }
.dtc-drive { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; border-left: 0; }
.dtc-drive b { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.dtc-drive.s-c { background: rgba(233, 100, 91, .12); } .dtc-drive.s-c b { color: #e9645b; }
.dtc-drive.s-h { background: rgba(240, 145, 58, .12); } .dtc-drive.s-h b { color: #e07a1f; }
.dtc-drive.s-m { background: rgba(242, 201, 76, .16); } .dtc-drive.s-m b { color: #b08600; }
.dtc-drive.s-l { background: rgba(22, 163, 74, .12); } .dtc-drive.s-l b { color: #16a34a; }
.dtc-note { display: flex; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(108, 124, 240, .12); }
.dtc-note b { color: #6c7cf0; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; padding-top: 2px; }
.dtc-causes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dtc-causes li { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dtc-causes li:last-child { border-bottom: 0; }
.dtc-causes .t { color: var(--text); }
.dtc-causes .lk { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); align-self: center; }
.dtc-causes .bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.dtc-causes .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo), var(--cyan)); }
.dtc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dtc-tags span { font-size: 12.5px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--text-2); }
.dtc-more { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--cyan); text-decoration: none; }
body.light .dtc-more { color: #3f4fc9; }
.dtc-en summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.dtc-en p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

/* Page Codes défauts */
.dtc-search { margin-bottom: 14px; }
.dtc-form { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .dtc-form { grid-template-columns: 1fr; } }
.dtc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.dtc-form .input { width: 100%; }
.dtc-q { font-family: 'Sora', monospace; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.dtc-search .dtc-muted { margin: 10px 0 0; }

/* Rapport (Futuriste): code + titre */
.rp2 .dtcs { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.rp2 .dtc-r { display: grid; grid-template-columns: 8px auto 1fr; gap: 7px; align-items: baseline; font-size: 10.5px; line-height: 1.35; }
.rp2 .dtc-r i { width: 7px; height: 7px; border-radius: 50%; align-self: center; background: #8a93ad; }
.rp2 .dtc-r i.r { background: #dc2626; } .rp2 .dtc-r i.y { background: #e0a800; } .rp2 .dtc-r i.g { background: #16a34a; }
.rp2 .dtc-r b { font-family: 'Sora', sans-serif; font-size: 11px; color: #3f4bb8; white-space: nowrap; }
.rp2 .dtc-r span { color: var(--ink, #151a30); }
.rp2 .dtc-r em { font-style: normal; color: var(--muted, #6b7292); font-weight: 600; }

/* Carburant: liste f formulaire (nafs style dyal les champs) + tanbih */
.form select { width: 100%; background: rgba(6, 10, 24, .6); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; color: var(--text); outline: none; font: inherit; }
.form select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(55, 210, 230, .15); }
body.light .form select { background: #fff; }
.dtc-form select.input { width: 100%; }
.dtc-warn { padding: 9px 12px; border-radius: 10px; background: rgba(242, 201, 76, .16); color: var(--text); font-size: 13px; margin-bottom: 10px; }
.dtc-help .dtc-warn { margin-bottom: 0; }
.dtc-fuel { background: rgba(242, 201, 76, .16); }
.dtc-fuel b { color: #b08600; }
/* Liste déroulante: khalfiya w ktba dyal les choix wad7in f jouj thèmes */
.form select option, .dtc-form select option { background: #0d1430; color: #eef1ff; }
body.light .form select option { background: #ffffff; color: #151a30; }
/* ================= Page "Codes défauts" = interface 5abirAssist (sombre) ================= */
.xa {
  --xa-bg: #0A111B; --xa-panel: #111B28; --xa-panel-2: #0E1722; --xa-ink: #E6ECF3; --xa-ink-2: #C3CEDB; --xa-muted: #8E9CAE;
  --xa-line: #223043; --xa-line-2: #1A2636; --xa-brand: #7598DC; --xa-brand-ink: #07101F; --xa-brand-soft: #16233A;
  --xa-screen: #060B12; --xa-screen-ink: #FFB21E; --xa-screen-muted: #5D6D82;
  --xa-red: #F07166; --xa-red-soft: #3A1B19; --xa-orange: #F2984F; --xa-orange-soft: #3A2614;
  --xa-yellow: #E3C24C; --xa-yellow-soft: #322C10; --xa-green: #5CC98B; --xa-green-soft: #132D1F; --xa-muted-soft: #1A2636;
  --xa-display: 'Sora', 'Inter', system-ui, sans-serif; --xa-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color: var(--xa-ink); font-size: 15.5px; line-height: 1.5;
}
.xa *, .xa *::before { box-sizing: border-box; }
.xa-page { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .xa-page { grid-template-columns: 1fr; } }
.xa-panel { background: var(--xa-panel); border: 1px solid var(--xa-line); border-radius: 12px; }
.xa-session { position: sticky; top: 16px; display: flex; flex-direction: column; }
@media (max-width: 900px) { .xa-session { position: static; } }
.xa-session-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--xa-line-2); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.xa-session-head h2 { margin: 0; font: 700 18px/1.2 var(--xa-display); }
.xa-session-head span { font-size: 13px; color: var(--xa-muted); }
.xa-session-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.xa-field label, .xa-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--xa-muted); margin-bottom: 6px; }
.xa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xa input, .xa select { width: 100%; font: inherit; font-size: 16px; color: var(--xa-ink); background: var(--xa-panel-2); border: 1px solid var(--xa-line); border-radius: 8px; padding: 10px 12px; outline: none; }
.xa input:focus, .xa select:focus { border-color: var(--xa-brand); box-shadow: 0 0 0 3px var(--xa-brand-soft); }
.xa select option { background: var(--xa-panel); color: var(--xa-ink); }
.xa-codebox { background: var(--xa-screen); border-radius: 10px; padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 56px; cursor: text; border: 1px solid transparent; }
.xa-codebox:focus-within { border-color: var(--xa-screen-ink); }
.xa .xa-codebox input { flex: 1; min-width: 120px; background: transparent; border: 0; box-shadow: none; color: var(--xa-screen-ink); font: 700 18px var(--xa-mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 4px; }
.xa .xa-codebox input::placeholder { color: var(--xa-screen-muted); font: 500 14px var(--xa-display); letter-spacing: 0; text-transform: none; }
.xa-chip { display: inline-flex; align-items: center; gap: 4px; font: 700 15px var(--xa-mono); letter-spacing: .05em; color: var(--xa-screen); background: var(--xa-screen-ink); border-radius: 6px; padding: 5px 4px 5px 9px; }
.xa-chip button { border: 0; background: transparent; color: inherit; font: 700 17px/1 sans-serif; cursor: pointer; padding: 0 5px; opacity: .7; }
.xa-hint { font-size: 13px; color: var(--xa-muted); margin: 6px 0 0; }
.xa-hint.warn { color: var(--xa-orange); }
.xa-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: 10px; padding: 14px 16px; cursor: pointer; background: var(--xa-brand); color: var(--xa-brand-ink); font: 700 16px/1 var(--xa-display); letter-spacing: .06em; text-transform: uppercase; }
.xa-btn:hover { filter: brightness(1.08); }
.xa-count { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--xa-muted); }
.xa-count i { width: 8px; height: 8px; border-radius: 50%; background: #3DD68C; box-shadow: 0 0 0 3px rgba(61, 214, 140, .18); }
.xa-history { border-top: 1px solid var(--xa-line-2); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.xa-history[hidden] { display: none; }
.xa-history-list { display: flex; flex-direction: column; }
.xa-history-list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: start; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--xa-line-2); padding: 10px 2px; color: var(--xa-ink); font: inherit; font-size: 14.5px; cursor: pointer; }
.xa-history-list button:last-child { border-bottom: 0; }
.xa-history-list button:hover { color: var(--xa-brand); }
.xa-history-list .codes { font: 500 12.5px var(--xa-mono); color: var(--xa-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48%; }

.xa-results { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.xa-state { padding: 26px 20px; display: flex; flex-direction: column; gap: 6px; }
.xa-state b { font: 700 19px var(--xa-display); }
.xa-state b.err { color: var(--xa-red); }
.xa-state span { color: var(--xa-muted); }
.xa-overview { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.xa-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--xa-muted); margin: 0 0 4px; }
.xa-ov-top h1 { margin: 0; font: 700 26px/1.1 var(--xa-display); }
.xa-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.xa-stat { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--xa-panel-2); border: 1px solid var(--xa-line-2); font-size: 14px; color: var(--xa-ink-2); }
.xa-stat b { font: 700 16px var(--xa-mono); color: var(--xa-ink); }
.xa-stat .sq { width: 9px; height: 9px; border-radius: 2px; }
.xa-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.xa-order .arrow { color: var(--xa-muted); }
.xa-insight { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: rgba(117, 152, 220, .14); color: var(--text, #E6ECF3); font-size: 14.5px; }
.xa-insight svg { flex: none; margin-top: 2px; color: #7598DC; }
body.light .xa-insight { background: #e7edf8; color: #151a30; }
body.light .xa-insight svg { color: #3f66b0; }
.xa-warn { padding: 10px 12px; border-radius: 10px; background: var(--xa-yellow-soft); color: var(--xa-ink); font-size: 14px; }

.xa-card { overflow: hidden; }
.xa-card-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--xa-line-2); }
@media (max-width: 560px) { .xa-card-head { grid-template-columns: auto 1fr; padding: 14px 16px; } .xa-card-head .xa-pill { grid-column: 1 / -1; justify-self: start; } }
.xa-code { font: 700 19px/1 var(--xa-mono); letter-spacing: .06em; background: var(--xa-screen); color: var(--xa-screen-ink); padding: 10px 12px; border-radius: 8px; }
.xa-card-title { min-width: 0; }
.xa-card-title .t { margin: 0; font: 700 17px/1.3 var(--xa-display); }
.xa-card-title .s { margin: 3px 0 0; font-size: 13px; color: var(--xa-muted); overflow-wrap: anywhere; }
.xa-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.xa-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.xa-pill.l { background: var(--xa-green-soft); color: var(--xa-green); }
.xa-pill.m { background: var(--xa-yellow-soft); color: var(--xa-yellow); }
.xa-pill.h { background: var(--xa-orange-soft); color: var(--xa-orange); }
.xa-pill.c { background: var(--xa-red-soft); color: var(--xa-red); }
.xa-pill.u { background: var(--xa-muted-soft); color: var(--xa-muted); }
.xa-card-body { padding: 18px 20px 20px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 28px; }
@media (max-width: 760px) { .xa-card-body { grid-template-columns: 1fr; padding: 16px; } }
.xa-card-body .full { grid-column: 1 / -1; }
.xa .sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.xa .sec h3 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--xa-muted); }
.xa .sec p { margin: 0; color: var(--xa-ink-2); }
.xa-drive { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--xa-line); }
.xa-drive .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.xa-drive b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--xa-muted); font-weight: 600; margin-bottom: 2px; }
.xa-drive p { margin: 0; color: var(--xa-ink-2); }
.xa-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--xa-brand-soft); }
.xa-note b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--xa-brand); font-weight: 600; white-space: nowrap; padding-top: 2px; }
.xa-note.fuel { background: var(--xa-yellow-soft); }
.xa-note.fuel b { color: var(--xa-yellow); }
.xa-causes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.xa-causes li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--xa-line-2); }
.xa-causes li:first-child { padding-top: 0; }
.xa-causes li:last-child { border-bottom: 0; }
.xa-causes .txt { color: var(--xa-ink); font-size: 15px; }
.xa-causes .lk { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--xa-muted); align-self: center; }
.xa-causes .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--xa-line-2); overflow: hidden; }
.xa-causes .bar i { display: block; height: 100%; border-radius: 2px; background: var(--xa-brand); }
.xa-causes li.H .lk { color: var(--xa-brand); }
.xa-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.xa-tags span { font-size: 14px; padding: 5px 10px; border-radius: 7px; background: var(--xa-panel-2); border: 1px solid var(--xa-line-2); color: var(--xa-ink-2); }
.xa-decode { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.xa-decode dt { color: var(--xa-muted); font-family: var(--xa-mono); }
.xa-decode dd { margin: 0; }
.xa-en summary { cursor: pointer; font-size: 14px; color: var(--xa-muted); }
.xa-en p { margin: 8px 0 0; font-size: 14px; color: var(--xa-muted); }
.xa-foot { font-size: 12.5px; color: var(--xa-muted); margin: 0; }
/* Listes Marque / Modèle (page Codes défauts): nafs thème ghamd */
.xa .combo { position: relative; }
.xa .combo-list { background: var(--xa-panel); border-color: var(--xa-line); box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .6); }
.xa .combo-list button { color: var(--xa-ink); }
.xa .combo-list button:hover, .xa .combo-list button:focus { background: var(--xa-brand-soft); }
.xa .combo-list em { color: var(--xa-muted); }