:root {
    --navy: #0c1b2a;
    --navy-2: #13293d;
    --blue: #1769aa;
    --blue-dark: #0f5389;
    --cyan: #3aa7d8;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --border: #dce4eb;
    --text: #1a2733;
    --muted: #667788;
    --soft: #edf3f7;
    --shadow: 0 12px 35px rgba(19, 41, 61, 0.09);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header { background: var(--navy); color: #fff; padding: 19px 0; }
.header-inner { display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
    width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 11px; background: linear-gradient(145deg, var(--cyan), var(--blue));
    font-weight: 900; letter-spacing: -.04em; color: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.brand-text { display: flex; align-items: baseline; font-size: 24px; letter-spacing: -.5px; }
.brand-text strong { font-weight: 800; }
.brand-text small { font-size: 17px; color: #8fcbe5; font-weight: 700; }
.header-search { flex: 1; max-width: 720px; margin-left: auto; }
.header-search form { display: flex; background: #fff; border-radius: 11px; padding: 4px; }
.header-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; padding: 13px 15px; font-size: 15px; border-radius: 9px;
}
.header-search button {
    border: 0; border-radius: 8px; padding: 0 20px; background: var(--blue); color: #fff;
    font-weight: 700; cursor: pointer;
}
.header-search button:hover { background: var(--blue-dark); }

.main-nav { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 2px 10px rgba(0,0,0,.025); }
.nav-inner { display: flex; gap: 4px; align-items: center; min-height: 55px; overflow-x: auto; }
.nav-inner a { white-space: nowrap; padding: 17px 15px 14px; font-size: 14px; font-weight: 700; color: #4b5b69; border-bottom: 3px solid transparent; }
.nav-inner a:hover, .nav-inner a.active { color: var(--blue); border-bottom-color: var(--blue); }
.nav-inner .nav-account { margin-left: auto; }

.hero { background: linear-gradient(135deg, #eef6fa 0%, #f8fafc 50%, #e8f1f6 100%); border-bottom: 1px solid var(--border); }
.hero-grid { min-height: 520px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 70px; align-items: center; padding-top: 70px; padding-bottom: 70px; }
.eyebrow { display: inline-block; color: var(--blue); font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 8px; }
h1, h2, h3 { margin-top: 0; line-height: 1.2; }
h1 { font-size: clamp(38px, 5vw, 62px); letter-spacing: -.045em; max-width: 820px; margin-bottom: 21px; color: #102536; }
.hero-text { color: var(--muted); font-size: 19px; max-width: 760px; margin-bottom: 29px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 21px; border-radius: 9px; font-weight: 800; transition: .2s ease; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(23,105,170,.19); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-secondary { background: #fff; border: 1px solid #cfdbe4; color: var(--navy-2); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; color: #526575; font-size: 13px; font-weight: 700; }
.hero-card { display: flex; justify-content: center; }
.paper-stack { width: 290px; height: 340px; position: relative; }
.paper { position: absolute; inset: 0; border-radius: 13px; box-shadow: var(--shadow); }
.paper-back { background: #bdd9e7; transform: rotate(6deg) translate(10px, 1px); }
.paper-front { background: #fff; border: 1px solid #d7e3ea; padding: 31px; display: flex; flex-direction: column; justify-content: flex-end; }
.pdf-badge { position: absolute; top: 30px; left: 30px; background: #d94747; color: #fff; font-size: 13px; font-weight: 900; padding: 6px 9px; border-radius: 5px; }
.paper-lines { position: absolute; top: 95px; left: 31px; right: 31px; }
.paper-lines span { display: block; height: 8px; background: #e5edf2; border-radius: 4px; margin-bottom: 14px; }
.paper-lines span:nth-child(2) { width: 78%; }
.paper-lines span:nth-child(3) { width: 92%; }
.paper-lines span:nth-child(4) { width: 65%; }
.paper-front strong { font-size: 22px; color: var(--navy-2); }
.paper-front small { color: var(--muted); margin-top: 5px; }

.stats-section { background: var(--navy); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid article { padding: 26px 30px; border-right: 1px solid rgba(255,255,255,.11); }
.stats-grid article:last-child { border-right: 0; }
.stats-grid strong { display: block; font-size: 28px; line-height: 1.1; }
.stats-grid span { display: block; color: #aebfcb; font-size: 13px; margin-top: 5px; }

.section { padding-top: 76px; padding-bottom: 76px; }
.section-soft { background: var(--soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 27px; }
.section-heading h2 { font-size: 32px; letter-spacing: -.025em; margin-bottom: 0; color: var(--navy-2); }
.section-heading > a { color: var(--blue); font-size: 14px; font-weight: 800; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.category-card { background: #fff; padding: 25px; border: 1px solid var(--border); border-radius: var(--radius); transition: .2s ease; }
.category-card:hover { transform: translateY(-3px); border-color: #b8cedc; box-shadow: var(--shadow); }
.category-icon { display: grid; width: 42px; height: 42px; place-items: center; background: #e9f3f8; border-radius: 9px; margin-bottom: 17px; font-size: 20px; }
.category-card strong { display: block; color: var(--navy-2); font-size: 18px; }
.category-card small { color: var(--muted); }

.documents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; }
.document-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 5px 18px rgba(19,41,61,.04); }
.doc-preview { height: 145px; display: grid; place-items: center; background: linear-gradient(145deg, #dcebf3, #eef5f8); color: #c84545; font-size: 28px; font-weight: 950; letter-spacing: .03em; }
.doc-body { padding: 22px; }
.doc-category { color: var(--blue); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 900; }
.doc-body h3 { margin: 7px 0 9px; font-size: 19px; color: var(--navy-2); }
.doc-body p { color: var(--muted); font-size: 14px; min-height: 43px; }
.doc-meta { display: flex; gap: 14px; color: #80909d; font-size: 12px; border-top: 1px solid #edf1f4; padding-top: 14px; margin-top: 15px; }
.doc-body a { display: inline-block; margin-top: 15px; color: var(--blue); font-size: 14px; font-weight: 850; }

.contribution { padding-top: 62px; padding-bottom: 62px; }
.contribution-card { background: linear-gradient(135deg, var(--navy-2), #0d3550); color: #fff; border-radius: 19px; padding: 40px 45px; display: flex; align-items: center; justify-content: space-between; gap: 35px; box-shadow: var(--shadow); }
.contribution-card h2 { font-size: 30px; margin-bottom: 10px; }
.contribution-card p { color: #b9cad5; max-width: 760px; margin-bottom: 0; }
.contribution-card .eyebrow { color: #73c7ec; }
.contribution-card .btn { flex: 0 0 auto; }

.site-footer { background: #091622; color: #a7b7c3; padding-top: 54px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 45px; padding-bottom: 42px; }
.brand-footer { color: #fff; margin-bottom: 16px; }
.footer-grid p { max-width: 420px; font-size: 14px; }
.footer-grid h3 { color: #fff; font-size: 14px; margin-bottom: 15px; }
.footer-grid > div:not(:first-child) a { display: block; font-size: 13px; margin: 9px 0; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0 24px; border-top: 1px solid rgba(255,255,255,.09); font-size: 12px; }

@media (max-width: 900px) {
    .header-inner { align-items: stretch; flex-direction: column; gap: 16px; }
    .header-search { max-width: none; width: 100%; }
    .nav-inner .nav-account { margin-left: 0; }
    .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 45px; }
    .hero-card { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid article:nth-child(2) { border-right: 0; }
    .category-grid, .documents-grid { grid-template-columns: repeat(2, 1fr); }
    .contribution-card { align-items: flex-start; flex-direction: column; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .container { width: min(100% - 26px, 1180px); }
    .site-header { padding: 15px 0; }
    .brand-text { font-size: 21px; }
    .header-search form { flex-direction: column; background: transparent; gap: 7px; padding: 0; }
    .header-search input, .header-search button { min-height: 45px; }
    .nav-inner { min-height: 50px; }
    .nav-inner a { padding: 14px 12px 11px; }
    .hero-grid { padding-top: 52px; padding-bottom: 52px; }
    h1 { font-size: 39px; }
    .hero-text { font-size: 17px; }
    .hero-actions .btn { width: 100%; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid article { padding: 22px 15px; }
    .stats-grid strong { font-size: 22px; }
    .section { padding-top: 54px; padding-bottom: 54px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .section-heading h2 { font-size: 28px; }
    .category-grid, .documents-grid, .footer-grid { grid-template-columns: 1fr; }
    .contribution-card { padding: 30px 24px; }
    .footer-bottom { flex-direction: column; }
}

/* Pages internes */
.page-main { min-height: 58vh; }
.page-banner {
    background: linear-gradient(135deg, #eef6fa 0%, #f8fafc 58%, #e8f1f6 100%);
    border-bottom: 1px solid var(--border);
    padding: 62px 0 55px;
}
.page-banner h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 12px; }
.page-banner p { color: var(--muted); font-size: 17px; max-width: 760px; margin: 0; }
.page-banner .btn { margin-top: 24px; }
.narrow-container { max-width: 900px; }

/* Dépôt de document */
.archive-form {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
}
.form-heading { margin-bottom: 27px; }
.form-heading h2 { margin-bottom: 7px; color: var(--navy-2); }
.form-heading p { margin: 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; }
.form-grid label > span { font-size: 13px; font-weight: 800; color: #455968; }
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    border: 1px solid #cad7e0;
    background: #fbfcfd;
    border-radius: 9px;
    padding: 12px 13px;
    font: inherit;
    color: var(--text);
    outline: none;
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,170,.09); }
.form-full { grid-column: 1 / -1; }
.upload-zone { background: var(--soft); border: 1px dashed #b5c9d6; border-radius: 11px; padding: 18px; }
.upload-zone small { color: var(--muted); }

/* Fiche document */
.document-detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.pdf-viewer-card,
.document-info-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.pdf-viewer-card { padding: 20px; }
.pdf-viewer-placeholder {
    min-height: 570px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #edf3f7, #f8fafc);
    border: 1px dashed #bdccd6;
    border-radius: 11px;
    color: var(--muted);
}
.pdf-large-badge { background: #cf4545; color: #fff; font-weight: 900; padding: 9px 12px; border-radius: 6px; margin-bottom: 16px; }
.pdf-viewer-placeholder strong { color: var(--navy-2); font-size: 20px; }
.document-info-card { padding: 31px; }
.document-info-card h2 { font-size: 28px; margin: 8px 0 13px; color: var(--navy-2); }
.document-info-card > p { color: var(--muted); }
.document-properties { margin: 27px 0; border-top: 1px solid var(--border); }
.document-properties div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.document-properties dt { color: var(--muted); }
.document-properties dd { margin: 0; font-weight: 800; text-align: right; color: var(--navy-2); }
.document-actions { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 900px) {
    .document-detail-grid { grid-template-columns: 1fr; }
    .pdf-viewer-placeholder { min-height: 400px; }
}

@media (max-width: 600px) {
    .archive-form { padding: 23px 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-full { grid-column: auto; }
    .document-info-card { padding: 24px 20px; }
}

/* Liste des documents MySQL */
.documents-search {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 30px;
}
.documents-search input[type="search"] {
    flex: 1;
    min-height: 48px;
    border: 1px solid #cad7e0;
    border-radius: 9px;
    padding: 0 15px;
    font: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
}
.documents-search input[type="search"]:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23,105,170,.09);
}
.doc-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.doc-card-topline .doc-category { margin-bottom: 0; }
.doc-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf2f5;
    color: #5e7180;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.doc-status-valide { background: #e7f6ed; color: #217343; }
.doc-status-refuse { background: #faeaea; color: #a33a3a; }
.doc-status-analyse { background: #fff4db; color: #8c6411; }
.doc-author {
    margin: -3px 0 9px !important;
    color: #476273 !important;
    font-size: 13px;
    font-weight: 700;
}
.doc-filename {
    margin: 12px 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.doc-preview {
    flex-direction: column;
    gap: 7px;
}
.doc-preview small {
    font-size: 11px;
    font-weight: 700;
    opacity: .78;
}
.documents-message {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.documents-message strong { color: var(--navy-2); font-size: 18px; }
.documents-message p { color: var(--muted); margin-bottom: 0; }
.documents-message-error { border-left: 4px solid #c44; }

@media (max-width: 600px) {
    .documents-search { align-items: stretch; flex-direction: column; }
    .documents-search .btn { width: 100%; text-align: center; }
}








/* =========================================================
   PAGE DOCUMENT + APERÇUS PDF
   ========================================================= */

.document-page {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 70px;
}

.document-back {
    margin-bottom: 18px;
}

.document-back a {
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
}

.document-back a:hover {
    color: #0f172a;
}

.document-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 64, 175, .94));
    border-radius: 22px;
    padding: 34px;
    color: #fff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .12);
}

.document-badge {
    display: inline-flex;
    padding: 6px 10px;
    margin-bottom: 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.document-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
}

.document-author {
    margin: 12px 0 0;
    font-weight: 700;
    color: #dbeafe;
}

.document-subject {
    max-width: 800px;
    margin: 14px 0 0;
    color: #e2e8f0;
    line-height: 1.65;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.document-meta span {
    padding: 8px 12px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 10px;
    font-size: .9rem;
}

.document-section {
    margin-top: 28px;
    padding: 28px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, .045);
}

.document-section h2 {
    margin: 0;
    color: #0f172a;
}

.document-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.document-keywords span {
    padding: 7px 11px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .85rem;
    font-weight: 700;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.section-heading p {
    margin: 7px 0 0;
    max-width: 730px;
    color: #64748b;
    line-height: 1.55;
}

.preview-count {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: .85rem;
    font-weight: 700;
}

.pdf-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.pdf-preview-card {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-align: left;
    cursor: zoom-in;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.pdf-preview-card:hover {
    transform: translateY(-4px);
    border-color: #bfdbfe;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
}

.pdf-preview-image {
    aspect-ratio: 0.72;
    padding: 9px;
    background: #f1f5f9;
    overflow: hidden;
}

.pdf-preview-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
}

.pdf-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    color: #334155;
    font-size: .87rem;
    font-weight: 700;
}

.preview-zoom-icon {
    color: #2563eb;
    font-size: 1.05rem;
}

.doc-message {
    padding: 18px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.doc-message-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}


/* =========================================================
   MODALE D'APERÇU
   ========================================================= */

.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.preview-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.preview-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, .88);
    backdrop-filter: blur(4px);
}

.preview-modal-window {
    position: relative;
    z-index: 1;
    width: min(1000px, 96vw);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #111827;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .45);
}

.preview-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #fff;
    background: #0f172a;
}

.preview-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.preview-modal-close:hover {
    background: rgba(255, 255, 255, .18);
}

.preview-modal-content {
    overflow: auto;
    padding: 20px;
    text-align: center;
}

.preview-modal-content img {
    max-width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .28);
}

.preview-modal-open {
    overflow: hidden;
}


@media (max-width: 700px) {
    .document-page {
        width: min(100% - 20px, 1180px);
        margin-top: 20px;
    }

    .document-hero,
    .document-section {
        padding: 20px;
        border-radius: 16px;
    }

    .section-heading {
        flex-direction: column;
    }

    .pdf-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .preview-modal.is-open {
        padding: 8px;
    }
}





















/* =========================================================
   LISTE DES DOCUMENTS AVEC PREMIERE PAGE EN APERCU
   ========================================================= */

.documents-page {
    width: min(1180px, calc(100% - 32px));
    margin: 38px auto 70px;
}

.documents-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.documents-header h1 {
    margin: 4px 0 8px;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3rem);
}

.documents-header p {
    max-width: 720px;
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.documents-search {
    display: flex;
    gap: 8px;
    min-width: min(100%, 420px);
}

.documents-search input {
    min-width: 0;
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    font: inherit;
}

.documents-search button {
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: #1d4ed8;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.documents-result-info {
    margin-bottom: 16px;
    color: #64748b;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.document-list-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.document-list-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .09);
}

.document-list-cover {
    position: relative;
    display: block;
    min-height: 250px;
    padding: 12px;
    overflow: hidden;
    background: #e2e8f0;
    text-decoration: none;
}

.document-list-cover img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 226px;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .15);
}

.document-list-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 226px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-size: .8rem;
}

.document-list-pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 70px;
    border-radius: 8px;
    background: #dc2626;
    color: #fff;
    font-weight: 900;
    letter-spacing: .03em;
}

.document-list-cover-page {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .85);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}

.document-list-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 20px;
}

.document-list-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.document-list-id {
    color: #94a3b8;
    font-size: .78rem;
    font-weight: 800;
}

.document-list-status {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .72rem;
    font-weight: 800;
    text-transform: capitalize;
}

.document-list-card h2 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.3;
}

.document-list-card h2 a {
    color: #0f172a;
    text-decoration: none;
}

.document-list-card h2 a:hover {
    color: #1d4ed8;
}

.document-list-author {
    margin: 7px 0 0;
    color: #475569;
    font-weight: 700;
    font-size: .9rem;
}

.document-list-description {
    display: -webkit-box;
    margin: 12px 0 0;
    overflow: hidden;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.document-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.document-list-meta span {
    padding: 6px 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
}

.document-list-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
}

.document-list-filename {
    min-width: 0;
    overflow: hidden;
    color: #94a3b8;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-list-button {
    flex: 0 0 auto;
    color: #1d4ed8;
    font-size: .85rem;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 1000px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .documents-page {
        width: min(100% - 20px, 1180px);
        margin-top: 22px;
    }

    .documents-header {
        align-items: stretch;
        flex-direction: column;
    }

    .documents-search {
        min-width: 0;
        width: 100%;
    }

    .document-list-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .document-list-cover {
        min-height: 200px;
        padding: 8px;
    }

    .document-list-cover img,
    .document-list-placeholder {
        min-height: 184px;
    }

    .document-list-content {
        padding: 15px;
    }

    .document-list-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .document-list-card {
        grid-template-columns: 1fr;
    }

    .document-list-cover {
        min-height: 300px;
    }

    .document-list-cover img,
    .document-list-placeholder {
        min-height: 276px;
    }
}

