/* Espace GRABE — styles propres au chantier S3 (préfixer par .es). Transferts, envoi à GRABE, téléchargement, dépôt, admin.
   Tailles en clamp() : du téléphone (390 px) à l'écran 32" (2560 px). Animations coupées si prefers-reduced-motion. */

/* ---------- Cadre commun (/, /envoyer, /t/, /d/) ---------- */
/* L'ancien .drop de base.css pose un fond clair : neutralisé ici (le rond rouge suffit). */
.es .drop,.es .drop:hover,.es .drop.is-over{background:none;min-height:0;padding:8px;border-radius:0}
.es .drop.is-over::after{display:none}
.es .tr-bg{position:relative}
.es .tr-bg.login-bg > header.tr-head{padding:clamp(22px,2.6vw,52px) clamp(16px,2.8vw,64px)}
.es .tr-head{position:relative;z-index:5}
.es .tr-brand{padding-left:0}
.es .tr-bg .tr-brand img{height:clamp(26px,1.6vw,36px)}
.es .tr-bg .tr-brand span{font-size:clamp(12px,.35vw + 7px,15px)}
.es .tr-main{flex:1;display:flex;flex-direction:column;align-items:center;padding:0 clamp(16px,3vw,64px) clamp(48px,5vw,110px)}
.es .tr-main.tr-center{justify-content:center}
.es .tr-bg.is-over .drop .ring{animation-play-state:paused;transform:scale(1.08);box-shadow:0 0 0 14px rgba(229,55,63,.18),0 22px 70px rgba(229,55,63,.5)}
.es .tr-bg.is-over::after{content:"";position:absolute;inset:14px;border-radius:32px;border:2px dashed rgba(255,255,255,.28);pointer-events:none}
.es .tr-acc{width:clamp(44px,2.6vw,54px);height:clamp(44px,2.6vw,54px);border:0;cursor:pointer;text-decoration:none}
.es .tr-home{display:flex;flex-direction:column;align-items:center;gap:26px}
.es .tr-intro{max-width:440px}
.es .tr-notice{max-width:460px;padding:20px 22px;border-radius:22px;background:rgba(255,255,255,.07);border:1px solid var(--line);display:flex;flex-direction:column;gap:8px;text-align:center}
.es .tr-notice[hidden]{display:none}
.es .tr-notice-btns{justify-content:center;margin-top:6px}
.es .tr-grow{flex:1;min-width:0}
.es .tr-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.es .tr-pre{white-space:pre-line}
.es .tr-light{color:#e4e8ee}
.es .tr-c{text-align:center}
.es .tr-av{width:40px;height:40px;font-size:12px;flex:none}
.es .tr-av-logo img{width:64%;height:auto;filter:brightness(0) invert(1)}
.es .tr-ico{width:15px;height:15px;flex:none}
.es .tr-list{display:flex;flex-direction:column;gap:10px}
.es .tr-file{padding:10px 14px}
.es .tr-file .tr-bar{margin-top:8px}
.es .tr-file .tr-bar[hidden]{display:none}
.es .tr-file .num{white-space:nowrap}
.es .tr-file.is-error .thumb{background:rgba(229,55,63,.25)}
.es .tr-thumb{overflow:hidden;padding:0}
.es .tr-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.es .tr-thumb-btn{cursor:zoom-in;transition:transform .25s cubic-bezier(.22,1,.36,1),box-shadow .25s}
.es .tr-thumb-btn:hover,.es .tr-thumb-btn:focus-visible{transform:scale(1.06);box-shadow:0 0 0 2px rgba(229,55,63,.8)}
.es .tr-x{flex:none;width:30px;height:30px;border-radius:50%;border:0;background:rgba(255,255,255,.08);color:var(--soft);font-size:18px;line-height:1;cursor:pointer;display:grid;place-items:center}
.es .tr-x:hover{background:rgba(229,55,63,.35);color:#fff}
.es .tr-add{background:none;border:0;padding:0;cursor:pointer;font-family:ABeeZee,sans-serif;font-size:13px;color:var(--soft);text-decoration:underline;text-underline-offset:3px;align-self:flex-start}
.es .tr-add:hover{color:#fff}
.es .tr-meta{width:100%}
.es .tr-meta .row,.es .tr-kv{padding:10px 0;border-top:1px solid rgba(255,255,255,.08);gap:16px}
.es .tr-meta .t-label{text-align:right}
.es .tr-linkrow{display:flex;gap:8px;align-items:center;width:100%}
.es .tr-linkrow .input{flex:1;min-width:0;font-size:13px}
.es .tr-gone{max-width:520px;display:flex;flex-direction:column;gap:14px;align-items:flex-start;background:rgba(255,255,255,.06)}
.es .tr-acts{justify-content:flex-end;gap:6px;flex-wrap:nowrap}

/* Grands écrans : le texte grandit un peu avec l'écran (jamais minuscule sur un 32"). */
.es .tr-bg .t-desc{font-size:clamp(13px,.3vw + 8.6px,16px)}
.es .tr-bg .t-mention{font-size:clamp(12px,.25vw + 8.4px,14.5px)}
.es .tr-bg .t-label{font-size:clamp(14px,.3vw + 9.6px,17px)}
.es .tr-bg .t-sub{font-size:clamp(17px,.45vw + 10.5px,23px)}
.es .tr-bg .big.s{font-size:clamp(28px,1.5vw + 8px,48px)}
.es .tr-bg .input{font-size:clamp(14px,.25vw + 10.4px,16.5px)}
.es .tr-bg .btn{font-size:clamp(16px,.3vw + 11.6px,19px)}
.es .tr-bg .btn.btn-sm{font-size:clamp(13px,.2vw + 10px,15px)}
.es .tr-bg .thumb{width:clamp(46px,2.6vw,58px);height:clamp(46px,2.6vw,58px)}

/* ---------- Le rond rouge : logo GRABE ↔ flèche (fondu en boucle) ---------- */
.es .tr-bg .drop .ring{width:clamp(200px,17vw,340px);height:clamp(200px,17vw,340px)}
.es .tr-mark{position:relative;display:grid;place-items:center;width:100%;height:100%;color:#fff}
.es .tr-mark > *{grid-area:1/1;align-self:center;justify-self:center}
.es .ring .tr-mark .tr-mark-logo{display:block;width:49.6%;height:auto;margin:0;filter:brightness(0) invert(1);transform:none;animation:tr-mark-logo 9s cubic-bezier(.45,0,.55,1) infinite}
.es .tr-mark .tr-mark-ico{width:34%;height:34%;opacity:0;animation:tr-mark-up 9s cubic-bezier(.45,0,.55,1) infinite}
.es .tr-mark.is-down .tr-mark-ico{animation-name:tr-mark-down}
@keyframes tr-mark-logo{0%,40%{opacity:1;transform:scale(1)}47%,88%{opacity:0;transform:scale(.9)}95%,100%{opacity:1;transform:scale(1)}}
@keyframes tr-mark-up{0%,42%{opacity:0;transform:translateY(16%)}52%,82%{opacity:1;transform:translateY(0)}90%,100%{opacity:0;transform:translateY(-16%)}}
@keyframes tr-mark-down{0%,42%{opacity:0;transform:translateY(-16%)}52%,82%{opacity:1;transform:translateY(0)}90%,100%{opacity:0;transform:translateY(16%)}}

/* ---------- Rond liquide (envoi, merci) ---------- */
.es .tr-liquid{position:relative;flex:none;display:grid;place-items:center;border-radius:50%;filter:drop-shadow(0 18px 46px rgba(229,55,63,.26))}
.es .tr-liquid.is-born{animation:tr-born .5s cubic-bezier(.22,1,.36,1) both}
.es .tr-liq-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.es .tr-liq-bg{fill:rgba(255,255,255,.05)}
.es .tr-liq-rim{fill:none;stroke:rgba(255,255,255,.24);stroke-width:1.5}
.es .tr-liq-front path{fill:#e5373f}
.es .tr-liq-back path{fill:#b8173e}
.es .tr-liq-front{animation:tr-wave 2.8s linear infinite}
.es .tr-liq-back{animation:tr-wave 4.4s linear -1.7s infinite reverse}
.es .tr-liq-txt{position:relative;display:flex;align-items:baseline;gap:2px;font-family:"Neulis","Source Sans 3",sans-serif;font-weight:800;font-size:clamp(42px,3.6vw,72px);line-height:1;letter-spacing:-.02em;color:#fff;text-shadow:0 2px 18px rgba(30,36,48,.35);font-variant-numeric:tabular-nums;transition:opacity .3s,transform .4s cubic-bezier(.22,1,.36,1)}
.es .tr-liq-txt small{font-size:.42em;font-weight:700;opacity:.85}
.es .tr-liq-check{fill:none;stroke:#fff;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .55s cubic-bezier(.65,0,.35,1) .12s}
.es .tr-liquid.is-done .tr-liq-txt{opacity:0;transform:scale(.7)}
.es .tr-liquid.is-done .tr-liq-check{stroke-dashoffset:0}
.es .tr-liquid-sm .tr-liq-txt{display:none}
.es .tr-liquid-sm .tr-liq-check{stroke-width:11}
@keyframes tr-wave{from{transform:translateX(0)}to{transform:translateX(-200px)}}
@keyframes tr-born{from{transform:scale(.94);opacity:.4}to{transform:scale(1);opacity:1}}

/* ---------- Envoi (Transfert-envoi, /envoyer) ---------- */
.es .tr-send{width:100%;max-width:clamp(860px,58vw,1320px);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(28px,2.4vw,52px);padding:clamp(30px,2.2vw,48px);background:rgba(255,255,255,.06)}
.es .tr-files{display:flex;flex-direction:column;gap:10px;min-width:0}
.es .tr-form{display:flex;flex-direction:column;gap:14px;min-width:0}
.es .tr-form .tabs{align-self:flex-start}
.es .tr-form .field[hidden]{display:none}
.es .tr-msg{min-height:48px}
/* Repli du panneau : le contenu s'efface vers le centre pendant que le contour devient un cercle (fx.js). */
.es .tr-send.is-folding{border-color:transparent;will-change:clip-path}
.es .tr-send.is-folding > *{opacity:0;transform:scale(.9);filter:blur(6px);transition:opacity .3s ease,transform .6s cubic-bezier(.65,0,.35,1),filter .45s ease}
.es .tr-stage{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(16px,1.6vw,26px);transition:min-height .6s cubic-bezier(.65,0,.35,1)}
.es .tr-stage.is-final{justify-content:flex-start;padding-top:clamp(8px,4vh,60px)}
.es .tr-stage-cap{min-height:1.5em;text-align:center}
.es .tr-done{width:100%;max-width:clamp(560px,38vw,760px);display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.es .tr-done-btns{justify-content:center;margin-top:4px}
.es .tr-reveal > *{animation:tr-rise .6s cubic-bezier(.22,1,.36,1) both}
.es .tr-reveal > :nth-child(2){animation-delay:.07s}
.es .tr-reveal > :nth-child(3){animation-delay:.14s}
.es .tr-reveal > :nth-child(4){animation-delay:.21s}
.es .tr-reveal > :nth-child(5){animation-delay:.28s}
@keyframes tr-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ---------- Merci (téléchargement) ---------- */
.es .tr-thanks{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:16px;background:rgba(20,24,33,.5);backdrop-filter:blur(6px);animation:tr-fade .25s ease both;cursor:pointer}
.es .tr-thanks.is-out{opacity:0;transition:opacity .3s ease}
.es .tr-thanks-card{display:flex;flex-direction:column;align-items:center;gap:10px;padding:clamp(28px,2vw,40px) clamp(34px,2.6vw,52px);border-radius:28px;background:#2e3646;border:1px solid rgba(255,255,255,.1);box-shadow:0 30px 80px rgba(0,0,0,.4);text-align:center;animation:tr-pop .45s cubic-bezier(.22,1,.36,1) both}
.es .tr-thanks-card .tr-liquid{margin-bottom:8px}
.es .tr-thanks-title,.es .tr-thanks-card .t-desc{opacity:0;transform:translateY(6px);transition:opacity .35s ease,transform .45s cubic-bezier(.22,1,.36,1)}
.es .tr-thanks.is-thanked .tr-thanks-title,.es .tr-thanks.is-thanked .t-desc{opacity:1;transform:none}
.es .tr-thanks.is-thanked .t-desc{transition-delay:.08s}
@keyframes tr-fade{from{opacity:0}to{opacity:1}}
@keyframes tr-pop{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}

/* ---------- Téléchargement (/t/) ---------- */
.es .tr-dl{width:100%;max-width:clamp(980px,66vw,1480px);display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:clamp(32px,2.6vw,56px);padding:clamp(32px,2.2vw,52px);background:rgba(255,255,255,.06)}
.es .tr-dl-info{display:flex;flex-direction:column;gap:16px;align-items:flex-start;min-width:0}
.es .tr-dl-info .big{overflow-wrap:anywhere}
.es .tr-dl-ring{border:0;padding:0;margin:0 0 4px;color:inherit;font:inherit;align-self:center}
.es .tr-bg .tr-dl-ring .ring{width:clamp(132px,9vw,190px);height:clamp(132px,9vw,190px);margin:0}
.es .tr-dl-ring:disabled{cursor:default}
.es .tr-dl .tr-list > .t-mention{margin-bottom:2px}

/* ---------- Aperçu plein écran (preview.js) ---------- */
.es.tr-pv{position:fixed;inset:0;width:100vw;height:100vh;max-width:none;max-height:none;min-height:0;margin:0;padding:0;border:0;background:rgba(18,21,29,.97);color:#fff;display:flex;flex-direction:column;overflow:hidden}
.es.tr-pv:not([open]){display:none}
.es.tr-pv::backdrop{background:rgba(0,0,0,.6)}
.es .tr-pv-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px clamp(16px,2vw,32px);border-bottom:1px solid var(--line);flex:none}
.es .tr-pv-title{min-width:0;display:flex;flex-direction:column;gap:2px}
.es .tr-pv-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(14px,.3vw + 9.6px,18px)}
.es .tr-pv-acts{gap:10px;flex:none}
.es .tr-pv-x{width:42px;height:42px;border-radius:50%;border:0;background:rgba(255,255,255,.08);color:#fff;display:grid;place-items:center;cursor:pointer}
.es .tr-pv-x:hover{background:rgba(255,255,255,.16)}
.es .tr-pv-body{position:relative;flex:1;min-height:0;display:flex}
.es .tr-pv-stage{flex:1;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;padding:clamp(12px,2vw,36px) clamp(64px,6vw,120px);overflow:auto}
.es .tr-pv-stage.is-pdf,.es .tr-pv-stage.is-text{display:block}
.es .tr-pv-img{display:block;max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;box-shadow:0 20px 60px rgba(0,0,0,.45);animation:tr-fade .3s ease both}
.es .tr-pv-media{display:block;max-width:100%;max-height:100%;border-radius:12px;background:#000}
.es .tr-pv-audiobox,.es .tr-pv-other{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.es .tr-pv-audio{width:min(560px,80vw)}
.es .tr-pv-bigthumb{width:clamp(88px,6vw,120px);height:clamp(88px,6vw,120px);border-radius:26px;font-size:16px}
.es .tr-pv-pages{width:100%;max-width:1140px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:16px;outline:0}
.es .tr-pv-page{display:block;max-width:100%;height:auto;background:#fff;border-radius:4px;box-shadow:0 14px 40px rgba(0,0,0,.4)}
.es .tr-pv-text{width:100%;max-width:1000px;margin:0 auto;white-space:pre-wrap;overflow-wrap:anywhere;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:clamp(13px,.3vw + 8.6px,16px);line-height:1.55;color:#e4e8ee;background:rgba(255,255,255,.04);border:1px solid var(--line);border-radius:18px;padding:clamp(16px,2vw,32px)}
.es .tr-pv-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:clamp(46px,3.2vw,62px);height:clamp(46px,3.2vw,62px);border-radius:50%;border:0;background:rgba(255,255,255,.1);color:#fff;display:grid;place-items:center;cursor:pointer;transition:background .2s}
.es .tr-pv-nav:hover{background:rgba(229,55,63,.85)}
.es .tr-pv-prev{left:clamp(8px,1.2vw,28px)}
.es .tr-pv-next{right:clamp(8px,1.2vw,28px)}

/* ---------- Dépôt (/d/) ---------- */
.es .tr-depot-col{width:100%}
.es .tr-bg .depot{max-width:clamp(1100px,70vw,1560px)}
.es .depot-info .big{overflow-wrap:anywhere}
.es button.nchk{border:0;background:none;padding:0;cursor:pointer}
.es .nchk.on{background:#9db58a;box-shadow:none;color:#262d3b}
.es .tr-ident{width:100%;max-width:440px;display:flex;flex-direction:column;gap:10px;text-align:center}
.es .tr-ident-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.es .depot-drop .err{text-align:center}
.es .depot-drop .tr-list,.es .tr-sent{width:100%;max-width:440px}
.es .tr-sent{display:flex;flex-direction:column;gap:10px}
.es .tr-sent[hidden]{display:none}

/* ---------- Admin ---------- */
.es .tr-table{padding:24px 24px 10px}
.es .tr-dir{white-space:nowrap}
.es .tr-table .num{white-space:nowrap}
.es .tr-depform{display:flex;flex-direction:column;gap:16px}
.es .tr-grid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
@media (max-width:900px){.es .tr-grid2{grid-template-columns:minmax(0,1fr)}}
.es .tr-need-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;align-items:center}
.es .tr-check{gap:10px;cursor:pointer}
.es .tr-check input{width:18px;height:18px;accent-color:#e5373f}
.es .tr-created{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:18px;background:rgba(157,181,138,.12)}
.es .tr-created .t-label{display:flex;align-items:center;gap:6px;color:#b9d3a5}
.es.tr-modal{min-height:0;display:flex;flex-direction:column;gap:16px;background:transparent}
.es.tr-modal .tr-sm{gap:2px}
.es.tr-modal .tr-sm > .t-label,.es.tr-modal .tr-sm > .row > .t-label{margin-bottom:6px}
.es.tr-modal .tr-sm > .tr-add{margin-top:6px}
.es.tr-modal .tr-kv{align-items:center;gap:10px}
.es.tr-modal .tabs.dur{flex-wrap:wrap}
.es.tr-modal .tabs.dur a{padding:6px 11px;font-size:13px}
.es .tr-modal-btns{gap:8px;margin-top:4px}
.es .tr-edit{gap:8px}
.es .tr-edit .tr-edit-title{font-family:"Neulis","Source Sans 3",sans-serif;font-weight:700;font-size:20px}
.es .tr-edit .btn[hidden]{display:none}
.es .tr-edit .btn{align-self:flex-start}
.es .tr-ext{gap:8px;align-items:center}
.es .tr-days{width:84px;padding:8px 12px}
.es .tr-thumb-sm{width:36px;height:36px;border-radius:10px;font-size:9px}
.es .tr-bar-sm{width:90px;margin:0}
.es .tr-from{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:18px;background:rgba(255,255,255,.05)}
.es .tr-hist summary{cursor:pointer}
.es .tr-hist[open] summary{margin-bottom:6px}

/* ---------- Mobile ---------- */
@media (max-width:900px){
  .es .tr-head .pill{white-space:normal;text-align:right;max-width:200px}
  .es .tr-send,.es .tr-dl{grid-template-columns:minmax(0,1fr);padding:20px;gap:22px}
  .es .tr-bg .tr-dl .big,.es .tr-bg .depot-info .big{font-size:26px}
  .es .depot{gap:18px}
  .es .depot-info{padding:24px 22px}
  .es .depot-drop{padding:22px 16px}
  .es .tr-ident-row{grid-template-columns:minmax(0,1fr)}
  .es .tr-need-row{grid-template-columns:minmax(0,1fr) auto}
  .es .tr-need-row .input:nth-child(2){grid-column:1}
  .es .tr-linkrow{flex-wrap:wrap}
  .es .tr-linkrow .input{flex-basis:100%}
  .es .tr-file{flex-wrap:wrap}
  .es .tr-dl .tr-file .tr-acts{flex-basis:100%;justify-content:flex-end}
  .es .tr-table{padding:6px 16px}
  /* Tableau → cartes empilées sur mobile */
  .es .tr-table .table,.es .tr-table tbody{display:block;overflow:visible}
  .es .tr-table thead{display:none}
  .es .tr-table tr{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:16px 0;border-top:1px solid var(--line)}
  .es .tr-table tbody tr:first-child{border-top:0}
  .es .tr-table td{border:0;padding:0}
  .es .tr-table td:nth-child(2){order:-1;flex-basis:100%}
  .es .tr-table td:nth-child(3){flex-basis:100%;overflow-wrap:anywhere}
  .es .tr-table td:nth-child(4)::before{content:"le "}
  .es .tr-table td:nth-child(5)::before{content:"· expire "}
  .es .tr-table td:nth-child(6)::before{content:"· téléch. "}
  .es .tr-table td:nth-child(8){flex-basis:100%}
  .es .tr-table .tr-acts{justify-content:flex-start}
  .es .tr-dep{flex-wrap:wrap}
  .es .tr-dep .tr-acts{flex-basis:100%;justify-content:flex-start}
  .es .tabs.dur{flex-wrap:wrap}
  .es.tr-modal .tr-kv{flex-wrap:wrap}
  .es .tr-pv-stage{padding:12px 12px 84px}
  .es .tr-pv-nav{top:auto;bottom:16px;transform:none}
  .es .tr-pv-prev{left:calc(50% - 60px)}
  .es .tr-pv-next{right:calc(50% - 60px)}
  .es .tr-pv-bar .btn{padding:8px 12px}
}

/* ---------- Mouvement réduit : tout est immobile, état final directement ---------- */
@media (prefers-reduced-motion:reduce){
  .es .ring .tr-mark .tr-mark-logo,.es .tr-mark .tr-mark-ico,.es .tr-bg .drop .ring{animation:none}
  .es .tr-mark .tr-mark-ico{opacity:0}
  .es .tr-liq-front,.es .tr-liq-back,.es .tr-liquid.is-born,.es .tr-reveal > *,.es .tr-thanks,.es .tr-thanks-card,.es .tr-pv-img{animation:none}
  .es .tr-liq-check,.es .tr-liq-txt,.es .tr-stage,.es .tr-thanks-title,.es .tr-thanks-card .t-desc,.es .tr-thumb-btn{transition:none}
}
.es .tr-liquid.is-still .tr-liq-front,.es .tr-liquid.is-still .tr-liq-back{animation:none}
.es .tr-liquid.is-still .tr-liq-check{transition:none}
