:root { --ink:#1e2b32; --navy:#18344a; --deep:#102737; --cream:#fbf8f1; --gold:#b58a49; --wine:#743f3d; --line:#ddd3c0; }
* { box-sizing:border-box; }
html { background:var(--cream); }
body { margin:0; color:var(--ink); background:radial-gradient(circle at 10% 0%,rgba(181,138,73,.08),transparent 28rem),var(--cream); font-family:Arial,Helvetica,sans-serif; }
body.viewer-open { overflow:hidden; }
button,input,select { font:inherit; }
button { cursor:pointer; }
.masthead { color:#fff; background:linear-gradient(90deg,rgba(16,39,55,.97),rgba(24,52,74,.93)),repeating-linear-gradient(90deg,transparent 0 28px,rgba(255,255,255,.04) 29px 30px); border-bottom:5px solid var(--gold); }
.masthead-inner { max-width:1180px; margin:auto; padding:54px 28px 48px; }
.eyebrow,.section-kicker { margin:0 0 10px; color:#d9bd87; font-size:.75rem; font-weight:800; letter-spacing:.18em; text-transform:uppercase; }
h1 { margin:0; font-family:Georgia,"Times New Roman",serif; font-size:clamp(2.2rem,6vw,4.8rem); font-weight:500; letter-spacing:.015em; }
.subtitle { margin:12px 0 0; color:#e9e1d4; font-family:Georgia,"Times New Roman",serif; font-size:1.2rem; font-style:italic; }
.method-note { max-width:1124px; margin:34px auto 0; padding:20px 24px; display:grid; grid-template-columns:180px 1fr; gap:22px; background:#fffdf8; border:1px solid var(--line); border-left:5px solid var(--wine); box-shadow:0 12px 28px rgba(37,31,22,.05); }
.method-note strong { color:var(--wine); font-family:Georgia,"Times New Roman",serif; font-size:1.1rem; }
.method-note p { margin:0; line-height:1.65; }
.catalogue { max-width:1180px; margin:auto; padding:54px 28px 74px; }
.catalogue-heading { display:flex; justify-content:space-between; align-items:end; gap:28px; }
h2 { margin:0; color:var(--navy); font-family:Georgia,"Times New Roman",serif; font-size:clamp(1.8rem,4vw,2.8rem); font-weight:500; }
.section-kicker { color:var(--wine); }
.filters { display:flex; gap:12px; align-items:end; }
.filters label { min-width:150px; display:grid; gap:7px; color:#536069; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.filters label:first-child { min-width:min(320px,100%); }
.filters input,.filters select { width:100%; min-height:45px; padding:10px 13px; color:var(--ink); background:#fff; border:1px solid #cfc5b4; border-radius:3px; outline:none; }
.filters input:focus,.filters select:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(181,138,73,.17); }
.status-row { margin:24px 0 18px; display:flex; align-items:center; justify-content:space-between; gap:18px; }
.status-row p { margin:0; color:#6d6b66; font-size:.9rem; }
.status-row button { padding:8px 12px; color:var(--navy); background:#fff; border:1px solid #cfc5b4; border-radius:3px; }
.status-row button:hover { border-color:var(--gold); }
.status-row button:disabled { opacity:.5; cursor:wait; }
.message { margin:0 0 24px; padding:18px 20px; line-height:1.55; background:#fffdf8; border:1px solid var(--line); border-left:4px solid var(--gold); }
.message.error { border-left-color:var(--wine); }
.document-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:24px; }
.document-card { padding:0; overflow:hidden; text-align:left; color:inherit; background:#fff; border:1px solid var(--line); border-radius:4px; box-shadow:0 8px 20px rgba(44,38,29,.06); transition:transform .2s,box-shadow .2s,border-color .2s; }
.document-card:hover,.document-card:focus-visible { transform:translateY(-4px); border-color:var(--gold); box-shadow:0 16px 30px rgba(44,38,29,.12); outline:none; }
.thumbnail-wrap { position:relative; min-height:270px; height:270px; padding:14px; display:grid; place-items:center; overflow:hidden; background:linear-gradient(135deg,#e9e1d2,#d8cdbb); border-bottom:1px solid var(--line); }
.thumbnail-wrap img { max-width:100%; max-height:100%; object-fit:contain; box-shadow:0 5px 14px rgba(39,31,20,.22); }
.video-placeholder { width:84px; height:84px; padding-left:6px; display:grid; place-items:center; color:#fff; background:rgba(16,39,55,.9); border:3px solid rgba(255,255,255,.75); border-radius:50%; box-shadow:0 8px 22px rgba(16,39,55,.28); font-size:2.3rem; }
.video-badge { position:absolute; right:12px; bottom:12px; padding:5px 9px; color:#fff; background:var(--wine); border-radius:3px; font-size:.72rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.document-meta { min-height:126px; padding:17px; display:flex; flex-direction:column; gap:7px; }
.document-meta .cote { color:var(--wine); font-size:.72rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.document-meta strong { font-family:Georgia,"Times New Roman",serif; font-size:1rem; font-weight:600; line-height:1.35; }
.document-meta span:last-child { margin-top:auto; color:#6d6b66; font-size:.8rem; }
.pagination { margin-top:34px; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:6px; }
.pagination button { min-width:38px; min-height:38px; padding:7px 11px; color:var(--navy); background:#fff; border:1px solid #cfc5b4; border-radius:3px; }
.pagination button[aria-current="page"] { color:#fff; background:var(--navy); border-color:var(--navy); }
.pagination button:disabled { opacity:.42; cursor:not-allowed; }
.pagination span { padding:0 3px; color:#78736a; }
footer { padding:24px; color:#d8dde0; background:var(--deep); text-align:center; font-size:.78rem; letter-spacing:.06em; }
[hidden] { display:none !important; }
.viewer { position:fixed; z-index:50; inset:0; display:grid; grid-template-rows:auto 1fr; color:#fff; background:rgba(8,18,25,.97); }
.viewer-bar { padding:11px 16px; display:flex; align-items:center; justify-content:space-between; gap:18px; background:var(--deep); border-bottom:1px solid #385064; }
.viewer-title { min-width:0; display:grid; gap:3px; }
.viewer-title strong,.viewer-title span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.viewer-title span { color:#b9c5cb; font-size:.75rem; }
.viewer-actions { display:flex; align-items:center; gap:6px; }
.viewer-actions button { min-width:40px; min-height:38px; color:#fff; background:#29465a; border:1px solid #496378; border-radius:3px; }
.viewer-actions button:hover { background:#3d5e74; }
.viewer-actions button:disabled { opacity:.38; cursor:not-allowed; }
.viewer-actions output { min-width:58px; text-align:center; font-variant-numeric:tabular-nums; }
.viewer-actions .close { padding:0 14px; background:var(--wine); border-color:#a46b67; }
.viewer-stage { min-height:0; overflow:auto; padding:28px; text-align:center; }
.viewer-stage img { display:block; margin:0 auto; max-width:none; height:auto; background:#f5f0e5; box-shadow:0 18px 60px #000; }
.viewer-stage img.natural { width:auto; max-width:100%; }
.video-wrap { position:relative; display:inline-grid; max-width:min(100%,1200px); background:#000; box-shadow:0 18px 60px #000; }
.video-wrap video { display:block; width:auto; max-width:100%; max-height:calc(100vh - 130px); background:#000; }
.video-watermark { position:absolute; z-index:2; left:50%; top:50%; width:max-content; max-width:90%; transform:translate(-50%,-50%) rotate(-24deg); color:rgba(255,255,255,.28); font-size:clamp(.75rem,2vw,1.6rem); font-weight:700; letter-spacing:.04em; pointer-events:none; user-select:none; text-shadow:0 1px 2px rgba(0,0,0,.35); }
@media(max-width:820px){.method-note{margin-inline:18px;grid-template-columns:1fr;gap:8px}.catalogue-heading{align-items:stretch;flex-direction:column}.filters{align-items:stretch;flex-direction:column}.viewer-bar{align-items:stretch;flex-direction:column}.viewer-actions{overflow-x:auto}.viewer-stage{padding:15px 6px}.thumbnail-wrap{height:235px;min-height:235px}}
