*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:#f4f6f8;color:#25313c}
header{background:#fff;border-bottom:1px solid #dfe4e8;padding:12px 20px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}
.brand{font-size:22px;font-weight:700}.scale{font-size:28px;font-weight:800;border:2px solid #444;padding:4px 12px;border-radius:6px;background:#fff}
main{max-width:1200px;margin:20px auto;padding:0 16px}.panel{background:#fff;border:1px solid #dce2e7;border-radius:8px;padding:15px;margin-bottom:16px;box-shadow:0 2px 8px #0000000a}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.btn{border:0;border-radius:5px;padding:9px 14px;cursor:pointer;background:#e7edf2}.btn.primary{background:#14aebb;color:#fff}.btn.danger{background:#d9534f;color:#fff}
table{width:100%;border-collapse:collapse}th,td{padding:8px;border-bottom:1px solid #e5e9ec;text-align:left;font-size:14px}tbody tr{cursor:pointer}tbody tr:hover{background:#ecfbfd}
.tabs{display:flex;gap:2px}.tab{padding:10px 18px;border:0;background:#e7edf2;cursor:pointer}.tab.active{background:#fff;border-top:3px solid #14aebb}
.tabpage{display:none}.tabpage.active{display:block}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
label{display:block;font-size:13px;color:#52616d;margin-bottom:4px}input,select,textarea{width:100%;padding:9px;border:1px solid #cbd3d9;border-radius:4px;background:#fff}
textarea{min-height:75px}.wide{grid-column:1/-1}.charts{display:grid;grid-template-columns:1fr 1fr;gap:15px}.chart{min-height:210px;border:1px solid #ddd;padding:12px}
.bar{height:22px;background:#18aebb;margin:5px 0;border-radius:3px;color:#fff;padding:2px 7px;min-width:2px}.muted{color:#72808c}.hidden{display:none!important}
@media(max-width:850px){.form-grid,.charts{grid-template-columns:1fr}table{display:block;overflow:auto}.scale{font-size:20px}}

.user{white-space:nowrap;font-size:.92rem}

/* Liste principale : environ 15 lignes visibles, puis ascenseur vertical. */
.delivery-scroll{
  max-height:590px;
  overflow-y:auto;
  overflow-x:auto;
  border:1px solid #e5e9ec;
  border-radius:4px;
}
.delivery-scroll thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#fff;
}
.delivery-scroll table{margin:0}
.delivery-scroll tbody tr{height:36px}

/* Écran indépendant de saisie d'une livraison. */
.delivery-entry{max-width:1200px;margin:20px auto;padding:0 16px}
.delivery-entry .section-title{
  margin:4px 0 12px;
  padding-bottom:7px;
  border-bottom:2px solid #14aebb;
  color:#31414d;
}
.delivery-entry .upload-box{
  border:1px dashed #9eabb4;
  border-radius:7px;
  padding:12px;
  background:#fafcfd;
}
.delivery-entry .upload-box small{display:block;color:#72808c;margin-top:5px}
.delivery-entry .preview{
  display:none;
  max-width:260px;
  max-height:180px;
  margin-top:10px;
  border:1px solid #dce2e7;
  border-radius:5px;
}
.delivery-entry .result{
  padding:12px;
  border-radius:6px;
  margin-bottom:15px;
  background:#eaf8ef;
  border:1px solid #b9dfc6;
}
.delivery-entry .result.error{
  background:#fdeceb;
  border-color:#efb8b5;
}
.delivery-entry .document-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
@media(max-width:850px){
  .delivery-scroll{max-height:520px}
}

.eye-column,.eye-cell{width:42px;text-align:center!important;padding-left:6px!important;padding-right:6px!important}
.eye-header{width:22px;height:22px;display:block;margin:auto}
.eye-link{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%}
.eye-link:hover{background:#e8f5f6}
.eye-link img{width:22px;height:22px}
.camera-box{border:1px solid #d7e0e5;border-radius:7px;padding:12px;background:#f8fafb}
.camera-image{display:block;width:100%;max-width:620px;max-height:380px;object-fit:contain;background:#1f272d;border-radius:5px;margin:10px 0}
.camera-status{color:#66747e;font-size:.9rem}
.existing-documents{display:flex;gap:10px;flex-wrap:wrap;margin:9px 0}
.source-selector label{display:inline-flex;align-items:center;gap:6px;margin:0}.source-selector input{width:auto}.ocr-result{margin-top:10px;padding:10px;border:1px solid #b9dfe2;background:#eefbfc;border-radius:5px}.ocr-result pre{white-space:pre-wrap}.error-text{color:#b3261e}

/* Eucadéra V3.7 - Gestion des parcelles */
.list-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px}
.list-heading h1{margin:0 0 4px}.list-heading p{margin:0}
.parcel-scroll{max-height:650px}
.parcel-form-grid{grid-template-columns:repeat(3,1fr)}
.parcel-map{height:430px;width:100%;border:1px solid #cbd3d9;border-radius:7px;overflow:hidden;background:#eef1f3}
.map-help{margin:0 0 7px}.map-error{padding:24px;color:#b3261e}
.gps-actions{align-self:end}.form-actions{margin-top:22px;padding-top:15px;border-top:1px solid #e2e7ea}
@media(max-width:850px){.list-heading{flex-direction:column}.parcel-form-grid{grid-template-columns:1fr}.parcel-map{height:340px}}

/* V3.12 - distinction visuelle des zones de réception */
.reception-form .entry-field{background:#fff7bf!important}
.reception-form .display-field,.reception-form input[readonly]{background:#fff!important;color:#263238}
.reception-form input[type=file].entry-field{padding:8px}

.expedition-form .entry-field{background:#fff7bf!important}
.expedition-form .display-field,.expedition-form input[readonly]{background:#fff!important;color:#263238}
.expedition-form input[type=file].entry-field{padding:8px}
