/* V13 : sens et suivi de chargement. */
:root{--loading-blue:#165aba;--loading-pale:#e8f1ff;--unloading-yellow:#f6cf38;--unloading-pale:#fff6cf}
.board th:nth-child(1){width:11%}.board th:nth-child(2){width:12%}.board th:nth-child(3){width:17%}.board th:nth-child(4){width:14%}.board th:nth-child(5){width:11%}.board th:nth-child(6){width:10%}.board th:nth-child(7){width:8%}.board th:nth-child(8){width:11%}.board th:nth-child(9){width:6%}
.board th{padding:14px clamp(5px,.7vw,12px);font-size:clamp(.6rem,.95vw,1.1rem);letter-spacing:.01em;overflow-wrap:normal}
.board td{padding:18px clamp(5px,.7vw,12px);font-size:clamp(.75rem,1.45vw,1.5rem)}
.board tr.direction-loading td,.admin-table tr.direction-loading td{background:var(--loading-pale)}
.board tr.direction-unloading td,.admin-table tr.direction-unloading td{background:var(--unloading-pale)}
.board tr.direction-loading td:first-child,.admin-table tr.direction-loading td:first-child{box-shadow:inset 5px 0 var(--loading-blue)}
.board tr.direction-unloading td:first-child,.admin-table tr.direction-unloading td:first-child{box-shadow:inset 5px 0 var(--unloading-yellow)}
.direction-badge{display:inline-block;max-width:100%;padding:.5em .6em;border-radius:3px;font:800 .68rem/1.2 Arial,Helvetica,sans-serif;overflow-wrap:anywhere;letter-spacing:.02em}
.direction-badge.loading{background:var(--loading-blue);color:#fff}.direction-badge.unloading{background:var(--unloading-yellow);color:#403300}
.board .direction-badge{font-size:clamp(.5rem,.8vw,.9rem)}
.loaded-cell{text-align:center}.loaded-mark{display:inline-grid;place-items:center;width:1.7em;height:1.7em;border-radius:50%;background:#d8eedf;color:#216337;font-weight:900}
.loading-date,.loading-time{font-variant-numeric:tabular-nums;white-space:nowrap}
/* Deux boutons de sens, communs à la création et à la modification. */
.direction-field{margin:0;padding:0;border:0;min-width:0}
.direction-field legend{margin-bottom:7px;padding:0;color:#4e575d;font-size:.7rem;font-weight:800;letter-spacing:.07em}
.direction-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.direction-choice{min-height:44px;padding:9px 5px;border:2px solid #c4c8cb;background:#fff;color:var(--black);font:700 .76rem Arial,Helvetica,sans-serif;cursor:pointer}
.direction-choice.loading-choice{border-color:var(--loading-blue);color:var(--loading-blue)}
.direction-choice.unloading-choice{border-color:#c5a111;color:#735900}
.direction-choice.loading-choice.selected{background:var(--loading-blue);color:#fff}
.direction-choice.unloading-choice.selected{background:var(--unloading-yellow);color:#403300;border-color:#a88b0c}
.direction-choice:hover{box-shadow:inset 0 0 0 1px currentColor}
.direction-choice:focus-visible,.row-button:focus-visible{outline:3px solid #242424;outline-offset:3px}
.admin-table .row-actions{align-items:center;white-space:nowrap}
.admin-table th:last-child,.admin-table td:last-child{width:1%;padding-left:8px;padding-right:10px}
.loaded-control{display:flex;align-items:center;gap:10px;min-height:36px}
.loaded-checkbox,.loaded-control input{width:21px;height:21px;min-height:21px;padding:0;accent-color:var(--loading-blue);cursor:pointer}
.loaded-checkbox:disabled{cursor:default;opacity:.8}
.admin-table{min-width:1280px}.admin-grid{grid-template-columns:minmax(260px,320px) minmax(0,1fr)}
.admin-table tr.is-hidden td{color:#687178}.admin-table .status-masked{background:#e3e5e6;color:#525c65}
.admin-table-wrap:focus-within{outline-offset:3px}.row-button:disabled{opacity:.5;cursor:wait}
@media(max-width:800px){.admin-grid{grid-template-columns:minmax(0,1fr)}.board th{padding:10px 4px;font-size:clamp(.38rem,1.4vw,.65rem)}.board td{padding:12px 4px;font-size:clamp(.45rem,1.7vw,.8rem)}.board .direction-badge{font-size:clamp(.32rem,1.1vw,.6rem);padding:.45em .3em}.board tr.direction-loading td:first-child,.board tr.direction-unloading td:first-child{box-shadow:none}}

/* V16 : heure et quai, également sur les lignes archivées. */
.dock-number{overflow-wrap:anywhere}
.board td.loading-time,.board td.dock-number{font-variant-numeric:tabular-nums;font-weight:700}

/* V17 : utiliser la largeur de l'écran admin sans imposer 1280 px au tableau. */
@media(min-width:801px){
  .admin-view{padding:20px 16px}
  .admin-header,.admin-grid{max-width:none;width:100%}
  .admin-grid{grid-template-columns:240px minmax(0,1fr);gap:16px;margin-top:20px}
  .entry-panel,.lines-panel{min-width:0}
  .entry-panel{padding:18px}
  .admin-table{width:100%;min-width:0;table-layout:fixed}
  .admin-table th,.admin-table td{padding:12px 6px;white-space:normal;overflow-wrap:anywhere}
  .admin-table th{font-size:.6rem;letter-spacing:.02em;overflow-wrap:normal}
  .admin-table td{font-size:clamp(.7rem,.7vw,.84rem)}
  .admin-table th:nth-child(1){width:8%}
  .admin-table th:nth-child(2){width:8%}
  .admin-table th:nth-child(3){width:12%}
  .admin-table th:nth-child(4){width:11%}
  .admin-table th:nth-child(5){width:10%}
  .admin-table th:nth-child(6){width:8%}
  .admin-table th:nth-child(7){width:6%}
  .admin-table th:nth-child(8){width:6%}
  .admin-table th:nth-child(9){width:9%}
  .admin-table th:nth-child(10){width:7%}
  .admin-table th:nth-child(11){width:15%}
  .admin-table th:last-child,.admin-table td:last-child{padding-left:6px;padding-right:6px}
  .admin-table .row-actions{flex-wrap:wrap;gap:5px;white-space:normal}
  .admin-table .row-button{max-width:100%;overflow-wrap:anywhere}
  .admin-table .icon-button{flex:0 0 29px;width:29px;height:29px}
  .admin-table .status{max-width:100%;padding:5px;font-size:.57rem;letter-spacing:0}
  .admin-table .loading-time{white-space:nowrap}
}
@media(min-width:801px) and (max-width:1200px){
  .admin-grid{grid-template-columns:minmax(0,1fr)}
  .entry-panel form{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
  .entry-panel .form-error,.entry-panel .form-actions,.entry-panel .carrier-suggestions{grid-column:1/-1}
}
