.atlox-pde{
  --blue:#0e4194;
  --blue-dark:#10254a;
  --blue-light:#1b5fc7;
  --orange:#f59c00;
  --orange-hover:#e89100;
  --ink:#15233b;
  --muted:#5f6f84;
  --line:#c7d0da;
  --soft:#f4f7fb;
  --metal-1:#f3f4f6;
  --metal-2:#d7dce2;
  --metal-3:#eef1f4;
  --metal-4:#cfd5db;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  max-width:1280px;
  margin:20px auto;
  padding:0 12px 50px;
}
.atlox-pde *{box-sizing:border-box}
.atlox-pde button,.atlox-pde input,.atlox-pde textarea,.atlox-pde select{font:inherit}
.atlox-pde button{cursor:pointer}

/* En-tête, repris du langage visuel de CV Génération */
.atlox-pde-intro{
  text-align:center;
  margin:0 0 18px;
  padding:22px 28px 24px;
  border-radius:20px;
  background:linear-gradient(135deg,var(--blue) 0%,var(--blue-light) 100%);
  box-shadow:0 18px 45px rgba(14,65,148,.18);
  overflow:hidden;
}
.atlox-pde-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
  padding:6px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
}
.atlox-pde h2{
  margin:0 0 7px;
  color:#fff;
  font-size:30px;
  line-height:1.15;
  font-weight:800;
}
.atlox-pde h2 span{color:var(--orange)}
.atlox-pde-intro p{
  max-width:760px;
  margin:0 auto;
  color:rgba(255,255,255,.90);
  font-size:15px;
  line-height:1.45;
}

/* Cadre métallique identique à l'esprit de #cven-form */
.atlox-pde-form-shell{
  padding:18px;
  border:1px solid #c7cdd5;
  border-radius:24px;
  background:linear-gradient(135deg,var(--metal-1) 0%,var(--metal-2) 28%,var(--metal-3) 58%,var(--metal-4) 100%);
  box-shadow:0 18px 42px rgba(21,35,59,.10),inset 0 1px 0 rgba(255,255,255,.9);
}
.atlox-pde-upload{
  position:relative;
  overflow:hidden;
  padding:22px 24px 20px;
  border:2px solid rgba(14,65,148,.28);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.94),rgba(235,239,244,.94));
  box-shadow:0 14px 30px rgba(14,65,148,.10),inset 0 1px 0 rgba(255,255,255,.92);
}
.atlox-pde-upload:before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:5px;
  background:linear-gradient(90deg,var(--blue) 0 72%,var(--orange) 72% 100%);
}
.atlox-pde-upload-head{
  display:flex;
  align-items:center;
  gap:13px;
  margin:2px 0 18px;
}
.atlox-pde-step-number{
  display:inline-flex;
  flex:0 0 38px;
  width:38px;
  height:38px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--blue);
  color:#fff;
  font-weight:800;
}
.atlox-pde-upload-head>div{display:flex;flex-direction:column;gap:3px}
.atlox-pde-upload-head strong{color:var(--blue-dark);font-size:25px;line-height:1.15;font-weight:900}
.atlox-pde-upload-head span:not(.atlox-pde-step-number){color:#637187;font-size:13px;line-height:1.35}
.atlox-pde-upload-zone{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  min-height:138px;
  padding:24px 26px;
  border:2px dashed #6f9bd3;
  border-radius:18px;
  background:linear-gradient(145deg,#fff 0%,#edf2f7 100%);
  box-shadow:inset 0 0 0 1px rgba(14,65,148,.03);
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease,background .2s ease;
}
.atlox-pde-upload-zone:hover{
  border-color:var(--blue);
  background:linear-gradient(145deg,#fff 0%,#e7f0fb 100%);
  box-shadow:0 15px 30px rgba(14,65,148,.12);
  transform:translateY(-1px);
}
.atlox-pde-upload-copy{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:5px}
.atlox-pde-upload-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  background:#fff0cf;
  color:#7a4a00;
  font-size:12px;
  font-weight:800;
  letter-spacing:.03em;
}
.atlox-pde-upload-copy>strong{color:var(--blue-dark);font-size:26px;line-height:1.15}
.atlox-pde-upload-copy>span:last-child{max-width:650px;color:#4f6079;font-size:14px;line-height:1.45}
.atlox-pde-primary,.atlox-pde-download{
  border:0;
  border-radius:12px;
  font-weight:900;
  transition:background .2s ease,transform .2s ease,box-shadow .2s ease,opacity .2s ease;
}
.atlox-pde-primary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:218px;
  padding:16px 25px;
  background:var(--orange);
  color:var(--blue-dark);
  font-size:17px;
  box-shadow:0 12px 24px rgba(245,156,0,.24);
}
.atlox-pde-primary:hover:not(:disabled){background:var(--orange-hover);transform:translateY(-1px)}
.atlox-pde-primary:disabled{opacity:.52;cursor:not-allowed;box-shadow:none}
.atlox-pde-upload-reassurance{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px 18px;
  margin:13px 2px 0;
  color:#4e5f73;
  font-size:12px;
  font-weight:700;
}
.atlox-pde-upload-reassurance span{position:relative;padding-left:15px}
.atlox-pde-upload-reassurance span:before{content:"✓";position:absolute;left:0;color:var(--blue);font-weight:900}
.atlox-pde-small{font-size:12px;color:#697386;margin-top:10px}
.atlox-pde-status{
  margin:14px 0 0;
  padding:12px 14px;
  border:1px solid rgba(14,65,148,.13);
  border-radius:11px;
  background:#f7fbff;
  color:var(--blue);
  font-weight:800;
  line-height:1.4;
}
.atlox-pde-status.is-error{border-color:#f0c4c4;background:#fff1f1;color:#a22424}

/* Espace de travail */
.atlox-pde-workspace{margin-top:20px}
.atlox-pde-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  position:sticky;
  top:8px;
  z-index:20;
  padding:12px;
  border:1px solid #b8c1cb;
  border-radius:16px;
  background:linear-gradient(145deg,#e9edf1 0%,#d2d8df 48%,#eef1f4 100%);
  box-shadow:0 10px 24px rgba(21,35,59,.10),inset 0 1px 0 rgba(255,255,255,.9);
}
.atlox-pde-toolbar-group{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.atlox-pde-toolbar button:not(.atlox-pde-download){
  min-height:42px;
  padding:9px 13px;
  border:1px solid #c1cad5;
  border-radius:10px;
  background:rgba(255,255,255,.92);
  color:#26364c;
  font-size:13px;
  font-weight:800;
  box-shadow:0 3px 8px rgba(21,35,59,.04);
  transition:border-color .2s ease,background .2s ease,transform .2s ease;
}
.atlox-pde-toolbar button:not(.atlox-pde-download):hover:not(:disabled){border-color:var(--blue);background:#f7fbff;transform:translateY(-1px)}
.atlox-pde-toolbar button:disabled{opacity:.42;cursor:not-allowed;transform:none!important}
.atlox-pde-spacer{flex:1}
.atlox-pde-download{
  padding:13px 18px;
  background:var(--orange);
  color:var(--blue-dark);
  box-shadow:0 10px 20px rgba(245,156,0,.22);
  white-space:nowrap;
}
.atlox-pde-download:hover:not(:disabled){background:var(--orange-hover);transform:translateY(-1px)}
.atlox-pde-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:18px;
  margin-top:16px;
  padding:18px;
  align-items:start;
  border:1px solid #c7cdd5;
  border-radius:24px;
  background:linear-gradient(135deg,#f3f4f6 0%,#d7dce2 28%,#eef1f4 58%,#cfd5db 100%);
  box-shadow:0 18px 42px rgba(21,35,59,.10),inset 0 1px 0 rgba(255,255,255,.9);
}
.atlox-pde-preview-panel{
  min-height:500px;
  padding:20px;
  overflow:auto;
  border:1px solid rgba(170,181,194,.76);
  border-radius:18px;
  background:rgba(242,245,248,.76);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 8px 22px rgba(21,35,59,.05);
}
.atlox-pde-page{position:relative;margin:0 auto 18px;background:#fff;box-shadow:0 10px 28px rgba(21,35,59,.17)}
.atlox-pde-page:last-child{margin-bottom:0}
.atlox-pde-page canvas{display:block}
.atlox-pde-overlay{position:absolute;inset:0}

/* Blocs sélectionnables du PDF */
.atlox-pde-hit{position:absolute;border:1px solid transparent;border-radius:2px;cursor:text;white-space:pre;line-height:1;overflow:visible}
.atlox-pde-hit:hover{border-color:rgba(14,65,148,.55);background:rgba(14,65,148,.05)}
.atlox-pde-hit.is-selected{border:2px solid var(--orange);z-index:5}
.atlox-pde-hit.is-changed,.atlox-pde-hit.is-added{z-index:4;padding:0 1px;pointer-events:none}
.atlox-pde-hit.is-over{outline:2px dashed #df4c4c}
.atlox-pde-block-hit{position:absolute;z-index:6;box-sizing:border-box;border:1px solid transparent;border-radius:5px;cursor:text;background:transparent}
.atlox-pde-block-hit:hover{border:2px solid rgba(14,65,148,.58);background:rgba(14,65,148,.035)}
.atlox-pde-block-hit.type-experience:hover,.atlox-pde-block-hit.type-profile:hover{background:rgba(245,156,0,.045)}
.atlox-pde-block-hit.is-selected{z-index:7;border:2px solid var(--orange);background:rgba(245,156,0,.035)}
.atlox-pde-addition-hit{position:absolute;z-index:6;border:1px solid transparent;border-radius:3px;cursor:text}
.atlox-pde-addition-hit:hover{border-color:rgba(14,65,148,.55)}
.atlox-pde-addition-hit.is-selected{border:2px solid var(--orange)}
.atlox-pde-bullet-patch{position:absolute;pointer-events:none;border:0;border-radius:0}
.atlox-pde-bullet-patch.is-cover{z-index:4}
.atlox-pde-bullet-patch.is-dot{z-index:5}

/* Panneau de modification */
.atlox-pde-panel{
  position:sticky;
  top:78px;
  padding:19px;
  border:1px solid rgba(170,181,194,.74);
  border-radius:18px;
  background:rgba(255,255,255,.90);
  box-shadow:0 12px 28px rgba(21,35,59,.08),inset 0 1px 0 rgba(255,255,255,.95);
  backdrop-filter:blur(3px);
}
.atlox-pde-panel-kicker{
  display:inline-flex;
  margin-bottom:8px;
  padding:5px 9px;
  border-radius:999px;
  background:#eaf2fd;
  color:var(--blue);
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
}
.atlox-pde-panel h3{margin:0 0 8px;color:var(--blue-dark);font-size:22px;line-height:1.2}
.atlox-pde-panel p{margin:0;color:#5b6a7e;font-size:13px;line-height:1.5}
.atlox-pde-selection-info{
  margin-bottom:14px;
  padding:11px 12px;
  border:1px solid #c9d6e5;
  border-left:4px solid var(--orange);
  border-radius:11px;
  background:linear-gradient(135deg,#f8fbff,#fffaf2);
}
.atlox-pde-selection-info strong{display:block;color:var(--blue-dark);font-size:14px}
.atlox-pde-selection-info span{display:block;margin-top:3px;color:#5c687a;font-size:11px;line-height:1.4}
.atlox-pde-field{margin-bottom:13px}
.atlox-pde-field label{display:block;margin-bottom:6px;color:#33455f;font-size:12px;font-weight:850}
.atlox-pde-field textarea,.atlox-pde-field input[type=number],.atlox-pde-field select{
  width:100%;
  padding:10px 11px;
  border:1px solid #c7d1dd;
  border-radius:10px;
  outline:none;
  background:#fff;
  color:var(--ink);
  box-shadow:inset 0 1px 2px rgba(21,35,59,.03);
  transition:border-color .2s ease,box-shadow .2s ease;
}
.atlox-pde-field textarea:focus,.atlox-pde-field input[type=number]:focus,.atlox-pde-field select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(14,65,148,.10)}
.atlox-pde-field textarea{min-height:116px;resize:vertical;line-height:1.45}
.atlox-pde-field input[type=color]{width:100%;height:42px;padding:3px;border:1px solid #c7d1dd;border-radius:10px;background:#fff;cursor:pointer}
.atlox-pde-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}

.atlox-pde-elements{margin:0 0 14px;padding:11px;border:1px solid #d0d9e4;border-radius:11px;background:#f8fafc}
.atlox-pde-elements-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.atlox-pde-elements-head strong{color:#48576d;font-size:12px}
.atlox-pde-elements-head button{padding:6px 8px;border:1px solid #cbd7e8;border-radius:8px;background:#fff;color:#26364c;font-size:11px;font-weight:800}
.atlox-pde-elements-head button:hover{border-color:var(--blue);background:#f4f7fb}
.atlox-pde-elements-list{display:flex;flex-direction:column;gap:6px;max-height:210px;overflow:auto}
.atlox-pde-element-btn{width:100%;padding:8px 9px;text-align:left;border:1px solid #d8e1ee;border-radius:8px;background:#fff;color:#26364c;font-size:11px;line-height:1.35}
.atlox-pde-element-btn:hover{border-color:var(--blue);background:#f4f7fb}
.atlox-pde-element-btn.is-active{border-color:var(--orange);background:#fff7ea;box-shadow:0 0 0 1px var(--orange) inset}

.atlox-pde-bullet-controls{margin:0 0 14px;padding:11px 12px;border:1px solid #f1d39b;border-radius:11px;background:#fff9ef}
.atlox-pde-bullet-title{margin-bottom:8px;color:#855400;font-size:12px;font-weight:900}
.atlox-pde-check{display:flex;align-items:center;gap:7px;margin-bottom:10px;color:#48576d;font-size:12px}
.atlox-pde-check input{width:16px;height:16px;accent-color:var(--orange)}
.atlox-pde-bullet-controls .atlox-pde-field{margin-bottom:0}

.atlox-pde-move{margin-top:5px;padding-top:13px;border-top:1px solid #e3e8ef}
.atlox-pde-move>span{display:block;margin-bottom:8px;color:#48576d;font-size:12px;font-weight:850}
.atlox-pde-arrows{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.atlox-pde-arrows button{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px;
  border:1px solid #cbd7e8;
  border-radius:9px;
  background:#fff;
  color:#172033!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:19px!important;
  font-weight:700!important;
  line-height:1!important;
}
.atlox-pde-arrows button:hover{border-color:var(--blue);background:#f4f7fb}
.atlox-pde-warning{margin-top:11px;padding:10px;border:1px solid #f0d29c;border-radius:9px;background:#fff5e6;color:#855400;font-size:12px;line-height:1.4}
.atlox-pde-danger{width:100%;margin-top:12px;padding:10px;border:1px solid #e9b7b7;border-radius:10px;background:#fff7f7;color:#a22424;font-weight:850}
.atlox-pde-danger:hover{border-color:#cf8080;background:#fff0f0}
.atlox-pde-help{margin-top:18px;padding:12px 13px;border:1px solid #dbe3ed;border-radius:11px;background:#f5f7fa;color:#5d6b7d;font-size:12px}
.atlox-pde-help strong{color:var(--blue-dark)}
.atlox-pde-help p{margin:4px 0 0;font-size:12px}
.atlox-pde-add-mode{box-shadow:0 0 0 3px rgba(245,156,0,.35) inset}
.atlox-pde-add-mode .atlox-pde-page{cursor:crosshair}

@media(max-width:980px){
  .atlox-pde-upload-zone{flex-wrap:wrap}
  .atlox-pde-primary{width:100%}
  .atlox-pde-grid{grid-template-columns:1fr}
  .atlox-pde-panel{position:static}
}
@media(max-width:800px){
  .atlox-pde{margin-top:12px;padding:0 8px 35px}
  .atlox-pde-intro{padding:18px 16px;border-radius:18px}
  .atlox-pde h2{font-size:24px}
  .atlox-pde-intro p{font-size:14px}
  .atlox-pde-form-shell,.atlox-pde-grid{padding:12px;border-radius:18px}
  .atlox-pde-upload{padding:18px 16px}
  .atlox-pde-upload-head{align-items:flex-start}
  .atlox-pde-upload-head strong{font-size:22px}
  .atlox-pde-upload-zone{min-height:0;padding:18px;gap:16px}
  .atlox-pde-upload-copy>strong{font-size:22px}
  .atlox-pde-upload-reassurance{justify-content:flex-start;flex-direction:column;gap:6px}
  .atlox-pde-toolbar{position:static;flex-wrap:wrap}
  .atlox-pde-toolbar-group{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .atlox-pde-toolbar-group #atlox-pde-add{grid-column:1/-1}
  .atlox-pde-spacer{display:none}
  .atlox-pde-download{width:100%}
  .atlox-pde-preview-panel{padding:10px;border-radius:14px}
}
@media(max-width:520px){
  .atlox-pde-step-number{width:34px;height:34px;flex-basis:34px}
  .atlox-pde-upload-head strong{font-size:19px}
  .atlox-pde-upload-copy>strong{font-size:20px}
  .atlox-pde-row{grid-template-columns:1fr}
  .atlox-pde-panel{padding:15px}
}
