/* ==========================================================
   B612 — PAGES AUTEUR / ÉDITEUR
   templates/authority.php
   Desktop d'abord, puis tablette (≤ 1100px) et mobile (≤ 700px)
========================================================== */

.b612-authority {

    --b612-authority-ink: var(--b612-next-color-text, #25283a);
    --b612-authority-muted: var(--b612-next-color-text-muted, #626577);
    --b612-authority-primary: var(--b612-next-color-primary, #28367f);
    --b612-authority-line: #e6e0d6;
    --b612-authority-paper: #f7f3ea;

    max-width: 1280px;

    margin: 0 auto;

    padding: 80px 40px 110px;

    box-sizing: border-box;

    color: var(--b612-authority-ink);

    font-family: var(--b612-next-font-body, "Filson Pro", sans-serif);
}


/* ==========================================================
   EN-TÊTE
========================================================== */

.b612-authority__header {

    margin-bottom: 40px;
}

.b612-authority__eyebrow {

    display: block;

    margin-bottom: 14px;

    color: #726b68;

    font-size: 13px;

    font-weight: 600;

    letter-spacing: .18em;

    text-transform: uppercase;
}

.b612-authority__title {

    margin: 0;

    max-width: 900px;

    color: #1a1a1a;

    font-family: var(--b612-next-font-heading, "Formiga", sans-serif);

    font-size: clamp(2.4rem, 5vw, 4rem);

    font-weight: 900;

    line-height: .98;

    letter-spacing: -.02em;
}

.b612-authority__meta {

    display: flex;

    flex-wrap: wrap;

    gap: 6px 18px;

    margin: 18px 0 0;

    color: var(--b612-authority-muted);

    font-size: 15px;
}

.b612-authority__meta span + span::before {

    content: "·";

    margin-right: 18px;

    color: #c4bdb3;
}


/* ----------------------------------------------------------
   Fonctions (page personne) et famille (page éditeur)
---------------------------------------------------------- */

.b612-authority__roles,
.b612-authority__family ul {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin: 22px 0 0;

    padding: 0;

    list-style: none;
}

.b612-authority__roles li {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 6px 12px;

    border-radius: 999px;

    background: var(--b612-next-color-primary-soft, rgb(40 54 127 / 8%));

    color: var(--b612-authority-primary);

    font-size: 13px;

    font-weight: 600;
}

.b612-authority__roles li span,
.b612-authority__family a span,
.b612-authority__filters a span {

    font-weight: 400;

    opacity: .65;
}

.b612-authority__family {

    margin-top: 26px;
}

.b612-authority__family-label {

    display: block;

    color: #726b68;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: .16em;

    text-transform: uppercase;
}

.b612-authority__family ul {

    margin-top: 10px;
}

.b612-authority__family a {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 8px 14px;

    border: 1px solid var(--b612-authority-line);

    border-radius: 999px;

    background: #fff;

    color: var(--b612-authority-ink);

    font-size: 14px;

    font-weight: 600;

    text-decoration: none;

    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.b612-authority__family a.is-parent::before {

    content: "↑";

    font-weight: 400;
}

.b612-authority__family a:hover {

    border-color: var(--b612-authority-primary);

    color: var(--b612-authority-primary);
}


/* ==========================================================
   FILTRES PAR SUPPORT
========================================================== */

.b612-authority__filters {

    position: sticky;

    top: 0;

    z-index: 5;

    margin: 0 -40px 30px;

    padding: 14px 40px;

    border-top: 1px solid var(--b612-authority-line);

    border-bottom: 1px solid var(--b612-authority-line);

    background: rgb(252 248 227 / 92%);

    backdrop-filter: blur(6px);
}

.b612-authority__filters ul {

    display: flex;

    gap: 8px;

    margin: 0;

    padding: 0;

    list-style: none;

    overflow-x: auto;

    scrollbar-width: none;
}

.b612-authority__filters ul::-webkit-scrollbar {

    display: none;
}

.b612-authority__filters a {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 9px 16px;

    border: 1px solid var(--b612-authority-line);

    border-radius: 999px;

    background: #fff;

    color: var(--b612-authority-ink);

    font-size: 14px;

    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;

    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.b612-authority__filters a:hover {

    border-color: var(--b612-authority-primary);
}

.b612-authority__filters a.is-active {

    border-color: var(--b612-authority-primary);

    background: var(--b612-authority-primary);

    color: #fff;
}


/* ==========================================================
   LISTE
========================================================== */

.b612-authority__results {

    scroll-margin-top: 90px;
}

.b612-authority__count {

    margin: 0 0 18px;

    color: var(--b612-authority-muted);

    font-size: 14px;
}

.b612-authority__empty {

    padding: 40px;

    border: 1px dashed var(--b612-authority-line);

    border-radius: 16px;

    text-align: center;

    color: var(--b612-authority-muted);
}

.b612-authority__list {

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;
}


/* ----------------------------------------------------------
   Carte d'un document
---------------------------------------------------------- */

.b612-work {

    display: grid;

    grid-template-columns: 96px minmax(0, 1fr);

    gap: 22px;

    padding: 20px;

    border: 1px solid #ece8e3;

    border-radius: 16px;

    background-color: var(--b612-authority-paper);

    background-image:
        repeating-linear-gradient(
            90deg,
            rgba(120, 105, 85, .045) 0px,
            rgba(120, 105, 85, .045) 1px,
            transparent 1px,
            transparent 4px
        );

    transition: transform .25s ease, box-shadow .25s ease;
}

.b612-work:hover {

    transform: translateY(-3px);

    box-shadow: 0 14px 35px rgba(0, 0, 0, .08);
}

.b612-work__cover {

    display: block;

    align-self: start;
}

.b612-work__cover img {

    display: block;

    width: 96px;

    aspect-ratio: 2 / 3;

    object-fit: cover;

    border-radius: 8px;

    background: #e9e3d8;

    box-shadow: 0 6px 14px rgba(0, 0, 0, .10);
}

.b612-work--no-items .b612-work__cover img {

    filter: grayscale(.6);

    opacity: .75;
}

.b612-work__body {

    display: flex;

    flex-direction: column;

    min-width: 0;
}


/* Étiquettes */

.b612-work__tags {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 10px;
}

.b612-work__support,
.b612-work__role,
.b612-work__no-items {

    display: inline-flex;

    align-items: center;

    padding: 3px 9px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: .04em;

    line-height: 1.4;
}

.b612-work__support {

    background: #fff;

    color: var(--b612-authority-muted);

    border: 1px solid var(--b612-authority-line);
}

.b612-work__support--musique,
.b612-work__support--audio {
    color: #964c7f;
}

.b612-work__support--films {
    color: #b42318;
}

.b612-work__support--numerique,
.b612-work__support--multimedia {
    color: #267a45;
}

.b612-work__role {

    background: var(--b612-next-color-secondary-soft, rgb(54 178 194 / 14%));

    color: #1d6f7a;
}

.b612-work__no-items {

    background: #fff4d6;

    color: var(--b612-next-color-warning, #8a5100);
}


/* Textes */

.b612-work__title {

    margin: 0;

    font-family: var(--b612-next-font-heading, "Formiga", sans-serif);

    font-size: 21px;

    font-weight: 900;

    line-height: 1.15;
}

.b612-work__title a {

    color: #1a1a1a;

    text-decoration: none;
}

.b612-work__title a:hover {

    color: var(--b612-authority-primary);
}

.b612-work__subtitle {

    margin: 4px 0 0;

    color: var(--b612-authority-muted);

    font-size: 14px;
}

.b612-work__people {

    margin: 10px 0 0;

    color: var(--b612-authority-muted);

    font-size: 14px;

    line-height: 1.5;
}

.b612-work__people a,
.b612-work__meta a {

    color: var(--b612-authority-ink);

    text-decoration: underline;

    text-decoration-color: rgb(40 54 127 / 25%);

    text-underline-offset: 3px;

    transition: color .2s ease, text-decoration-color .2s ease;
}

.b612-work__people a:hover,
.b612-work__meta a:hover {

    color: var(--b612-authority-primary);

    text-decoration-color: currentColor;
}

.b612-work__people strong {

    color: var(--b612-authority-ink);

    font-weight: 600;
}

.b612-work__sep {

    margin: 0 6px;

    color: #c4bdb3;
}

.b612-work__function {

    margin-left: 3px;

    font-size: 13px;
}

.b612-work__meta {

    display: flex;

    flex-wrap: wrap;

    gap: 4px 14px;

    margin: 6px 0 0;

    color: var(--b612-authority-muted);

    font-size: 13px;
}

.b612-work__button {

    align-self: flex-start;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-top: auto;

    padding: 8px 16px;

    border: 1px solid #ddd7d2;

    border-radius: 999px;

    background: #fff;

    color: #1a1a1a;

    font-size: 12px;

    font-weight: 600;

    text-decoration: none;

    transition: background .2s ease, color .2s ease;
}

.b612-work__tags + .b612-work__title ~ .b612-work__button,
.b612-work__meta + .b612-work__button {

    margin-top: 16px;
}

.b612-work:hover .b612-work__button,
.b612-work__button:focus-visible {

    background: #1a1a1a;

    color: #fff;
}


/* Pagination : voir pagination.css (feuille commune) */

.b612-authority__filters a:focus-visible,
.b612-authority__family a:focus-visible,
.b612-work a:focus-visible {

    outline: 2px solid var(--b612-next-color-focus, #28367f);

    outline-offset: 3px;
}


/* ==========================================================
   TABLETTE
========================================================== */

@media (max-width: 1100px) {

    .b612-authority {

        padding: 60px 30px 90px;
    }

    .b612-authority__filters {

        margin: 0 -30px 26px;

        padding: 12px 30px;
    }

    .b612-authority__list {

        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 700px) {

    .b612-authority {

        padding: 40px 16px 70px;
    }

    .b612-authority__filters {

        margin: 0 -16px 22px;

        padding: 10px 16px;
    }

    .b612-work {

        grid-template-columns: 72px minmax(0, 1fr);

        gap: 14px;

        padding: 14px;
    }

    .b612-work__cover img {

        width: 72px;
    }

    .b612-work__title {

        font-size: 18px;
    }

    .b612-work__button {

        display: none;
    }
}
