/* Otoolia — Outils PDF (styles limités à .pf / .pf-*) */
.pf-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: .2em; }
.pf-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.pf-sm { min-height: 34px; padding: 5px 14px; font-size: .88rem; }
.pf-drop { border: 2px dashed var(--ot-border); border-radius: var(--ot-radius); padding: 26px 16px; text-align: center; cursor: pointer;
  background: var(--ot-surface); transition: border-color .15s, background .15s; }
.pf-drop:hover, .pf-drop:focus-visible, .pf-drop.is-over { border-color: var(--ot-brand); background: color-mix(in srgb, var(--ot-brand) 6%, var(--ot-surface)); outline: none; }
.pf-drop__icon { font-size: 2rem; display: block; line-height: 1; margin-bottom: 6px; }
.pf-drop u { color: var(--ot-brand); }
.pf-drop small { display: block; color: var(--ot-text-soft); margin-top: 4px; }
.pf-status { min-height: 1.3em; font-size: .9rem; margin: 10px 0 0; }
.pf-err { color: #c81e1e; } .pf-ok { color: #15803d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf-err { color: #f87171; } :root:not([data-theme="light"]) .pf-ok { color: #4ade80; } }
:root[data-theme="dark"] .pf-err { color: #f87171; } :root[data-theme="dark"] .pf-ok { color: #4ade80; }
.pf-files, .pf-results { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-file, .pf-results li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 1px solid var(--ot-border); border-radius: var(--ot-radius-s); background: var(--ot-surface); flex-wrap: wrap; }
.pf-file__name { font-weight: 600; overflow-wrap: anywhere; min-width: 0; flex: 1 1 200px; }
.pf-file__meta { color: var(--ot-text-soft); font-size: .85rem; }
.pf-x { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: var(--ot-text-soft); cursor: pointer; padding: 2px 6px; }
.pf-x:hover { color: #c81e1e; }
.pf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; }
.pf-bar .ot-input { width: auto; flex: 1 1 200px; max-width: 320px; min-height: 38px; padding: 6px 10px; }
.pf-count { color: var(--ot-text-soft); font-size: .88rem; margin-left: auto; }
.pf-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
.pf-page { border: 1px solid var(--ot-border); border-radius: var(--ot-radius-s); background: var(--ot-surface); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-page.is-drag { opacity: .4; }
.pf-page.is-target { outline: 2px dashed var(--ot-brand); outline-offset: 2px; }
.pf-thumb { --rot: 0deg; height: 150px; display: grid; place-items: center; background: var(--ot-surface-2); border-radius: 4px; overflow: hidden; }
.pf-thumb canvas, .pf-thumb img { max-width: 100%; max-height: 150px; width: auto; height: auto; box-shadow: 0 1px 4px rgba(0,0,0,.25); background: #fff; transform: rotate(var(--rot)); transition: transform .2s; }
.pf-thumb img { max-width: 110px; max-height: 110px; }
.pf-cap { display: flex; gap: 6px; align-items: baseline; font-size: .78rem; min-width: 0; }
.pf-cap__n { font-weight: 700; }
.pf-cap__src { color: var(--ot-text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-tools { display: flex; justify-content: space-between; gap: 2px; }
.pf-tools button { flex: 1; border: 1px solid var(--ot-border); background: var(--ot-surface); color: var(--ot-text); border-radius: 6px; padding: 3px 0; cursor: pointer; font: inherit; font-size: .95rem; }
.pf-tools button:hover:not(:disabled) { border-color: var(--ot-brand); }
.pf-tools button:disabled { opacity: .3; cursor: default; }
.pf-sel .pf-pick { all: unset; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.pf-sel .pf-pick:focus-visible { outline: 3px solid var(--ot-brand); outline-offset: 3px; border-radius: 4px; }
.pf-sel.is-on { border-color: var(--ot-brand); box-shadow: 0 0 0 2px var(--ot-brand); }
.pf-sel.is-on .pf-cap__n::after { content: " ✓"; color: var(--ot-brand); }
.pf-opts { display: grid; gap: 8px; margin: 12px 0; }
.pf-radio { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-radio input[type="text"], .pf-radio input[type="number"] { min-height: 34px; padding: 4px 8px; }
.pf-radio input[type="number"] { width: 80px; }
.pf-radio input[type="text"] { width: min(100%, 260px); }
.pf-radio small, .pf-hint { color: var(--ot-text-soft); font-size: .84rem; }
.pf-level { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin: 12px 0; }
.pf-level label { border: 1px solid var(--ot-border); border-radius: var(--ot-radius-s); padding: 10px 12px; display: flex; gap: 8px; align-items: flex-start; cursor: pointer; background: var(--ot-surface); }
.pf-level label:has(input:checked) { border-color: var(--ot-brand); box-shadow: 0 0 0 1px var(--ot-brand); }
.pf-level strong { display: block; }
.pf-level small { color: var(--ot-text-soft); }
.pf-check { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 12px; }
.pf-check input { margin-top: 4px; }
.pf-out { margin-top: 14px; }
.pf-safe { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ot-text-soft); }
.pf-blank { display: block; width: 76px; max-height: 140px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.pf-tools { flex-wrap: wrap; }
.pf-tools button { min-width: 28px; }
