/* MonWhois : thème « terminal » */

:root {
    --bg: #0a0d12;
    --panel: #10151c;
    --panel-2: #151b24;
    --line: #1f2935;
    --text: #c9d1d9;
    --muted: #7d8590;
    --bright: #f0f6fc;
    --red: #ff5a45;      /* rouge MonWhois */
    --green: #3fb950;
    --yellow: #d29922;
    --cyan: #58a6ff;
    --magenta: #bc8cff;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-border-color: var(--line);
    --bs-link-color: var(--cyan);
    --bs-link-hover-color: var(--bright);
    --bs-link-color-rgb: 88, 166, 255;
    --bs-link-hover-color-rgb: 240, 246, 252;
}

body {
    font-family: var(--sans);
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 90, 69, .10), transparent 60%),
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 100% 28px,
        var(--bg);
    color: var(--text);
    font-size: 15px;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--bright); text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd, .mono { font-family: var(--mono); }
code { color: var(--magenta); }
::selection { background: rgba(255, 90, 69, .35); color: #fff; }

/* ---------------------------------------------------------------- en-tête */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 13, 18, .85); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.dots { display: inline-flex; gap: 6px; margin-right: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.logo { font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--bright); display: flex; align-items: center; gap: 10px; }
.logo:hover { color: var(--bright); text-decoration: none; }
.logo img { filter: grayscale(.2); }
.logo-text { color: var(--bright); }
.logo b { color: var(--red); font-weight: 700; }
.logo .cursor { width: 9px; height: 18px; background: var(--red); display: inline-block; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.site-header nav a { font-family: var(--mono); color: var(--muted); font-size: 14px; }
.site-header nav a::before { content: "["; color: var(--line); }
.site-header nav a::after { content: "]"; color: var(--line); }
.site-header nav a:hover { color: var(--bright); text-decoration: none; }

.search-mini { display: flex; align-items: center; font-family: var(--mono); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding-left: 10px; }
.search-mini::before { content: "$ whois"; color: var(--green); font-size: 13px; white-space: nowrap; }
.search-mini input { background: transparent; border: 0; color: var(--bright); padding: 6px 10px; width: 220px; outline: none; font-family: var(--mono); font-size: 14px; }
.search-mini button { border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); padding: 6px 12px; font-family: var(--mono); font-size: 13px; }
.search-mini button:hover { color: var(--bright); }
.search-mini:focus-within { border-color: var(--red); }

/* ---------------------------------------------------------------- terminal (accueil, erreurs) */
.hero { padding: 64px 0 40px; }
.hero-title { font-family: var(--mono); font-size: clamp(26px, 4vw, 44px); font-weight: 700; color: var(--bright); letter-spacing: -.5px; line-height: 1.2; }
.hero-title span { color: var(--red); }
.hero-text { color: var(--muted); max-width: 680px; font-size: 16px; margin: 18px 0 30px; }

.term { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; max-width: 820px; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.term-body { padding: 18px 20px; font-family: var(--mono); }
.term-body .out { color: var(--muted); font-size: 13px; margin: 14px 0 0; line-height: 1.8; }
.term-body .out b { color: var(--text); font-weight: 400; }

.search-form { display: flex; align-items: center; gap: 10px; font-family: var(--mono); }
.search-form::before { content: "$ whois"; color: var(--green); font-size: 20px; white-space: nowrap; }
.search-form input {
    flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px dashed var(--line);
    color: var(--bright); font-family: var(--mono); font-size: 20px; padding: 6px 2px; outline: none; caret-color: var(--red);
}
.search-form input:focus { border-bottom-color: var(--red); }
.search-form input::placeholder { color: #3d4753; }
.search-form button {
    border: 1px solid var(--red); background: rgba(255, 90, 69, .12); color: var(--red); border-radius: 6px;
    padding: 8px 16px; font-family: var(--mono); font-size: 14px; white-space: nowrap;
}
.search-form button:hover { background: var(--red); color: #fff; }
.hero-examples { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* ---------------------------------------------------------------- en-tête de page */
.page-head { padding: 34px 0 22px; }
.page-head h1 { font-family: var(--mono); font-weight: 700; color: var(--bright); font-size: clamp(22px, 3.4vw, 34px); word-break: break-word; letter-spacing: -.5px; }
.page-head h1.prompt::before { content: "$ "; color: var(--green); }
.hl { color: var(--red); }
.page-head h1.prompt .hl::after { content: ""; display: inline-block; width: .5em; height: .9em; margin-left: 4px; background: var(--red); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
.crumbs { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.sub { margin: 8px 0 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.lead { color: var(--muted); }

/* ---------------------------------------------------------------- panneaux */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: none; color: var(--text); }
.card-body { padding: 18px 20px; }
.h-section {
    font-family: var(--mono); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--muted); margin: -18px -20px 16px; padding: 10px 20px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 8px; background: var(--panel-2); border-radius: 10px 10px 0 0;
}
.h-section::before { content: "##"; color: var(--red); }
.h-section span { color: var(--text); }

.facts { font-size: 15.5px; line-height: 1.75; color: var(--text); }

.keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; margin: 0; font-family: var(--mono); font-size: 13.5px; }
.keyfacts > div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.keyfacts dt { color: var(--muted); font-weight: 400; min-width: 92px; text-transform: lowercase; }
.keyfacts dt::before { content: "> "; color: var(--red); }
.keyfacts dd { margin: 0; color: var(--bright); word-break: break-word; }

.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line); font-size: 14px; }
.table thead th { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 400; }
.kv th { width: 30%; font-family: var(--mono); font-weight: 400; color: var(--muted); white-space: nowrap; font-size: 13px; text-transform: lowercase; }
.kv th::before { content: "> "; color: var(--red); }
.kv td { font-family: var(--mono); font-size: 13.5px; color: var(--bright); word-break: break-word; }
.kv td small, .text-muted { color: var(--muted) !important; }

.badge { font-family: var(--mono); font-weight: 400; border-radius: 4px; padding: .3em .55em; letter-spacing: .3px; }
.text-bg-success { background: rgba(63, 185, 80, .15) !important; color: var(--green) !important; border: 1px solid rgba(63, 185, 80, .4); }
.text-bg-primary { background: rgba(88, 166, 255, .15) !important; color: var(--cyan) !important; border: 1px solid rgba(88, 166, 255, .4); }
.text-bg-warning { background: rgba(210, 153, 34, .15) !important; color: var(--yellow) !important; border: 1px solid rgba(210, 153, 34, .4); }
.text-bg-danger { background: rgba(255, 90, 69, .15) !important; color: var(--red) !important; border: 1px solid rgba(255, 90, 69, .4); }
.text-bg-secondary, .text-bg-light { background: var(--panel-2) !important; color: var(--text) !important; border: 1px solid var(--line); }
.text-success { color: var(--green) !important; }
.text-danger { color: var(--red) !important; }
.text-warning-emphasis { color: var(--yellow) !important; }
.alert-warning { background: rgba(210, 153, 34, .1); color: var(--yellow); border: 1px solid rgba(210, 153, 34, .4); font-family: var(--mono); font-size: 14px; }
.btn-outline-danger { font-family: var(--mono); --bs-btn-color: var(--red); --bs-btn-border-color: var(--red); --bs-btn-hover-bg: var(--red); --bs-btn-hover-border-color: var(--red); }

/* whois brut coloré */
details summary { cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--muted); }
details summary:hover { color: var(--bright); }
.whois-raw {
    max-height: 560px; overflow: auto; background: #06080b; color: #a5b1bd; border: 1px solid var(--line);
    padding: 16px; border-radius: 8px; font-size: 12.5px; line-height: 1.6; margin-top: 12px; white-space: pre-wrap; word-break: break-word;
}
.whois-raw .k { color: var(--cyan); }
.whois-raw .c { color: #4b5663; font-style: italic; }

.host { padding: 10px 0; border-bottom: 1px dashed var(--line); font-family: var(--mono); font-size: 13px; }
.host:last-child { border-bottom: 0; }
.flag { vertical-align: baseline; margin-right: 2px; }

.checks { list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 13.5px; }
.checks li { padding: 5px 0 5px 34px; position: relative; }
.checks li::before { position: absolute; left: 0; top: 5px; }
.checks li.ok::before { content: "[✓]"; color: var(--green); }
.checks li.warn::before { content: "[!]"; color: var(--yellow); }
.checks li.ko::before { content: "[✕]"; color: var(--red); }

/* ---------------------------------------------------------------- listes et stats */
.domain-list { list-style: none; padding: 0; margin: 0; counter-reset: n; font-family: var(--mono); font-size: 13.5px; }
.domain-list li { counter-increment: n; padding: 4px 0; display: flex; gap: 10px; border-bottom: 1px dashed rgba(31, 41, 53, .6); }
.domain-list li::before { content: counter(n, decimal-leading-zero); color: #3d4753; min-width: 22px; }
.domain-list a { color: var(--text); word-break: break-all; }
.domain-list a:hover { color: var(--red); }
.domain-list .meta { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.columns-2 { columns: 2 260px; column-gap: 30px; }
.columns-2 li { break-inside: avoid; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpis > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kpis strong { display: block; font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--bright); }
.kpis span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.kpis span::before { content: "// "; color: var(--red); }
.kpis-sm > div { background: var(--panel-2); padding: 10px 12px; }
.kpis-sm strong { font-size: 20px; }

.bars { list-style: none; padding: 0; margin: 0; font-family: var(--mono); }
.bars li { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.bars .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .bar { background: var(--panel-2); height: 8px; border-radius: 2px; overflow: hidden; }
.bars .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #ff8a65); }
.bars .n { color: var(--bright); }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.chart .col-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.chart .col-bar span { display: block; width: 100%; background: var(--green); opacity: .85; border-radius: 2px 2px 0 0; box-shadow: 0 0 8px rgba(63, 185, 80, .35); }
.chart .col-bar:hover span { opacity: 1; background: var(--red); box-shadow: 0 0 8px rgba(255, 90, 69, .5); }
.chart + div { font-family: var(--mono); font-size: 11px; }

.seo-text { color: var(--muted); max-width: 900px; }
.seo-text h2 { font-family: var(--mono); font-size: 18px; color: var(--bright); margin-top: 28px; }
.seo-text h2::before { content: "## "; color: var(--red); }
.seo-text strong { color: var(--text); }
.seo-text li::marker { color: var(--red); }

/* ---------------------------------------------------------------- pied */
.site-footer { text-align: center; padding: 28px 10px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: underline; }

@media (max-width: 575px) {
    .search-form { flex-wrap: wrap; }
    .search-form::before, .search-form input { font-size: 16px; }
    .search-form button { width: 100%; }
    .search-mini { order: 3; width: 100%; }
    .search-mini input { flex: 1; width: auto; }
}

/* FAQ des fiches */
.faq h3 { font-family: var(--mono); font-size: 14.5px; color: var(--bright); margin: 18px 0 6px; }
.faq h3::before { content: "? "; color: var(--red); }
.faq h3:first-of-type { margin-top: 0; }
.faq p { color: var(--text); margin-bottom: 0; line-height: 1.7; }

/* Pages légales */
mark.todo { background: rgba(210, 153, 34, .18); color: var(--yellow); padding: 0 .3em; border-radius: 3px; font-family: var(--mono); font-size: .9em; }
.legal ol li, .legal ul li { margin-bottom: 6px; }

/* Domaines internationaux : punycode discret */
.puny { font-size: .6em; color: var(--muted); font-weight: 400; }
.domain-list .puny { font-size: .85em; }

/* Compte */
.account .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.account .form-control { background: var(--bg); border-color: var(--line); color: var(--bright); font-family: var(--mono); }
.account .form-control:focus { border-color: var(--green); box-shadow: none; }
.account .alert { font-size: 14px; }
.btn-primary { font-family: var(--mono); --bs-btn-bg: var(--green); --bs-btn-border-color: var(--green); --bs-btn-color: #04110a; --bs-btn-hover-bg: var(--bright); --bs-btn-hover-border-color: var(--bright); --bs-btn-hover-color: #04110a; }
.watch-box { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.watch-box .btn { font-family: var(--mono); }
.watch-box .watching { color: var(--green); border-color: var(--green); }
.watch-table th { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.watch-table td { font-size: 14px; }
.checks li.info::before { content: "[i]"; color: var(--muted); }
.checks.advice li { padding-bottom: 10px; }
.checks.advice li strong { color: var(--bright); }
.checks.advice li span { font-family: var(--sans, Inter, sans-serif); font-size: 14px; color: var(--text); display: block; }
.avail-table tr.available th { color: var(--green); }
.avail-table tr.registered th { color: var(--muted); }
.api-docs pre.code, .api-key { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px; color: var(--bright); font-size: 13px; overflow-x: auto; }
.api-docs .kv th { white-space: nowrap; }
.history { list-style: none; padding: 0; margin: 0 0 10px; border-left: 2px solid var(--line); }
.history > li { padding: 0 0 12px 16px; position: relative; }
.history > li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.history time { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.history ul { padding-left: 0; list-style: none; margin: 2px 0 0; font-size: 14px; }
.history .before { color: var(--muted); text-decoration: line-through; }
.history .after { color: var(--bright); }

/* Administration */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--mono); font-size: 13px; }
.admin-tabs a, .admin-tabs span { padding: 5px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); text-decoration: none; }
.admin-tabs a:hover { color: var(--text); border-color: var(--muted); }
.admin-tabs a.active { color: var(--bright); border-color: var(--red); background: var(--panel-2); }
.admin .h-section + .kpis { margin-top: 0; }
.admin-list { list-style: none; padding: 0; margin: 0; font-family: var(--mono); font-size: 13px; counter-reset: rank; }
.admin-list li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px dashed var(--line); counter-increment: rank; }
.admin-list li::before { content: counter(rank) "."; color: var(--muted); min-width: 2em; }
.admin-list li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list .n { margin-left: auto; color: var(--bright); }
.admin .bars .n small { font-size: 11px; }
.kpis .live strong { color: var(--green); }
.kpis strong small { font-size: 13px; font-weight: 400; }
