
*{box-sizing:border-box}body.batch-crop-page{margin:0;background:#f6f8fb;color:#172033;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.crop-shell{width:min(1440px,calc(100% - 32px));margin:26px auto 70px}.crop-hero,.workspace-toolbar,.settings-panel,.preview-panel,.grid-section,.export-panel,.drop-zone{background:#fff;border:1px solid #e4e8ef;border-radius:22px;box-shadow:0 10px 30px rgba(19,31,55,.05)}
.crop-hero{display:flex;justify-content:space-between;gap:28px;align-items:center;padding:28px 30px;margin-bottom:20px}.crop-kicker{font-size:.76rem;font-weight:800;letter-spacing:.12em;color:#6c5ce7}.crop-hero h1{margin:7px 0 8px;font-size:clamp(2rem,4vw,3.3rem);letter-spacing:-.04em}.crop-hero p{max-width:820px;margin:0;color:#647084;line-height:1.6}.privacy-pill{min-width:220px;padding:16px 18px;border-radius:18px;background:#f4f2ff;display:flex;flex-direction:column;gap:4px}.privacy-pill span{font-size:.82rem;color:#667085}
.drop-zone{padding:52px 24px;text-align:center;border-style:dashed;cursor:pointer;transition:.2s}.drop-zone.dragging,.drop-zone:hover{border-color:#6c5ce7;background:#fbfaff}.drop-icon{width:58px;height:58px;margin:auto;border-radius:50%;display:grid;place-items:center;background:#eeeaff;color:#5b4ad1;font-size:2rem}.drop-zone h2{margin:15px 0 6px}.drop-zone p{color:#7a8495}
button,select,input{font:inherit}.primary-btn,.secondary-btn,.quiet-btn,.danger-btn{border:0;border-radius:12px;padding:11px 15px;font-weight:750;cursor:pointer}.primary-btn{background:#5b4ad1;color:#fff}.secondary-btn{background:#ece9ff;color:#4f3ec2}.quiet-btn{background:#f1f3f6;color:#344054}.danger-btn{background:#fff0f0;color:#b42318}.big{padding:14px 20px}
.workspace{margin-top:20px}.workspace-toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:16px 18px}.workspace-toolbar>div:first-child{display:flex;gap:12px;align-items:baseline}.workspace-toolbar span{color:#7a8495;font-size:.86rem}.toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}
.editor-layout{display:grid;grid-template-columns:minmax(320px,390px) 1fr;gap:20px;margin-top:20px}.settings-panel,.preview-panel,.grid-section,.export-panel{padding:20px}.panel-heading{display:flex;gap:12px;align-items:flex-start;margin-bottom:18px}.panel-heading h2{margin:0 0 3px;font-size:1.1rem}.panel-heading p{margin:0;color:#7a8495;font-size:.85rem}.step{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:#5b4ad1;color:#fff;font-weight:800}
fieldset{border:0;padding:0;margin:0 0 18px}legend,.setting-group h3{font-weight:800;font-size:.9rem;margin-bottom:10px}.radio-row{display:flex;gap:10px;padding:10px;border:1px solid #e6e9ef;border-radius:12px;margin-bottom:8px;cursor:pointer}.radio-row span{display:flex;flex-direction:column}.radio-row small{color:#8a93a3}
.setting-group{border-top:1px solid #edf0f4;padding-top:15px;margin-top:15px}.setting-group label{display:block;font-size:.82rem;color:#586174;margin-bottom:12px;position:relative}.setting-group input,.setting-group select{width:100%;margin-top:6px;border:1px solid #d8dde6;border-radius:10px;padding:10px;background:#fff}.four-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.unit{position:absolute;right:10px;bottom:10px;color:#98a2b3}.ratio-custom{display:flex;align-items:end;gap:8px}.ratio-custom label{flex:1}.range-line{display:flex;gap:10px;align-items:center}.range-line output{min-width:34px;font-weight:800}.settings-actions{display:grid;gap:8px;margin-top:18px}
.preview-stage{position:relative;min-height:520px;border-radius:18px;background:#111827;display:flex;align-items:center;justify-content:center;overflow:hidden}.preview-stage canvas{max-width:100%;max-height:520px;display:block}.empty-preview{color:#cbd5e1;padding:30px;text-align:center}.crop-box{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.52);cursor:move}.handle{position:absolute;width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid #5b4ad1}.handle.nw{left:-8px;top:-8px;cursor:nwse-resize}.handle.ne{right:-8px;top:-8px;cursor:nesw-resize}.handle.sw{left:-8px;bottom:-8px;cursor:nesw-resize}.handle.se{right:-8px;bottom:-8px;cursor:nwse-resize}.preview-actions{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:12px}.preview-actions span{font-size:.85rem;color:#667085}
.grid-section{margin-top:20px}.images-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px}.image-card{border:1px solid #e4e8ef;border-radius:16px;overflow:hidden;background:#fff}.image-card.selected{outline:3px solid #8f84ea}.thumb-wrap{aspect-ratio:1/1;background:#eef1f5;position:relative;overflow:hidden}.thumb-wrap img{width:100%;height:100%;object-fit:cover}.select-check{position:absolute;top:8px;left:8px;width:22px;height:22px}.card-body{padding:11px}.card-body strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.84rem}.card-body small{display:block;color:#7a8495;margin-top:3px}.card-actions{display:flex;gap:6px;margin-top:9px}.card-actions button{flex:1;padding:8px;font-size:.78rem}
.export-panel{margin-top:20px;display:flex;gap:18px;justify-content:space-between;align-items:center;flex-wrap:wrap}.export-summary{display:flex;flex-direction:column}.export-summary span{color:#7a8495;font-size:.83rem}.export-actions{display:flex;gap:8px;flex-wrap:wrap}.progress-wrap{display:flex;gap:10px;align-items:center;min-width:260px}.progress-wrap progress{width:100%}
@media(max-width:900px){.crop-hero{align-items:flex-start;flex-direction:column}.privacy-pill{width:100%}.editor-layout{grid-template-columns:1fr}.preview-stage{min-height:380px}.workspace-toolbar{align-items:flex-start;flex-direction:column}.toolbar-actions{width:100%}.toolbar-actions button{flex:1}.export-panel{align-items:stretch;flex-direction:column}.export-actions button{flex:1}}
@media(max-width:560px){.crop-shell{width:min(100% - 18px,1440px);margin-top:12px}.crop-hero,.settings-panel,.preview-panel,.grid-section,.export-panel{border-radius:16px;padding:15px}.drop-zone{padding:34px 15px}.four-grid{grid-template-columns:1fr 1fr}.images-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.preview-stage{min-height:300px}.crop-box .handle{width:20px;height:20px}}

.setting-help{margin:-2px 0 10px;color:#7a8495;font-size:.82rem;line-height:1.45}
.flip-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.flip-buttons button{min-height:44px}
.image-card .transform-state{color:#5b4ad1;font-weight:700}
@media(max-width:560px){.flip-buttons{grid-template-columns:1fr}}

.formula-rules{display:block;margin-top:10px;color:#667085;font-size:.78rem;line-height:1.45}

.image-tool-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0 0;padding:10px;background:#fff;border:1px solid #e4e8ef;border-radius:18px;box-shadow:0 10px 30px rgba(19,31,55,.04)}
.image-tool-tab{border:0;border-radius:12px;padding:11px 16px;background:#f1f3f6;color:#344054;font-weight:800;cursor:pointer}
.image-tool-tab.active{background:#5b4ad1;color:#fff}
.drop-zone .formula-rules{margin-top:16px}
.drop-zone #pick-files{margin-top:24px}
#text-settings textarea{width:100%;margin-top:6px;border:1px solid #d8dde6;border-radius:10px;padding:11px;resize:vertical;min-height:100px;font:inherit}
.text-style-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.text-style-grid label{margin-bottom:0}
.text-toggles{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.text-toggles label{display:flex!important;align-items:center;gap:6px;margin:0!important;padding:8px 10px;border:1px solid #e6e9ef;border-radius:10px;background:#fafbfc}
.text-toggles input{width:auto!important;margin:0!important}
#text-file-row{display:grid;gap:10px;margin-top:10px}
#text-file-status{color:#667085;line-height:1.4}
.image-card .text-state{color:#7a4acb;font-weight:700}
.pdf-only-note{padding:12px;border-radius:12px;background:#f7f5ff;color:#5a4bb7;font-size:.84rem;line-height:1.45}
@media(max-width:700px){.image-tool-tabs{display:grid;grid-template-columns:1fr}.text-style-grid{grid-template-columns:1fr}}

.crop-scope-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.crop-scope-buttons .active-scope{outline:2px solid #8f84ea}
@media(max-width:560px){.crop-scope-buttons{grid-template-columns:1fr}}

.rename-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rename-preview-wrap{margin-top:16px;border:1px solid #e4e8ef;border-radius:14px;overflow:auto;max-height:320px;background:#fff}
.rename-preview-table{width:100%;border-collapse:collapse;font-size:.82rem}
.rename-preview-table th,.rename-preview-table td{padding:10px 12px;text-align:left;border-bottom:1px solid #edf0f4;vertical-align:top}
.rename-preview-table th{position:sticky;top:0;background:#f8f9fb;color:#475467;z-index:1}
.rename-preview-table td:last-child{font-weight:700;color:#4f3ec2}
.metadata-summary{display:flex;flex-direction:column;gap:5px;padding:13px 14px;margin-bottom:14px;border-radius:12px;background:#f8f9fb;border:1px solid #e7eaf0}
.metadata-summary span{color:#667085;font-size:.82rem;line-height:1.45}
.metadata-mode{margin-top:12px}
.metadata-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.metadata-fields label{display:block;font-size:.82rem;color:#586174}
.metadata-fields input,.metadata-fields textarea{width:100%;margin-top:6px;border:1px solid #d8dde6;border-radius:10px;padding:10px;font:inherit;background:#fff}
.metadata-fields textarea{resize:vertical}
.metadata-compatibility{display:flex;flex-direction:column;gap:5px;margin-top:14px;padding:12px 14px;border-radius:12px;background:#f7f5ff;color:#5a4bb7;font-size:.82rem;line-height:1.45}
.rename-state,.metadata-state{font-weight:700;color:#5b4ad1!important}
.export-panel{margin-top:20px}
.export-panel + .grid-section{margin-top:20px}
@media(max-width:700px){.rename-mode-grid,.metadata-fields{grid-template-columns:1fr}}

.resize-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quick-size-grid,.rotation-grid,.builtin-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.resize-summary{margin-top:14px;padding:12px;border-radius:12px;background:#f8f9fb;border:1px solid #e6e9ef;color:#667085;font-size:.83rem}
.preset-save-row{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:14px}
.preset-save-row input{width:100%;border:1px solid #d8dde6;border-radius:10px;padding:10px;font:inherit}
.preset-list{display:grid;gap:8px;margin-top:14px}
.preset-item{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:11px 12px;border:1px solid #e6e9ef;border-radius:12px;background:#fff}
.preset-item>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.preset-item strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preset-item small{color:#7a8495}
.preset-item-actions{display:flex;gap:6px;flex-shrink:0}
@media(max-width:700px){.resize-grid,.quick-size-grid,.rotation-grid,.builtin-presets,.preset-save-row{grid-template-columns:1fr}}

.book-card{margin-top:14px;padding:14px;border:1px solid #e4e8ef;border-radius:14px;background:#fff}
.book-card h4{margin:0 0 12px;font-size:.95rem}
.book-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.book-grid label{display:block;font-size:.82rem;color:#586174}
.book-grid input,.book-grid select{width:100%;margin-top:6px;border:1px solid #d8dde6;border-radius:10px;padding:10px;background:#fff}
.book-inline-options{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:12px}
.book-inline-options label{display:flex;align-items:center;gap:7px;font-size:.82rem;color:#586174}
.book-summary{margin-top:12px;padding:12px;border-radius:12px;background:#f8f9fb;border:1px solid #e6e9ef;color:#667085;font-size:.82rem;line-height:1.5}
.book-csv-preview{margin-top:12px;max-height:220px;overflow:auto;border:1px solid #e6e9ef;border-radius:12px;background:#fff}
.book-csv-preview table{width:100%;border-collapse:collapse;font-size:.78rem}
.book-csv-preview th,.book-csv-preview td{padding:8px 10px;border-bottom:1px solid #edf0f4;text-align:left}
.book-csv-preview th{position:sticky;top:0;background:#f8f9fb;z-index:1}
.book-guide-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:999px;background:#f1efff;color:#5b4ad1;font-size:.74rem;font-weight:700}
@media(max-width:700px){.book-grid{grid-template-columns:1fr}.book-inline-options{align-items:flex-start;flex-direction:column}}

.batch-selection-tools{margin:0 0 18px;padding:14px;border:1px solid #e4e8ef;border-radius:14px;background:#fafbfc}
.selection-tools-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}
.selection-tools-head>div{display:flex;flex-direction:column;gap:3px}
.selection-tools-head small{color:#7a8495;font-size:.8rem}
.selection-presets{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.selection-custom-grid{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:10px;align-items:end}
.selection-custom-grid label{display:flex;flex-direction:column;gap:6px;font-size:.8rem;color:#586174}
.selection-custom-grid input{width:100%;border:1px solid #d8dde6;border-radius:10px;padding:9px;background:#fff}
@media(max-width:900px){.selection-custom-grid{grid-template-columns:1fr 1fr}.selection-tools-head{align-items:flex-start;flex-direction:column}}
@media(max-width:560px){.selection-custom-grid{grid-template-columns:1fr}.selection-presets button{flex:1}.selection-tools-head button{width:100%}}

.selection-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:900px){.selection-head-actions{width:100%;justify-content:flex-start}}
@media(max-width:560px){.selection-head-actions button{flex:1}}

/* Recalibration générale de l'atelier */
.image-tool-tabs{
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  scroll-snap-type:x proximity;
}
.image-tool-tab{
  flex:0 0 auto;
  white-space:nowrap;
  scroll-snap-align:start;
}
.editor-layout{
  grid-template-columns:minmax(360px,440px) minmax(0,1fr);
  align-items:start;
}
.settings-panel{
  max-height:calc(100vh - 120px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.preview-panel{
  position:sticky;
  top:16px;
  align-self:start;
}
.book-card{
  padding:12px;
  margin-top:10px;
}
.book-card h4{
  margin-bottom:10px;
}
.final-preview-card{
  margin-top:16px;
  padding:14px;
  border:1px solid #e4e8ef;
  border-radius:16px;
  background:#fafbfc;
}
.final-preview-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:10px;
}
.final-preview-head>div{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.final-preview-head small{
  color:#7a8495;
  font-size:.8rem;
}
.final-preview-head span{
  color:#5b4ad1;
  font-size:.8rem;
  font-weight:800;
  white-space:nowrap;
}
.final-preview-stage{
  min-height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#111827;
  overflow:hidden;
  padding:10px;
}
.final-preview-stage canvas{
  max-width:100%;
  max-height:300px;
  display:block;
}
@media(max-width:900px){
  .editor-layout{grid-template-columns:1fr}
  .settings-panel{max-height:none;overflow:visible}
  .preview-panel{position:static}
  .image-tool-tabs{margin-top:14px}
}
@media(max-width:700px){
  .image-tool-tabs{display:flex;grid-template-columns:none}
}

.workspace-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.workspace-status>div:first-child{display:flex;gap:12px;align-items:baseline}
.book-mode-indicator{display:inline-flex;align-items:center;gap:8px;padding:7px 9px;border-radius:999px;background:#fff4d8;color:#7a4b00;font-size:.78rem;font-weight:800}
.book-mode-indicator button{border:0;border-radius:999px;padding:5px 8px;background:#fff;color:#8a4f00;font-weight:800;cursor:pointer}

/* Respect strict des blocs conditionnels */
.book-grid[hidden],
#book-custom-format-actions[hidden],
#book-custom-dpi-row[hidden],
.final-preview-card[hidden],
.book-mode-indicator[hidden],
[hidden].settings-actions{display:none!important}

/* Centre d'état et retours utilisateur */
.export-panel{
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(220px,360px) auto;
  gap:16px;
  align-items:center;
}
.action-state{display:flex;align-items:center;gap:12px;min-width:0}
.action-state-icon{
  width:38px;height:38px;border-radius:50%;
  display:grid;place-items:center;
  flex:0 0 auto;
  font-weight:900;
  background:#eef1f5;color:#667085;
  transition:transform .2s ease,background .2s ease,color .2s ease,box-shadow .2s ease
}
.action-state[data-state="working"] .action-state-icon{
  color:#fff;background:#5b4ad1;box-shadow:0 0 0 6px rgba(91,74,209,.12);
  animation:mcPulse 1.1s ease-in-out infinite
}
.action-state[data-state="ready-download"] .action-state-icon{background:#ede9fe;color:#5b4ad1;animation:mcPop .28s ease}
.action-state[data-state="success"] .action-state-icon{background:#e8f8ee;color:#16803d;animation:mcPop .28s ease}
.action-state[data-state="error"] .action-state-icon{background:#fff0f0;color:#c92a2a;animation:mcShake .32s ease}
.action-state[data-state="download"] .action-state-icon{background:#eaf2ff;color:#275ec7;animation:mcBounce .8s ease-in-out infinite}
.export-summary{display:flex;flex-direction:column;gap:3px;min-width:0}
.export-summary strong{font-size:.94rem}
.export-summary span{font-size:.8rem;color:#667085;line-height:1.4}
.progress-wrap{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.progress-track{height:9px;border-radius:999px;background:#e8ebf2;overflow:hidden;position:relative}
.progress-track span{display:block;height:100%;border-radius:999px;background:#5b4ad1;transition:width .2s ease}
.progress-wrap.is-indeterminate .progress-track span{
  width:35%!important;position:relative;animation:mcIndeterminate 1.15s ease-in-out infinite
}
.export-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
button.is-busy{position:relative;pointer-events:none;opacity:.78;padding-left:38px}
button.is-busy::before{
  content:"";position:absolute;left:14px;top:50%;width:14px;height:14px;margin-top:-7px;
  border:2px solid currentColor;border-right-color:transparent;border-radius:50%;
  animation:mcSpin .65s linear infinite
}
button.action-flash{animation:mcButtonFlash .42s ease}
.toast-stack{
  position:fixed;right:18px;bottom:18px;z-index:9999;
  display:flex;flex-direction:column;gap:8px;max-width:min(420px,calc(100vw - 36px));
  pointer-events:none
}
.mc-toast{
  display:flex;align-items:flex-start;gap:10px;
  padding:12px 14px;border-radius:14px;background:#111827;color:#fff;
  box-shadow:0 16px 36px rgba(17,24,39,.22);
  opacity:0;transform:translateY(10px) scale(.98);
  animation:mcToastIn .22s ease forwards;
  font-size:.83rem;line-height:1.4
}
.mc-toast strong{display:block;margin-bottom:2px}
.mc-toast.success{background:#123d24}
.mc-toast.error{background:#5a1f1f}
.mc-toast.info{background:#24204a}
.mc-toast.out{animation:mcToastOut .22s ease forwards}
@keyframes mcSpin{to{transform:rotate(360deg)}}
@keyframes mcPulse{50%{transform:scale(1.08);box-shadow:0 0 0 10px rgba(91,74,209,.05)}}
@keyframes mcPop{0%{transform:scale(.82)}70%{transform:scale(1.08)}100%{transform:scale(1)}}
@keyframes mcShake{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@keyframes mcBounce{50%{transform:translateY(-3px)}}
@keyframes mcIndeterminate{0%{left:-35%}50%{left:65%}100%{left:100%}}
@keyframes mcButtonFlash{0%{transform:scale(1)}50%{transform:scale(.97)}100%{transform:scale(1)}}
@keyframes mcToastIn{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes mcToastOut{to{opacity:0;transform:translateY(8px) scale(.98)}}
@media(max-width:980px){
  .export-panel{grid-template-columns:1fr}
  .export-actions{justify-content:flex-start}
}

/* Barre d'action toujours visible pendant le travail */
.export-panel{
  position:sticky;
  bottom:10px;
  z-index:30;
  padding:14px 16px;
  border:1px solid rgba(219,224,233,.95);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 14px 38px rgba(24,31,47,.14);
  backdrop-filter:blur(10px);
}
@media(max-width:700px){
  .export-panel{bottom:6px;padding:12px}
}

@media(prefers-reduced-motion:reduce){
  .action-state-icon,
  .progress-track span,
  button.is-busy::before,
  .mc-toast,
  button.action-flash{animation:none!important;transition:none!important}
}

/* Gestionnaire PDF professionnel */
.editor-layout.pdf-manager-active{grid-template-columns:1fr}
.editor-layout.pdf-manager-active .settings-panel{max-height:none;overflow:visible}
.pdf-manager-setting{padding:0}
.pdf-manager-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.pdf-manager-actions{display:flex;gap:8px;flex-wrap:wrap}
.pdf-empty-state{padding:34px;border:1px dashed #cfd5df;border-radius:16px;background:#fafbfc;text-align:center;display:flex;flex-direction:column;gap:6px;color:#667085}
.pdf-empty-state strong{color:#1f2937;font-size:1rem}
.pdf-summary-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-bottom:12px}
.pdf-summary-strip>div{padding:10px;border:1px solid #e5e8ef;border-radius:12px;background:#fff;display:flex;flex-direction:column;gap:3px}
.pdf-summary-strip span{font-size:.72rem;color:#7a8495}.pdf-summary-strip strong{font-size:.88rem;color:#20283a}
.pdf-toolbar{display:flex;flex-wrap:wrap;gap:10px;padding:12px;border:1px solid #e4e8ef;border-radius:14px;background:#fafbfc;margin-bottom:14px}
.pdf-toolbar-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pdf-toolbar-group>strong{font-size:.8rem;margin-right:3px}
.pdf-toolbar-group label{display:flex;align-items:center;gap:5px;font-size:.76rem;color:#667085}
.pdf-toolbar-group input{width:70px;border:1px solid #d8dde6;border-radius:8px;padding:7px}
.pdf-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:14px;align-items:start}
.pdf-pages-panel{min-width:0}
.pdf-pages-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.pdf-pages-head>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pdf-pages-head small{color:#7a8495}
.pdf-pages-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}
.pdf-page-card{border:1px solid #dfe4ec;border-radius:13px;background:#fff;overflow:hidden;position:relative;transition:border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}
.pdf-page-card.selected{border-color:#6b5ce7;box-shadow:0 0 0 2px rgba(91,74,209,.1)}
.pdf-page-card.removed{opacity:.48}.pdf-page-card.dragging{opacity:.35}.pdf-page-card.drop-target{box-shadow:0 0 0 3px rgba(91,74,209,.2)}
.pdf-page-thumb{height:185px;background:#eef1f5;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;cursor:zoom-in}
.pdf-page-thumb canvas{max-width:100%;max-height:100%;display:block}
.pdf-page-checkbox{position:absolute;left:7px;top:7px;z-index:2;width:18px;height:18px}
.pdf-page-badge{position:absolute;right:7px;top:7px;z-index:2;padding:4px 6px;border-radius:999px;font-size:.67rem;font-weight:800;background:#e7f7ed;color:#17653a}
.pdf-page-card.removed .pdf-page-badge{background:#fff0f0;color:#b52a2a}
.pdf-page-info{padding:8px;display:flex;flex-direction:column;gap:3px}
.pdf-page-info strong{font-size:.78rem}.pdf-page-info small{font-size:.68rem;color:#7a8495}
.pdf-page-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:0 8px 8px}
.pdf-page-actions button{padding:6px 5px;font-size:.69rem}
.pdf-load-more{width:100%;margin-top:12px}
.pdf-inspector{position:sticky;top:76px;border:1px solid #e2e7ef;border-radius:15px;background:#fff;padding:13px;display:flex;flex-direction:column;gap:10px}
.pdf-inspector h4{margin:0}
.pdf-inspector label{font-size:.78rem;color:#586174;display:flex;flex-direction:column;gap:5px}
.pdf-inspector select,.pdf-inspector input[type=number]{border:1px solid #d8dde6;border-radius:9px;padding:8px;background:#fff}
.pdf-custom-size{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pdf-custom-size label:last-child{grid-column:1/-1}
.pdf-inline-options{display:grid;gap:7px}.pdf-inline-options label{flex-direction:row;align-items:center}
.pdf-manual-controls{display:grid;gap:8px;padding:10px;border:1px solid #eceff4;border-radius:11px;background:#fafbfc}
.pdf-manual-controls output{font-weight:800;color:#5b4ad1}
.pdf-quality-box{padding:10px;border-radius:11px;background:#f8f9fb;border:1px solid #e7eaf0;font-size:.75rem;line-height:1.45}
.pdf-quality-box strong{display:block;margin-bottom:5px}
.pdf-inspector-actions{display:grid;gap:7px}
.pdf-final-preview{margin-top:16px;border:1px solid #dfe4ec;border-radius:16px;background:#fff;padding:14px}
.pdf-final-preview-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.pdf-final-preview-head>div{display:flex;flex-direction:column;gap:3px}.pdf-final-preview-head small{color:#7a8495}
.pdf-final-pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px;background:#f4f6f9;border-radius:12px;padding:12px}
.pdf-final-pages.two-page{grid-template-columns:repeat(2,minmax(0,1fr))}
.pdf-final-page{background:#fff;border:1px solid #dfe4ec;border-radius:10px;padding:7px}
.pdf-final-page canvas{width:100%;height:auto;display:block}.pdf-final-page small{display:block;margin-top:5px;color:#667085;font-size:.7rem}
.pdf-zoom-modal{position:fixed;inset:0;z-index:10000;background:rgba(10,15,25,.82);display:flex;align-items:center;justify-content:center;padding:22px}
.pdf-zoom-dialog{max-width:min(1000px,96vw);max-height:94vh;background:#fff;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:10px}
.pdf-zoom-stage{overflow:auto;background:#202634;border-radius:10px;padding:14px;min-width:320px;min-height:280px;text-align:center}
.pdf-zoom-stage canvas{max-width:none}
.pdf-zoom-head{display:flex;justify-content:space-between;gap:10px;align-items:center}
.pdf-warning{color:#9a5a00}.pdf-error{color:#b42318}.pdf-ok{color:#16803d}
@media(max-width:1100px){.pdf-layout{grid-template-columns:1fr}.pdf-inspector{position:static}.pdf-summary-strip{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.pdf-manager-head,.pdf-pages-head,.pdf-final-preview-head{flex-direction:column}.pdf-summary-strip{grid-template-columns:repeat(2,1fr)}.pdf-pages-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pdf-page-thumb{height:150px}.pdf-final-pages.two-page{grid-template-columns:1fr}}

.pdf-compare-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:start}
.pdf-compare-side{display:flex;flex-direction:column;gap:5px;min-width:0}
.pdf-compare-side>small{font-weight:800;color:#5b4ad1}
.pdf-compare-side canvas{width:100%;height:auto}
@media(max-width:700px){.pdf-compare-pair{grid-template-columns:1fr}}

.pdf-source-page-label{display:flex;align-items:center;gap:5px;font-size:.72rem;color:#667085}
.pdf-source-page-label input{width:64px;border:1px solid #d8dde6;border-radius:8px;padding:6px}
.drop-entry-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}

.pdf-delete-rules{margin:0 0 14px;padding:12px;border:1px solid #e3e7ee;border-radius:14px;background:#fff}
.pdf-delete-rules-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.pdf-delete-rules-head>div{display:flex;flex-direction:column;gap:3px}.pdf-delete-rules-head small{color:#7a8495;font-size:.76rem}
.pdf-delete-rules-head select{border:1px solid #d8dde6;border-radius:9px;padding:8px;background:#fff}
.pdf-delete-rules-row{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:8px}
.pdf-delete-rules-row input{border:1px solid #d8dde6;border-radius:10px;padding:10px;font:inherit}
.pdf-delete-expression-summary{margin-top:8px;font-size:.78rem;color:#667085;line-height:1.4}
@media(max-width:760px){.pdf-delete-rules-head{flex-direction:column}.pdf-delete-rules-row{grid-template-columns:1fr}.pdf-delete-rules-row button{width:100%}}

.pdf-import-limit-info{
  display:inline-flex;
  margin-top:7px;
  padding:6px 9px;
  border-radius:999px;
  background:#eef2ff;
  color:#4f46a5;
  font-size:.76rem;
  font-weight:800;
}
.pdf-import-limit-info[data-formula="black"]{background:#111827;color:#fff}

/* Entrée séparée Images / PDF */
.entry-hub{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0}
.entry-card{min-height:270px;border:1px solid #dfe4ec;border-radius:18px;background:#fff;padding:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px}
.entry-card-pdf{background:linear-gradient(180deg,#fff,#faf8ff)}
.entry-type{font-size:.72rem;font-weight:900;letter-spacing:.08em;color:#6b7280}
.entry-card h2{margin:0}.entry-card p{max-width:520px;margin:0;color:#667085}
.entry-card .formula-rules{display:block;color:#7a8495;margin-bottom:8px}
.entry-card-images.dragging{border-color:#6b5ce7;box-shadow:0 0 0 3px rgba(91,74,209,.12)}
.entry-card-pdf .drop-icon{font-size:.86rem;font-weight:900;letter-spacing:.04em}

/* Suites logiques PDF */
.pdf-logical-sequences{margin:0 0 14px;padding:12px;border:1px solid #e3e7ee;border-radius:14px;background:#fbfbfe}
.pdf-logical-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.pdf-logical-head>div{display:flex;flex-direction:column;gap:3px}
.pdf-logical-head small,.pdf-logical-head>span{font-size:.76rem;color:#7a8495}
.pdf-logical-presets{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}
.pdf-logical-builder{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr)) auto auto;gap:8px;align-items:end}
.pdf-logical-builder label{display:flex;flex-direction:column;gap:5px;font-size:.76rem;color:#667085}
.pdf-logical-builder input{border:1px solid #d8dde6;border-radius:9px;padding:8px}
.pdf-logical-options{margin-top:9px}.pdf-logical-options label{font-size:.78rem;color:#667085;display:flex;align-items:center;gap:7px}
@media(max-width:900px){.entry-hub{grid-template-columns:1fr}.pdf-logical-builder{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.pdf-logical-head{flex-direction:column}.pdf-logical-builder{grid-template-columns:1fr}.pdf-logical-builder button{width:100%}}

.pdf-migration-banner{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 14px;margin:0 0 14px;border:1px solid #dcd7ff;border-radius:14px;background:#f7f5ff}
.pdf-migration-banner>div{display:flex;flex-direction:column;gap:3px}.pdf-migration-banner span{font-size:.78rem;color:#667085;line-height:1.45}
@media(max-width:720px){.pdf-migration-banner{align-items:stretch;flex-direction:column}.pdf-migration-banner .primary-btn{text-align:center}}

.pdf-external-tab{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border-radius:10px;text-decoration:none;white-space:nowrap;font-weight:800;color:#5b4ad1;background:#f4f1ff;border:1px solid #ddd7ff}
.pdf-external-tab:hover{background:#ece8ff}

.entry-hub-image-only{grid-template-columns:minmax(0,1fr);max-width:920px;margin-left:auto;margin-right:auto}
.entry-hub-image-only .entry-card-images{width:100%}
