/* Release gallery and office viewer. The images belong to authenticated releases. */
#view-fichiers,#view-bureau{
  --gallery-ink:#1d1d1f;--gallery-muted:#606067;--gallery-canvas:#fff;--gallery-pearl:#f5f5f7;
  --gallery-line:#dedee2;--gallery-blue:#0066cc;--gallery-focus:#0071e3;
  --gallery-font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Arial,sans-serif;
  color-scheme:light;min-width:0;color:var(--gallery-ink);font:15px/1.45 var(--gallery-font);
}
#workspace:has(#view-fichiers:not([hidden]),#view-bureau:not([hidden])){min-height:100dvh;background:#fff;}
#content:has(#view-fichiers:not([hidden]),#view-bureau:not([hidden])){padding:clamp(20px,3vw,42px) clamp(18px,4vw,70px) 48px;max-width:1600px;}
:is(#view-fichiers,#view-bureau) :is(button,input,select){font-family:var(--gallery-font);}
:is(#view-fichiers,#view-bureau) :is(button,a,select,input):focus-visible,.monitor-expand:has(input:focus-visible){outline:3px solid #0071e3;outline-offset:3px;}
:is(#view-fichiers,#view-bureau) .console-pagehead{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 clamp(20px,3vw,38px);}
:is(#view-fichiers,#view-bureau) .console-pagehead h1{color:var(--gallery-ink);font:625 clamp(37px,4vw,56px)/1.07 var(--gallery-font);letter-spacing:-.045em;margin:0;}
.console-pagehead p{color:var(--gallery-muted);font-size:clamp(13px,1.05vw,16px);font-weight:400;line-height:1.45;margin:6px 0 0;}
:is(#view-fichiers,#view-bureau) .ico{width:18px;height:18px;stroke-width:1.65;flex:none;}
:is(#view-fichiers,#view-bureau) .monitor-tool,.batch-zip,.library-index header button{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 13px;
  border:0;border-radius:999px;background:var(--gallery-pearl);color:var(--gallery-blue);cursor:pointer;
  font:500 14px/1.15 var(--gallery-font);text-decoration:none;white-space:nowrap;
}
:is(#view-fichiers,#view-bureau) .monitor-tool:hover,.batch-zip:hover,.library-index header button:hover{background:#e8eef6;color:#004e9d;}
:is(#view-fichiers,#view-bureau) .monitor-tool:disabled{opacity:.55;cursor:progress;}
.library-workbench,.library-index,.library-explorer{display:block;min-width:0;}
.library-index{margin-bottom:clamp(24px,3vw,43px);}
.library-index header{display:flex;align-items:center;justify-content:space-between;margin:0 0 9px;gap:10px;}
.library-index h2,.library-transfers h2,.library-batch h2{color:var(--gallery-ink);font:620 clamp(20px,1.8vw,27px)/1.24 var(--gallery-font);letter-spacing:-.038em;margin:0;}
.library-index header button,.batch-zip{background:transparent;}
.library-index header button{margin-right:-9px;}
#release-index{
  display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 48px)/4);gap:16px;
  overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;
  padding:4px 3px 7px;margin:0 -3px;
}
.library-release{
  display:flex;flex-direction:column;align-items:stretch;min-width:0;text-align:left;background:transparent;
  color:var(--gallery-ink);border:0;border-radius:13px;font:inherit;cursor:pointer;padding:0;scroll-snap-align:start;
}
.release-cover{
  position:relative;display:grid;place-items:center;aspect-ratio:1.95;width:100%;border-radius:11px;
  overflow:hidden;isolation:isolate;background:#f0f0f3;color:#4d5260;border:1px solid #0000000c;
}
.release-cover img{display:block;width:100%;height:100%;object-fit:cover;}
.release-cover-art{display:grid;place-items:center;width:50px;height:50px;border-radius:14px;background:#fff;color:#5c6573;}
#view-fichiers .release-cover-art .ico{width:31px;height:31px;stroke-width:1.25;}
.library-release[aria-pressed=true] .release-cover{outline:2px solid var(--gallery-focus);outline-offset:2px;}
.library-release[aria-pressed=true] .release-cover::after{content:"✓";position:absolute;right:9px;top:8px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#fff;color:var(--gallery-blue);font:bold 14px/1 var(--gallery-font);}
.release-copy{display:grid;gap:2px;text-align:left;min-width:0;padding:11px 1px 3px;}
.release-copy strong,.asset-title strong{color:var(--gallery-ink);font-weight:570;overflow-wrap:anywhere;line-height:1.32;}
.release-copy strong{font-size:clamp(15px,1.35vw,19px);letter-spacing:-.025em;}
.library-release:hover .release-copy strong,.library-release[aria-pressed=true] .release-copy strong{color:var(--gallery-blue);}
.release-copy small,.batch-title p,.asset-title small{font-size:13px;line-height:1.4;color:var(--gallery-muted);font-weight:400;}
.release-copy small span,.batch-title p span{margin:0 2px;color:#929298;}
.library-explorer{padding-top:12px;border-top:1px solid var(--gallery-line);}
#view-fichiers #release-tools{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 14px;}
.library-search{display:flex;align-items:center;gap:8px;min-width:0;flex:0 1 380px;height:44px;padding:0 13px;background:var(--gallery-pearl);border:1px solid transparent;border-radius:12px;color:#6b6b72;cursor:text;}
.library-search:focus-within{border-color:var(--gallery-focus);}
.library-search input{width:100%;height:100%;min-width:0;border:0;color:var(--gallery-ink);background:transparent;font:400 15px/1.5 var(--gallery-font);padding:0;outline:none!important;box-shadow:none;}
.library-search input::placeholder{color:#696970;}
.library-type{position:relative;flex:none;}
.library-type select{height:44px;padding:0 33px 0 14px;cursor:pointer;color:var(--gallery-ink);background:var(--gallery-pearl);border:1px solid transparent;border-radius:12px;appearance:none;font-size:14px;}
.library-type:after{content:"";position:absolute;right:13px;top:17px;width:7px;height:7px;pointer-events:none;border:solid #67676c;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);}
#release-list{display:grid;gap:21px;}
.library-batch,.library-transfers,.library-empty,.library-alert{background:#fff;color:var(--gallery-ink);border:1px solid var(--gallery-line);border-radius:14px;overflow:hidden;}
.batch-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 19px;}
.library-batch h2{font-size:18px;overflow-wrap:anywhere;}
.batch-title p{margin:3px 0 0;font-variant-numeric:tabular-nums;}
.batch-zip{flex:none;padding:0 6px;}
.library-table{width:100%;border-collapse:collapse;table-layout:fixed;margin:0;text-align:left;border:0;}
.library-table tr>*{padding:6px 8px;vertical-align:middle;border:0;line-height:1.35;}
.library-table tr>*:first-child{padding-left:19px;}
.library-table tr>*:last-child{padding-right:12px;}
.library-table thead th{padding-top:8px;padding-bottom:8px;background:#fafafc;color:#68686e;border-top:1px solid #ededf0;border-bottom:1px solid #ededf0;font:500 12px/1.3 var(--gallery-font);}
.library-table tbody tr+tr{border-top:1px solid #ededf0;}
.library-table tbody tr:hover{background:#fafafc;}
.library-table tbody tr>*{color:var(--gallery-muted);font-size:13px;}
.asset-id{display:flex;align-items:center;gap:11px;min-width:0;}
.asset-icon{display:grid;place-items:center;flex:none;width:34px;height:36px;border-radius:8px;background:#edf3fb;color:#396a9d;}
.asset-document{background:#f0f0f3;color:#666674;}.asset-media{background:#f3eef8;color:#715b88;}
.asset-title{display:grid;gap:2px;min-width:0;text-align:left;}.asset-title strong{font-size:14px;letter-spacing:-.014em;}
.asset-title small{font-size:12px;overflow-wrap:anywhere;}
.asset-type{width:74px;}.asset-size{width:88px;}.asset-updated{width:132px;}.asset-download{width:60px;text-align:right;}
.library-table tbody :is(.asset-type,.asset-size,.asset-updated){font-size:12px;font-variant-numeric:tabular-nums;}
.library-table .asset-download a{width:44px;height:44px;display:inline-grid;place-items:center;color:var(--gallery-blue);border-radius:50%;}
.asset-download a:hover,.asset-download a:focus-visible{background:#edf4fc;}
.library-empty,.library-alert{font-size:14px;padding:16px;color:var(--gallery-muted);margin:0;}
.library-alert{border-color:#e2c1be;color:#913b33;}
.library-transfers{padding:15px 18px;margin:0 0 16px;}
.library-transfer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;margin-top:12px;color:var(--gallery-muted);font-size:13px;}
.library-transfer strong{color:var(--gallery-ink);overflow-wrap:anywhere;}
.library-transfer progress{accent-color:var(--gallery-blue);max-width:100%;width:100%;align-self:center;}
#view-bureau .monitor-window{
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:clamp(430px,calc(100dvh - 220px),1200px);
  min-width:0;background:#f5f5f7;border:1px solid #d5d5da;border-radius:15px;overflow:hidden;
}
.monitor-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 10px 6px 17px;border-bottom:1px solid var(--gallery-line);background:#fafafc;}
.monitor-toolbar strong{display:flex;align-items:center;gap:8px;color:var(--gallery-ink);font-size:14px;font-weight:600;}
.monitor-toolbar strong .ico{color:#686871;}
.monitor-actions{display:flex;align-items:center;gap:3px;}
#view-bureau .monitor-tool{background:transparent;gap:6px;min-width:44px;padding:0 10px;}
#view-bureau .monitor-tool:hover{background:#e9e9ee;color:#004e9d;}
#view-bureau #office-stage{display:block;position:relative;width:100%;height:100%;min-height:0;margin:0;overflow:hidden;border:0;border-radius:0;background:#f5f5f7;}
#view-bureau #office-stage:empty{background:#f5f5f7;}
#view-bureau #office-stage iframe{display:block;width:100%;height:100%;min-height:0;border:0;background:#fafafc;}
.monitor-status{display:flex;align-items:center;gap:8px;min-height:31px;padding:6px 13px;border-top:1px solid var(--gallery-line);background:#fafafc;}
.monitor-status #office-state{margin:0;padding:0;color:var(--gallery-muted);font-size:12px;}
.monitor-status:has(#office-state:empty){display:none;}
.monitor-dot{width:6px;height:6px;flex:none;border-radius:50%;background:var(--gallery-blue);}
.monitor-expand{position:relative;}
.monitor-expand input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer;}
.expand-glyph{display:inline-block;width:15px;height:15px;background:linear-gradient(currentColor,currentColor) left top/5px 1.5px,linear-gradient(currentColor,currentColor) left top/1.5px 5px,linear-gradient(currentColor,currentColor) right top/5px 1.5px,linear-gradient(currentColor,currentColor) right top/1.5px 5px,linear-gradient(currentColor,currentColor) left bottom/5px 1.5px,linear-gradient(currentColor,currentColor) left bottom/1.5px 5px,linear-gradient(currentColor,currentColor) right bottom/5px 1.5px,linear-gradient(currentColor,currentColor) right bottom/1.5px 5px;background-repeat:no-repeat;}
.monitor-expand .restore-label,.monitor-expand:has(input:checked) .expand-label{display:none;}
.monitor-expand:has(input:checked) .restore-label{display:inline;}
#view-bureau .monitor-window:has(#office-expand:checked){position:fixed;inset:0;z-index:60;height:100dvh;width:100%;border:0;border-radius:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);}
@media(min-width:1500px){#release-index{grid-auto-columns:minmax(220px,calc((100% - 72px)/4));gap:24px;}}
@media(max-width:1100px){.library-table .asset-updated{display:none;}#release-index{gap:12px;grid-auto-columns:max(155px,calc((100% - 36px)/4));}}
@media(max-width:760px){
  #content:has(#view-fichiers:not([hidden]),#view-bureau:not([hidden])){padding:20px 16px max(25px,env(safe-area-inset-bottom));}
  #release-index{grid-auto-columns:clamp(147px,39vw,210px);gap:12px;scroll-padding-inline:1px;}
  .release-cover{aspect-ratio:1.7;}
  .release-copy{padding:8px 0 3px;gap:2px;}
  .release-copy small{font-size:12px;}
  .library-index{margin-bottom:20px;}
  .library-index header{margin-bottom:5px;}
  .library-explorer{padding-top:13px;}
  .library-table .asset-type{display:none;}
  .batch-title{padding:11px 12px;}.batch-zip{padding:0 3px;font-size:13px;}
  .library-table tr>*{padding:5px;}
  .library-table tr>*:first-child{padding-left:11px;}.library-table tr>*:last-child{padding-right:4px;}
  .asset-size{width:58px;}.asset-download{width:48px;}.asset-id{gap:7px;}
  .asset-icon{width:27px;height:30px;}.asset-title strong{font-size:13px;}.library-table tbody .asset-size{font-size:11px;}
  .library-search{height:44px;padding:0 9px;gap:6px;}.library-search input{font-size:16px;}
  .library-type select{font-size:13px;padding-left:9px;}
  #view-bureau .monitor-window{height:calc(100dvh - 177px);min-height:340px;}
  .monitor-toolbar{gap:4px;padding:4px 5px 4px 9px;}
  .monitor-toolbar strong{font-size:13px;gap:5px;}
  #view-bureau .monitor-tool{font-size:13px;padding:0 6px;}
  #view-bureau .monitor-window:has(#office-expand:checked){height:100dvh;min-height:0;}
}
@media(max-width:430px){
  #view-fichiers #release-tools{gap:6px;}.asset-title strong{font-size:12px;}
  .monitor-expand .expand-label,.monitor-expand:has(input:checked) .restore-label{display:none;}
  .monitor-expand:has(input:checked){background:#e9eef8!important;}
}
