/* ──────────────────────────────────────────────────────────────────────────
 * assets/tools.css — FlashRank · pages outils (même ADN que style.css)
 * Les couleurs suivent les variables --pp-* du thème (clair / .pp-dark).
 * Tout est limité à main.bv-tool : aucun effet sur les articles.
 * ────────────────────────────────────────────────────────────────────────── */

.docs-wrap {
    --bg: var(--pp-bg); --surface: var(--pp-card); --surface-2: var(--pp-bg);
    --surface-3: color-mix(in srgb, var(--pp-border) 85%, var(--pp-muted) 15%);
    --border: var(--pp-border); --border-strong: color-mix(in srgb, var(--pp-muted) 40%, transparent);
    --text: var(--pp-ink); --text-2: var(--pp-soft); --muted: var(--pp-muted);
    --brand: var(--pp-accent); --brand-2: #ea580c; --brand-soft: var(--pp-ac3);
    --ring: color-mix(in srgb, var(--pp-accent) 28%, transparent);
    /* Palette d'états moderne (émeraude / ambre / rose) */
    --green: #059669; --green-soft: rgba(16,185,129,.12);
    --red: #e11d48;   --red-soft: rgba(244,63,94,.10);
    --amber: #d97706; --amber-soft: rgba(245,158,11,.13);
    --code-bg: var(--pp-bg); --code-text: #059669;
    --shadow-sm: 0 1px 2px rgba(8,8,16,.04);
    --shadow: 0 1px 2px rgba(8,8,16,.04), 0 10px 28px -14px rgba(161,98,7,.14);
    --radius: var(--pp-r-lg);
}
.docs-wrap.pp-dark { --brand-2: #fff27a; --green: #34d399; --green-soft: rgba(52,211,153,.14); --red: #fb7185; --red-soft: rgba(251,113,133,.13); --amber: #fbbf24; --amber-soft: rgba(251,191,36,.13); --code-text: #6ee7b7; --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 32px -16px rgba(0,0,0,.7); }

/* ── Mise en page ── */
main.bv-tool { width: 100%; max-width: 1180px; margin-left: auto; margin-right: auto; font-variant-numeric: tabular-nums; }
.bv-tool [hidden] { display: none !important; }
.bv-tool .ico { flex: none; display: block; }
.bv-tool .mono, .bv-tool code { font-family: var(--pp-font-mono); font-size: 12.5px; }
.bv-tool .muted { color: var(--muted); }
.bv-tool .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* En-tête (réutilise .hero / .eyebrow / .crumb de style.css) */
.bv-tool .hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.bv-tool .hero-text { flex: 1 1 520px; min-width: 0; }
.bv-tool .hero h1 { margin-top: 2px; }
.bv-tool .hero h1 .hl { color: var(--pp-accent); word-break: break-all; }
.bv-tool .hero p { max-width: 70ch; }
.bv-tool .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bv-tool .eyebrow .ico { width: 13px; height: 13px; }

/* ── Boutons & champs ── */
.bv-tool .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1.5px solid transparent; cursor: pointer;
    text-decoration: none; font-family: var(--pp-font-sans); font-size: 13.5px; font-weight: 700; height: 40px; padding: 0 18px;
    border-radius: 100px; color: #fff; background: var(--pp-accent); white-space: nowrap; transition: opacity .15s, border-color .15s, color .15s, background .15s;
}
.bv-tool .btn:hover { opacity: .92; }
.bv-tool .btn-ghost { background: var(--pp-card); border-color: var(--pp-border); color: var(--pp-soft); }
.bv-tool .btn-ghost:hover { opacity: 1; border-color: var(--pp-accent); color: var(--pp-accent); }
.bv-tool .btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.bv-tool .btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.bv-tool .btn:disabled { opacity: .45; cursor: not-allowed; }
.bv-tool .btn.loading { pointer-events: none; opacity: .75; }
.bv-tool .spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: bv-sp .7s linear infinite; display: none; }
.bv-tool .btn.loading .spin { display: block; }
@keyframes bv-sp { to { transform: rotate(360deg); } }

.bv-tool .search { display: flex; gap: 10px; flex-wrap: wrap; }
.bv-tool .bv-field { position: relative; flex: 1 1 300px; min-width: 0; display: flex; }
.bv-tool .bv-field.sm { flex: 0 1 300px; }
.bv-tool .bv-field .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.bv-tool input[type="text"] {
    width: 100%; height: 48px; background: var(--pp-card); border: 1.5px solid var(--pp-border); color: var(--pp-ink);
    padding: 0 16px 0 42px; border-radius: 100px; font-family: var(--pp-font-sans); font-size: 15px; appearance: none; transition: border-color .15s, box-shadow .15s;
}
.bv-tool input::placeholder, .bv-tool textarea::placeholder { color: var(--muted); opacity: .85; }
.bv-tool input[type="text"]:focus, .bv-tool textarea:focus { outline: none; border-color: var(--pp-accent); box-shadow: 0 0 0 3px var(--ring); }
.bv-tool .hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0 4px; }

/* ── Cartes & grilles ── */
.bv-tool .card { background: var(--pp-card); border: 1.5px solid var(--pp-border); border-radius: var(--pp-r-lg); padding: 20px; box-shadow: var(--shadow); }
.bv-tool .stack { margin-top: 18px; }
.bv-tool .stack > * + * { margin-top: 18px; }
.bv-tool .card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.bv-tool .card-title { margin: 0; font-family: var(--pp-font-serif); font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; color: var(--pp-ink); }
.bv-tool .card-title .ico { color: var(--pp-accent); }
.bv-tool .card-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.bv-tool .grid { display: grid; gap: 16px; }
.bv-tool .grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.bv-tool .grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.bv-tool .grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.bv-tool .banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--pp-r-sm); font-size: 13.5px; border: 1.5px solid color-mix(in srgb, var(--red) 35%, transparent); color: var(--text-2); background: var(--red-soft); margin-top: 18px; }
.bv-tool .banner .ico { color: var(--red); margin-top: 2px; }
.bv-tool .banner.info { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.bv-tool .banner.info .ico { color: var(--amber); }

/* ── Score ── */
.bv-tool .overview { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; }
.bv-tool .ring-wrap { display: grid; place-items: center; text-align: center; }
.bv-tool .ring { position: relative; }
.bv-tool .ring svg { transform: rotate(-90deg); display: block; }
.bv-tool .ring .val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.bv-tool .ring .num { font-family: var(--pp-font-serif); font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.bv-tool .ring .of { font-size: 13px; color: var(--muted); font-weight: 600; }
.bv-tool .grade { margin-top: 10px; font-weight: 800; font-size: 15px; }
.bv-tool .tallies { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.bv-tool .tally { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 100px; font-weight: 800; font-size: 13.5px; }
.bv-tool .tally.fail { background: var(--red-soft); color: var(--red); }
.bv-tool .tally.warn { background: var(--amber-soft); color: var(--amber); }
.bv-tool .tally.pass { background: var(--green-soft); color: var(--green); }
.bv-tool .tally span { color: var(--text-2); font-weight: 600; }
.bv-tool .catbars { display: grid; gap: 12px; }
.bv-tool .catbar { display: grid; grid-template-columns: 22px 1fr 44px; gap: 10px; align-items: center; text-decoration: none; }
.bv-tool .catbar .ico { color: var(--muted); }
.bv-tool .catbar .lbl { font-size: 13.5px; font-weight: 700; margin-bottom: 5px; }
.bv-tool .bar { height: 7px; border-radius: 100px; background: var(--surface-3); overflow: hidden; }
.bv-tool .bar > span { display: block; height: 100%; border-radius: inherit; }
.bv-tool .catbar .pct { text-align: right; font-weight: 800; font-size: 14px; }
.bv-tool .meta-line { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--pp-border); }

/* ── Listes de contrôles ── */
.bv-tool .issues { list-style: none; margin: 0; padding: 0; }
.bv-tool .issue { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--pp-border); }
.bv-tool .issue:last-child { border-bottom: 0; }
.bv-tool .issue-ico, .bv-tool .chk .st { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.bv-tool .s-pass .issue-ico, .bv-tool .chk.s-pass .st { background: var(--green-soft); color: var(--green); }
.bv-tool .s-warn .issue-ico, .bv-tool .chk.s-warn .st { background: var(--amber-soft); color: var(--amber); }
.bv-tool .s-fail .issue-ico, .bv-tool .chk.s-fail .st { background: var(--red-soft); color: var(--red); }
.bv-tool .s-info .issue-ico, .bv-tool .chk.s-info .st { background: var(--brand-soft); color: var(--brand); }
.bv-tool .issue strong { font-size: 14px; }
.bv-tool .issue .msg { color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; }
.bv-tool .issue .tip { color: var(--muted); font-size: 12.5px; margin-top: 3px; overflow-wrap: anywhere; }
.bv-tool .pill { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 2px 8px; border-radius: 100px; margin-left: 6px; vertical-align: 1px; text-transform: uppercase; }
.bv-tool .pill.fail { background: var(--red-soft); color: var(--red); }
.bv-tool .pill.warn { background: var(--amber-soft); color: var(--amber); }
.bv-tool .pill.pass { background: var(--green-soft); color: var(--green); }
.bv-tool .pill.info { background: var(--brand-soft); color: var(--brand); }
.bv-tool .chk { display: grid; grid-template-columns: 26px minmax(150px, 230px) 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--pp-border); }
.bv-tool .chk:last-child { border-bottom: 0; }
.bv-tool .chk .nm { font-weight: 700; font-size: 13.5px; padding-top: 3px; }
.bv-tool .chk .ds { font-size: 13.5px; color: var(--text-2); padding-top: 3px; overflow-wrap: anywhere; }
.bv-tool .chk .ds .tip { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bv-tool .cat-score { font-weight: 800; font-size: 15px; }

.bv-tool .kv { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.bv-tool .kv li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--pp-border); }
.bv-tool .kv li:last-child { border-bottom: 0; }
.bv-tool .kv li > span:first-child { color: var(--muted); flex: none; }
.bv-tool .kv li > span:last-child { text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.bv-tool .snippet { display: block; background: var(--code-bg); border: 1px solid var(--pp-border); padding: 12px 14px; border-radius: var(--pp-r-sm); color: var(--code-text); white-space: pre-wrap; word-break: break-all; margin: 0; font: 12px/1.6 var(--pp-font-mono); max-height: 420px; overflow: auto; }
.bv-tool textarea.snippet { width: 100%; min-height: 220px; resize: vertical; }

/* ── Tableaux ── */
.bv-tool .bv-table { overflow-x: auto; border: 1.5px solid var(--pp-border); border-radius: var(--pp-r-sm); background: var(--pp-card); }
.bv-tool table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bv-tool th, .bv-tool td { text-align: left; padding: 10px 14px; vertical-align: middle; }
.bv-tool thead th { background: var(--pp-bg); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; border-bottom: 1px solid var(--pp-border); white-space: nowrap; }
.bv-tool tbody tr + tr { border-top: 1px solid var(--pp-border); }
.bv-tool td.r, .bv-tool th.r { text-align: right; }
.bv-tool td.nw { white-space: nowrap; }
.bv-tool .ok { color: var(--green); font-weight: 700; }
.bv-tool .ko { color: var(--red); font-weight: 700; }
.bv-tool .mid { color: var(--amber); font-weight: 700; }

.bv-tool details summary { cursor: pointer; font-family: var(--pp-font-serif); font-weight: 700; font-size: 17px; list-style: none; display: flex; align-items: center; gap: 9px; }
.bv-tool details summary::-webkit-details-marker { display: none; }
.bv-tool details summary .ico { color: var(--pp-accent); }
.bv-tool details summary .chev { margin-left: auto; color: var(--muted); transition: transform .15s; font-size: 13px; }
.bv-tool details[open] summary .chev { transform: rotate(90deg); }

.bv-tool .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.bv-tool .feature { padding: 18px; }
.bv-tool .feature .fi { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 10px; }
.bv-tool .feature h3 { margin: 0 0 4px; font-size: 14.5px; }
.bv-tool .feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.bv-tool .tabs { display: inline-flex; background: var(--pp-card); border: 1.5px solid var(--pp-border); border-radius: 100px; padding: 3px; gap: 2px; }
.bv-tool .tabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; font-family: var(--pp-font-sans); font-size: 13px; font-weight: 700; color: var(--muted); padding: 7px 16px; border-radius: 100px; cursor: pointer; }
.bv-tool .tabs button:hover { color: var(--pp-ink); }
.bv-tool .tabs button.active { background: var(--pp-ac3); color: var(--pp-accent); }
.bv-tool .tag { display: inline-block; font: 700 10.5px/1 var(--pp-font-mono); padding: 4px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); }
.bv-tool .note { font-size: 12px; color: var(--muted); margin: 14px 0 0; line-height: 1.55; }

/* ── Autres outils (bas de page) ── */
.bv-tool .bv-more { margin-top: 44px; }
.bv-tool .bv-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.bv-tool .bv-more-grid a { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; border: 1.5px solid var(--pp-border); border-radius: var(--pp-r-lg); background: var(--pp-card); padding: 14px; transition: border-color .2s ease, transform .15s ease; }
.bv-tool .bv-more-grid a:hover { border-color: rgba(255,230,0,.35); transform: translateY(-1px); }
.bv-tool .bv-more-grid .fi { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: var(--pp-ac3); color: var(--pp-accent); display: grid; place-items: center; }
.bv-tool .bv-more-grid strong { display: block; font-size: 14px; color: var(--pp-ink); }
.bv-tool .bv-more-grid small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

@media (max-width: 860px) {
    .bv-tool .overview { grid-template-columns: 1fr; }
    .bv-tool .chk { grid-template-columns: 26px 1fr; }
    .bv-tool .chk .ds { grid-column: 2; padding-top: 0; }
    .bv-tool .btn-label { display: none; }
    .bv-tool .bv-field.sm { flex: 1 1 100%; }
}
@media print {
    .docs-wrap, .docs-wrap.pp-dark { --pp-ink: #000; --pp-soft: #222; --pp-muted: #555; --pp-border: #d6dbe4; --pp-bg: #f3f5f9; --pp-card: #fff; --shadow: none; --shadow-sm: none; background: #fff; }
    .topbar, .site-footer, .bv-tool .no-print, .bv-tool .bv-more { display: none !important; }
    .bv-tool .card { break-inside: avoid; }
    .bv-tool .snippet { max-height: none; }
    .bv-tool [data-panel] { display: block !important; }
}
@media (prefers-reduced-motion: reduce) { .bv-tool * { transition: none !important; animation: none !important; } }
