.rs-doc-card {
    height: 100%;
    overflow: hidden;
}

.rs-doc-card__thumb {
    aspect-ratio: 4 / 3;
    background-color: #f2f2f2;
    overflow: hidden;
    position: relative;
}

.rs-doc-card__thumb-link {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    height: 100%;
    justify-content: center;
    padding: 8px;
    position: relative;
    width: 100%;
}

.rs-doc-card__paper {
    align-items: center;
    background-color: #fff;
    box-sizing: border-box;
    display: flex;
    height: 100%;
    justify-content: center;
    max-height: 100%;
    max-width: 100%;
    padding: 6px;
}

/* Feuille A4 portrait pour les icônes Office / ZIP / etc. — même emprise visuelle que les PDF */
.rs-doc-card__paper--type-icon {
    aspect-ratio: 210 / 297;
    flex-shrink: 0;
    height: 100%;
    max-width: 100%;
    padding: 0;
    width: auto;
}

.rs-doc-card__img {
    display: block;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.rs-doc-card__paper--type-icon .rs-doc-card__img--icon {
    height: auto;
    max-height: 62%;
    max-width: 62%;
    object-fit: contain;
    width: 62%;
}

.rs-doc-card__placeholder {
    color: #999;
}

.rs-doc-card__ext {
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
}

.rs-doc-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: 1.2rem;
    line-height: 1.35;
    font-weight: 600;
    min-height: calc(2 * 1.35 * 1em);
}

.rs-doc-card__title-link {
    color: inherit;
    text-decoration: none;
}

.rs-doc-card__title-link:hover {
    color: inherit;
    text-decoration: none;
    opacity: 0.85;
}

.rs-doc-card__taxonomy {
    line-height: 1.35;
}

.rs-doc-card__date {
    color: #1a1a1a;
    margin-top: 0.2rem;
    text-transform: lowercase;
}

.rs-doc-card .uk-card-body {
    background: #fff;
    transition: background 0.25s ease;
}

.rs-doc-card:hover .uk-card-body {
    background: #f2f2f2;
}

.rs-doc-card .uk-button-group {
    display: flex;
    gap: 9px;
}

.rs-doc-card .uk-button-group > .uk-button {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

.rs-doc-card .uk-button-secondary {
    background-color: #ff8dae;
    border: 1px solid #ff8dae;
    color: #fff;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.rs-doc-card .uk-button-secondary:hover,
.rs-doc-card .uk-button-secondary:focus {
    background-color: transparent;
    border: 1px solid #ff8dae;
    color: #ff8dae;
}

.rs-filters .uk-form-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.rs-filters .uk-select,
.rs-filters .uk-input {
    margin-top: 0.25rem;
}

#rs-results-count {
    font-size: 0.95rem;
}

#rs-pagination .uk-disabled > span {
    opacity: 0.5;
}

#rs-cards-grid {
    margin-left: -25px;
}

#rs-cards-grid > * {
    padding-left: 25px;
}

#rs-cards-grid > .uk-grid-margin {
    margin-top: 25px;
}

.rs-results {
    position: relative;
}

.rs-search-loader {
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 2rem;
    transform: translateX(-50%);
    z-index: 2;
}

.rs-results--searching #rs-cards-grid,
.rs-results--searching #rs-pagination,
.rs-results--searching #rs-empty {
    opacity: 0.45;
    pointer-events: none;
}
