main{max-width:640px;margin:0 auto;padding:2.5rem 1.5rem 4rem;animation:fadeUp .35s ease both}
.page-tag{display:inline-block;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--sub);background:var(--off);border:1px solid var(--border);padding:.25rem .75rem;border-radius:999px;margin-bottom:.9rem}
main h1{font-family:var(--display);font-size:clamp(1.8rem,4vw,2.6rem);font-weight:800;letter-spacing:-.04em;line-height:1.05;color:var(--text);margin-bottom:.6rem}
.subtitle{font-size:.9rem;color:var(--sub);margin-bottom:2rem;line-height:1.55}
.dropzone{position:relative;border:2px dashed var(--border);border-radius:16px;padding:2.8rem 1.5rem;text-align:center;cursor:pointer;transition:border-color .2s,background .2s;background:var(--off);margin-bottom:.75rem}
.dropzone:hover,.dropzone.drag{border-color:var(--accent,#dc2626);background:#fff}
.dropzone input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.drop-icon{font-size:2.4rem;margin-bottom:.7rem}
.drop-title{font-family:var(--display);font-size:1rem;font-weight:700;margin-bottom:.35rem}
.drop-sub{font-size:.78rem;color:var(--sub)}
.file-bar{display:none;align-items:center;gap:.9rem;background:var(--off);border:1px solid var(--border);border-radius:12px;padding:.8rem 1rem;margin-bottom:1.2rem}
.file-bar.show{display:flex}
.file-meta{flex:1;min-width:0}
.file-name{font-size:.85rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-size{font-size:.75rem;color:var(--sub)}
.del-btn{font-size:.72rem;font-weight:600;color:#ef4444;background:none;border:1px solid #fecaca;border-radius:999px;padding:.25rem .7rem;cursor:pointer;white-space:nowrap;transition:background .15s}
.del-btn:hover{background:#fef2f2}
.card{background:var(--off);border:1px solid var(--border);border-radius:14px;padding:1.2rem 1.4rem;margin-bottom:1rem}
.card-label{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--sub);margin-bottom:.9rem}
.opt-btns{display:flex;flex-wrap:wrap;gap:.5rem}
.obtn{display:flex;flex-direction:column;font-size:.82rem;font-weight:600;color:var(--text);background:var(--white);border:1px solid var(--border);border-radius:10px;padding:.55rem 1rem;cursor:pointer;transition:border-color .15s,background .15s}
.obtn span{font-size:.68rem;font-weight:400;color:var(--sub);margin-top:.1rem}
.obtn.active{border-color:var(--accent,#dc2626);background:color-mix(in srgb,var(--accent,#dc2626) 6%,white);color:var(--accent,#dc2626)}
.obtn.active span{color:color-mix(in srgb,var(--accent,#dc2626) 60%,#666)}
.obtn:hover:not(.active){border-color:#ccc;background:#fff}
.preset-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.5rem}
.custom-row{display:flex;align-items:center;gap:.75rem}
.custom-row input{flex:1;padding:.6rem .9rem;font-size:.85rem;border:1px solid var(--border);border-radius:10px;background:var(--white);font-family:var(--body);color:var(--text);outline:none;transition:border-color .15s}
.custom-row input:focus{border-color:var(--accent,#dc2626)}
.go-btn{width:100%;padding:.95rem;margin:1.2rem 0;font-family:var(--display);font-size:1rem;font-weight:700;color:#fff;background:var(--accent,#dc2626);border:none;border-radius:14px;cursor:pointer;transition:background .15s,opacity .15s,transform .1s}
.go-btn:hover:not(:disabled){background:var(--accent-dark,#b91c1c);transform:translateY(-1px)}
.go-btn:disabled{opacity:.4;cursor:not-allowed}
.progress-card{display:none;background:var(--off);border:1px solid var(--border);border-radius:14px;padding:1.4rem;margin-bottom:1rem}
.progress-card.show{display:block}
.prog-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:.6rem}
.prog-label{font-size:.82rem;font-weight:600}
.prog-pct{font-size:.82rem;font-weight:700;color:var(--accent,#dc2626)}
.upload-prog,.prog-bar{height:4px;background:var(--border);border-radius:999px;overflow:hidden}
.upload-fill,.prog-fill{height:100%;background:var(--accent,#dc2626);border-radius:999px;width:0;transition:width .3s ease}
.prog-status{font-size:.72rem;color:var(--sub);margin-top:.6rem}
.result-card{display:none;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:14px;padding:1.6rem;text-align:center;margin-bottom:1rem}
.result-card.show{display:block}
.result-title{font-family:var(--display);font-size:1.1rem;font-weight:800;margin-bottom:.5rem}
.result-meta{font-size:.78rem;color:var(--sub);margin-bottom:1rem}
.dl-btn{display:inline-block;padding:.75rem 2rem;font-family:var(--display);font-size:.9rem;font-weight:700;color:#fff;background:#16a34a;border-radius:12px;text-decoration:none;transition:background .15s}
.dl-btn:hover{background:#15803d}
.ai-info-card{display:flex;align-items:flex-start;gap:1rem}
.ai-icon{font-size:1.8rem;flex-shrink:0;margin-top:.1rem}
.ai-text{display:flex;flex-direction:column;gap:.25rem}
.ai-text strong{font-size:.85rem;font-weight:700}
.ai-text span{font-size:.78rem;color:var(--sub);line-height:1.5}

/* ── file-list (fusionner) ────────────────────────────────────────────── */
.file-list-wrap{margin-bottom:1rem}
.file-list-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}
.file-list-count{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--sub)}
.clear-all-btn{font-size:.72rem;font-weight:600;color:#ef4444;background:none;border:none;cursor:pointer;padding:0}
.clear-all-btn:hover{text-decoration:underline}
.file-list{display:flex;flex-direction:column;gap:.4rem;margin-bottom:.6rem}
.file-item{display:flex;align-items:center;gap:.6rem;background:var(--off);border:1px solid var(--border);border-radius:10px;padding:.6rem .9rem}
.file-num{font-size:.7rem;font-weight:700;color:var(--sub);min-width:16px;text-align:right;flex-shrink:0}
.file-item-name{flex:1;font-size:.82rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-item-size{font-size:.72rem;color:var(--sub);white-space:nowrap;flex-shrink:0}
.fib{width:28px;height:28px;border:1px solid var(--border);border-radius:7px;background:#fff;cursor:pointer;font-size:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s;line-height:1}
.fib:hover:not(:disabled){background:var(--off)}
.fib:disabled{opacity:.3;cursor:default}
.fib.del{color:#ef4444;border-color:#fecaca}
.fib.del:hover{background:#fef2f2}
.add-more-label{cursor:pointer}
.add-more-btn{display:inline-block;font-size:.8rem;font-weight:600;color:var(--accent,#dc2626);border:1px dashed var(--accent,#dc2626);border-radius:10px;padding:.5rem 1rem;transition:background .15s}
.add-more-btn:hover{background:color-mix(in srgb,var(--accent,#dc2626) 6%,white)}

/* ── page-range ───────────────────────────────────────────────────────── */
.page-range-hint{font-size:.72rem;color:var(--sub);margin-top:.5rem;line-height:1.5}

@media (max-width: 600px){
  main{padding:1.5rem 1rem 3rem}
  .preset-grid{grid-template-columns:repeat(2,1fr)}
}
