/* liste de publications HAL, mobile first */
.tdhal-wrap {
    --tdhal-accent: #1d5c96;
    --tdhal-muted: #595959;
    --tdhal-badge-bg: #5f5780;
    --tdhal-badge-text: #fff;
    --tdhal-line: #cfcfcf;
    font-size: 1rem;
    line-height: 1.55;
}

.tdhal-year {
    margin: 1.75em 0 0.6em;
    font-size: clamp(1.15rem, 4.5vw, 1.5rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.tdhal-year:first-child {
    margin-top: 0;
}

.tdhal-list {
    margin: 0 0 1em;
    padding: 0;
    list-style: none;
}

/* une ligne par publication : miniature à gauche, texte à droite */
.tdhal-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    margin: 0;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--tdhal-line);
    overflow-wrap: anywhere;
}

.tdhal-item:last-child {
    border-bottom: 0;
}

.tdhal-item--nothumb {
    grid-template-columns: minmax(0, 1fr);
}

.tdhal-thumb {
    display: block;
    aspect-ratio: 74 / 96;
    border: 1px solid var(--tdhal-line);
    background: #f3f3f3;
}

.tdhal-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tdhal-body p {
    margin: 0 0 0.35rem;
}

.tdhal-title {
    font-size: clamp(1.05rem, 4.4vw, 1.35rem);
    font-weight: 700;
    line-height: 1.3;
}

.tdhal-title a {
    color: inherit;
    text-decoration: none;
}

.tdhal-title a:hover,
.tdhal-title a:focus-visible {
    text-decoration: underline;
}

.tdhal-authors {
    color: var(--tdhal-accent);
    font-weight: 600;
}

.tdhal-meta {
    color: var(--tdhal-muted);
}

.tdhal-meta a {
    color: inherit;
}

.tdhal-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.6rem;
}

.tdhal-type {
    padding: 0.2em 0.6em;
    border-radius: 2px;
    background: var(--tdhal-badge-bg);
    color: var(--tdhal-badge-text);
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1.4;
}

.tdhal-halid {
    font-size: 0.9em;
    font-weight: 700;
}

.tdhal-wrap a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.tdhal-footer {
    font-size: 0.9em;
    opacity: 0.85;
}

.tdhal-notice,
.tdhal-empty {
    font-style: italic;
}

/* texte réservé aux lecteurs d'écran */
.tdhal-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 1000px) {
    .tdhal-wrap {
        font-size: 1.05rem;
    }

    .tdhal-item {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .tdhal-item--nothumb {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* filtres de la liste : la barre est affichée par le script */
.tdhal-wrap [hidden] {
    display: none;
}

.tdhal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 1rem;
    border: 1px solid var(--tdhal-line);
}

.tdhal-field {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.tdhal-field label {
    font-weight: 700;
}

.tdhal-field input,
.tdhal-field select {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid #757575;
    border-radius: 2px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.tdhal-reset {
    min-height: 2.75rem;
    padding: 0.4rem 1rem;
    border: 1px solid currentColor;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tdhal-reset:hover {
    background: rgba(0, 0, 0, 0.06);
}

.tdhal-filters :focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.tdhal-status {
    flex: 1 1 100%;
    margin: 0;
    color: var(--tdhal-muted);
    font-size: 0.9em;
}

.tdhal-status:empty {
    display: none;
}

@media (min-width: 1000px) {
    .tdhal-field {
        flex: 1 1 11rem;
    }

    .tdhal-field--search {
        flex-grow: 2;
    }

    .tdhal-reset {
        align-self: flex-end;
    }
}
