:root {
    --bg: #0f172a;
    --card: #1e293b;
    --txt: #e2e8f0;
    --muted: #94a3b8;
    --acc: #3b82f6;
    --ok: #22c55e;
    --warn: #eab308;
    --err: #ef4444;
    --mono: ui-monospace, Menlo, monospace;
}

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

body {
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--txt);
    min-height: 100vh;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 40px 20px; }
.wrap--wide { max-width: 1000px; padding: 32px 20px; }

h1 { font-size: 28px; margin-bottom: 8px; }
.wrap--wide h1 { font-size: 36px; margin-bottom: 10px; }

.sub { color: var(--muted); margin-bottom: 32px; }
.wrap--wide .sub { font-size: 13px; margin-bottom: 24px; }

.card { background: var(--card); border-radius: 12px; padding: 28px; margin-bottom: 24px; }
.wrap--wide .card { padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 24px; margin-bottom: 12px; }

label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }

input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #0f172a;
    color: var(--txt);
    font-size: 15px;
    margin-bottom: 16px;
}

button {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 8px;
    background: var(--acc);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
button:hover { opacity: .9; }

.msg { padding: 12px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.msg.err { background: #7f1d1d; color: #fecaca; }
.msg.ok { background: #14532d; color: #bbf7d0; }

.adspace {
    background: #1e293b;
    border: 1px dashed #334155;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    color: #475569;
    font-size: 13px;
    margin-bottom: 24px;
}
.wrap--wide .adspace { padding: 20px; margin-bottom: 16px; }

.about { font-size: 14px; line-height: 1.7; color: var(--muted); }

footer { text-align: center; color: #475569; font-size: 12px; padding: 24px; }

/* --- Tableaux resultats --- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    text-align: left;
    color: var(--muted);
    font-weight: 500;
    padding: 6px 8px;
    border-bottom: 1px solid #334155;
}
td { padding: 6px 8px; border-bottom: 1px solid #24324a; vertical-align: top; }

/* --- Badges --- */
.b {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 12px;
    background: #334155;
}
.b.ok { background: #14532d; color: #bbf7d0; }
.b.warn { background: #713f12; color: #fde68a; }
.b.err { background: #7f1d1d; color: #fecaca; }
.b.muted { color: #64748b; }
.b.info { background: #1e3a5f; color: #bfdbfe; }

.raw { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }

.pending { text-align: center; padding: 60px 20px; }

/* --- Lignes depliables --- */
.row-toggle { cursor: pointer; user-select: none; }
.row-toggle:hover { background: #243247; }
.row-toggle td:first-child::before { content: "\25B8 "; color: var(--acc); font-size: 24px; }
.row-toggle.open td:first-child::before { content: "\25BE "; }

.detail-row td { background: #172033; padding: 0; }
.detail-inner { padding: 16px 20px; }
.detail-inner h4 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: .5px;
    margin: 14px 0 6px;
}
.detail-inner h4:first-child { margin-top: 0; }

.recbox {
    font-family: var(--mono);
    font-size: 12px;
    background: #0b1220;
    border-radius: 6px;
    padding: 10px;
    word-break: break-all;
    color: #cbd5e1;
    margin: 4px 0;
}

.kv { width: 100%; font-size: 12px; }
.kv td { padding: 4px 8px; border-bottom: 1px solid #1e293b; }
.kv td:first-child { color: var(--muted); width: 220px; }

.inherit {
    background: #1e3a5f;
    border-left: 3px solid var(--acc);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin: 4px 0;
}

.loading { color: var(--muted); font-size: 12px; padding: 10px; }

.qual { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 12px; font-family: var(--mono); }
.qual.p { background: #14532d; color: #bbf7d0; }
.qual.m { background: #7f1d1d; color: #fecaca; }
.qual.t { background: #713f12; color: #fde68a; }
.qual.q { background: #334155; }

.st-resolved { color: #22c55e; }
.st-void { color: #eab308; }
.st-error { color: #ef4444; }
.st-pending { color: #94a3b8; }

.mx-list { display: flex; flex-direction: column; gap: 4px; }
.card--wildcard { border-left: 3px solid var(--acc); }
.btn-detail { cursor: pointer; border: none; width: auto; }

/* --- Selecteur de langue --- */
.lang-switch { text-align: right; font-size: 12px; margin-bottom: 12px; }
.lang-switch a { color: var(--muted); text-decoration: none; margin-left: 8px; }
.lang-switch a.active { color: var(--acc); font-weight: 600; }
