/* ==========================================================
   B612 HOME SEARCH — composant autonome
   Regroupe les styles desktop, tablette et smartphone
   Source : anciens fichiers b612-results.*.css
========================================================== */

/* ==========================================================
   B612 RESULTS — DESKTOP
   Zone droite — résultats de recherche
   ========================================================== */


/* ==========================================================
   CONTENEUR PRINCIPAL
========================================================== */

.b612-search-advanced-results {

    position: absolute;

    top: 70px;

    right: 4vw;


    width:
        min(1050px, 72vw);

    height:
        min(720px, 78vh);

    box-sizing: border-box;

    padding:
        34px 42px 26px 48px;

    overflow-y: auto;

    overflow-x: hidden;

    z-index: 30;

    background:
        linear-gradient(
            135deg,
            rgba(31, 28, 43, 0.32),
            rgba(8, 20, 42, 0.40)
        );

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    border: none;

    border-radius: 28px;

    box-shadow:
        0 30px 80px rgba(0,0,0,0.38),
        inset 0 1px 0 rgba(255,255,255,0.08);

    color: #ffffff;

    scrollbar-width: thin;

    scrollbar-color:
        rgba(255,255,255,0.35)
        transparent;
}


/* ==========================================================
   HALO GÉNÉRAL
========================================================== */

.b612-search-advanced-results::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at 18% 35%,
            rgba(255, 165, 65, 0.28) 0%,
            rgba(255, 135, 40, 0.14) 22%,
            transparent 50%
        ),
        radial-gradient(
            circle at 88% 65%,
            rgba(255, 150, 50, 0.20) 0%,
            rgba(255, 120, 35, 0.08) 25%,
            transparent 48%
        );

    pointer-events: none;

    z-index: 1;
}


/* ==========================================================
   RÉSULTAT INDIVIDUEL
========================================================== */

.b612-search-advanced-result {

    position: relative;

    display: grid;

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

    column-gap: 42px;

    min-height: 150px;

    padding:
        0 0 24px;

    margin:
        0 0 24px;

    box-sizing: border-box;
}


/* ==========================================================
   COUVERTURE
========================================================== */

.b612-search-advanced-result__cover {

    position: relative;

    width: 120px;

    height: 120px;

    flex-shrink: 0;

    border-radius: 50%;

    overflow: hidden;

    background:
        rgba(255,255,255,0.06);

    border:
        1px solid
        rgba(255,255,255,0.22);

    box-shadow:

        0 0 0 1px
        rgba(255,255,255,0.05),

        0 12px 35px
        rgba(0,0,0,0.38),

        0 0 30px
        rgba(255,153,55,0.12);

    z-index: 2;
}


.b612-search-advanced-result__cover::before {

    content: "";

    position: absolute;

    inset: -28px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255,164,65,0.28) 0%,
            rgba(255,133,38,0.14) 34%,
            rgba(255,100,30,0.05) 55%,
            transparent 72%
        );

    filter: blur(18px);

    z-index: -1;

    pointer-events: none;
}


/* ==========================================================
   IMAGE
========================================================== */

.b612-search-advanced-result__cover img {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    border-radius: 50%;
}


/* ==========================================================
   PAS DE COUVERTURE
========================================================== */

.b612-search-advanced-result__cover-empty {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 100%;

    height: 100%;

    padding: 30px;

    box-sizing: border-box;

    border-radius: 50%;

    background:
        rgba(255,255,255,0.07);

    color:
        rgba(255,255,255,0.62);

    text-align: center;

    font-family:
        'Filson Pro',
        sans-serif;

    font-size: 13px;

    line-height: 1.35;
}


/* ==========================================================
   CONTENU
========================================================== */

.b612-search-advanced-result__content {

    position: relative;

    min-width: 0;

    padding-top: 4px;

    padding-right: 54px;

    z-index: 3;
}


/* ==========================================================
   EN-TÊTE DU RÉSULTAT
========================================================== */

.b612-search-advanced-result__header {

    position: relative;

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;
}


/* ==========================================================
   TITRE
========================================================== */

.b612-search-advanced-result__title {

    margin:
        0 0 8px;

    font-family: 'Formiga', sans-serif;
    font-weight: 700;
    font-size: 28px;

    line-height: 1.05;

    color: #ffffff;
}


/* ==========================================================
   AUTEUR
========================================================== */

.b612-search-advanced-result__author {

    margin:
        0 0 3px;

    font-family: 'Filson Pro', sans-serif;
    font-weight: 300;

    font-size: 1.05rem;
    line-height: 1.45;

    color:
        rgba(255,255,255,0.96);
}


/* ==========================================================
   ÉDITEUR
========================================================== */

.b612-search-advanced-result__publisher {

    margin:
        0 0 18px;

    font-family:
        'Filson Pro',
        sans-serif;

    font-size: 12px;

    line-height: 1.35;

    color:
        rgba(255,255,255,0.58);
}


/* ==========================================================
   RÉSUMÉ
========================================================== */

.b612-search-advanced-result__summary {

    max-width: 100%;

    margin:
        0 0 17px;

    font-family: 'Filson Pro', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;

    line-height: 1.55;

    color:
        rgba(255,255,255,0.82);

    display:
        -webkit-box;

    -webkit-line-clamp: 3;

    -webkit-box-orient:
        vertical;

    overflow: hidden;
}


/* ==========================================================
   MÉTADONNÉES
========================================================== */

.b612-search-advanced-result__meta {

    display: flex;

    flex-wrap: wrap;

    align-items: center;

    gap:
        8px 18px;

    margin:
        0 0 16px;

    font-family:
        'Filson Pro',
        sans-serif;

    font-size: 11px;

    line-height: 1.4;

    color:
        rgba(255,255,255,0.62);
}


.b612-search-advanced-result__meta span {

    white-space: nowrap;
}


.b612-search-advanced-result__meta strong {

    color:
        rgba(255,255,255,0.92);

    font-weight: 600;
}


/* ==========================================================
   ACTIONS
========================================================== */

.b612-search-advanced-result__actions {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;

    flex-shrink: 0;
}


.b612-search-advanced-result__action {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 32px;

    height: 32px;

    padding: 0;

    border:
        1px solid
        rgba(255,255,255,0.18);

    border-radius: 50%;

    background:
        rgba(255,255,255,0.035);

    color:
        rgba(255,255,255,0.72);

    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.b612-search-advanced-result__action:hover {

    background:
        rgba(255,255,255,0.12);

    border-color:
        rgba(255,255,255,0.38);

    color: #ffffff;

    transform:
        translateY(-1px);
}


/* ==========================================================
   LIEN
========================================================== */

.b612-search-advanced-result__link {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    min-height: 38px;

    padding:
        0 17px;

    border:
        1px solid
        rgba(255,255,255,0.35);

    border-radius: 20px;

    background:
        rgba(255,255,255,0.08);

    color: #ffffff;

    font-family:
        'Filson Pro',
        sans-serif;

    font-size: 1.05rem;

    font-weight: 500;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.b612-search-advanced-result__link:hover {

    background:
        rgba(255,255,255,0.18);

    border-color:
        rgba(255,255,255,0.65);

    color: #ffffff;

    transform:
        translateY(-1px);
}


.b612-search-advanced-result__link span {

    font-size: 14px;

    line-height: 1;

    transition:
        transform 0.2s ease;
}


.b612-search-advanced-result__link:hover span {

    transform:
        translateX(3px);
}


/* ==========================================================
   FOOTER DU RÉSULTAT
========================================================== */

.b612-search-advanced-result__footer {

    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 18px;

    width: 100%;

    margin-top: 18px;

    color:
        rgba(255,255,255,0.55);

    font-family:
        'Filson Pro',
        sans-serif;

    font-size: 10px;

    line-height: 1.2;
}


.b612-search-advanced-result__isbn,
.b612-search-advanced-result__publisher-footer {

    display: inline-flex;

    align-items: center;

    font-family:
        'Filson Pro',
        sans-serif;

    font-size: 0.75rem;

    line-height: 1;

    white-space: nowrap;
}


.b612-search-advanced-result__isbn {

    color:
        rgba(255,255,255,0.55);
}


.b612-search-advanced-result__isbn strong {

    margin-right: 5px;

    color:
        rgba(255,255,255,0.38);

    font-weight: 500;
}


.b612-search-advanced-result__publisher-footer {

    position: relative;

    padding-left: 18px;

    font-weight: 500;
}


/* ==========================================================
   ÉTATS
========================================================== */

.b612-search-loading,
.b612-search-error,
.b612-search-no-results {

    display: flex;

    align-items: center;

    justify-content: center;

    min-height: 200px;

    padding: 30px;

    box-sizing: border-box;

    font-family:
        'Filson Pro',
        sans-serif;

    font-size: 14px;

    color:
        rgba(255,255,255,0.72);

    text-align: center;
}


/* ==========================================================
   SCROLLBAR
========================================================== */

.b612-search-advanced-results::-webkit-scrollbar {

    width: 7px;
}


.b612-search-advanced-results::-webkit-scrollbar-track {

    background: transparent;
}


.b612-search-advanced-results::-webkit-scrollbar-thumb {

    background:
        rgba(255,255,255,0.35);

    border-radius: 20px;
}


.b612-search-advanced-results::-webkit-scrollbar-thumb:hover {

    background:
        rgba(255,255,255,0.52);
}
/* ==========================================================
   DESKTOP COMPACT — ZONE DE RÉSULTATS
========================================================== */

@media (min-width: 1100px)
       and (max-width: 1920px)
       and (max-height: 1080px) {

    .b612-search-advanced-results {

        top: 55px;
        right: 0;

        width: 46vw;
        max-width: 650px;

        height: 620px;

        padding:
            24px 28px 20px 30px;
    }


    .b612-search-advanced-result {

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

        column-gap: 24px;

        min-height: 115px;

        padding-bottom: 17px;

        margin-bottom: 17px;
    }


    .b612-search-advanced-result__cover {

        width: 90px;
        height: 90px;
    }


    .b612-search-advanced-result__title {

        font-size: 24px;
    }


    .b612-search-advanced-result__author {

        font-size: 0.95rem;
    }


    .b612-search-advanced-result__publisher {

        margin-bottom: 13px;

        font-size: 11px;
    }


    .b612-search-advanced-result__summary {

        font-family: 'Filson Pro', sans-serif;
        font-weight: 300;
        font-size: 18px;

        margin-bottom: 13px;


        line-height: 1.4;
    }


    .b612-search-advanced-result__meta {

        gap: 6px 14px;

        margin-bottom: 12px;

        font-size: 10px;
    }


    .b612-search-advanced-result__link {

        min-height: 34px;

        padding: 0 15px;

        font-size: 0.9rem;
    }
}


/* ==========================================================
   DESKTOP LARGE — ZONE DE RÉSULTATS
========================================================== */

@media (min-width: 1501px)
       and (max-width: 1920px)
       and (max-height: 1080px) {

    .b612-search-advanced-results {

        width: 50vw;
        max-width: 760px;

    }
}

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

/* ==========================================================
   B612 RESULTS — TABLET
   Zone droite — résultats de recherche
   ========================================================== */

@media (min-width: 768px)
       and (max-width: 1199px) {


    .b612-search-advanced-results {

        position: relative;

        top: auto;

        right: auto;

        width:
            calc(100% - 60px);

        height: auto;

        max-height: 75vh;

        margin:
            30px;

        padding:
            30px 34px;
    }


    .b612-search-advanced-result {

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

        column-gap: 28px;

        min-height: 140px;

        padding-bottom: 22px;

        margin-bottom: 22px;
    }


    .b612-search-advanced-result__cover {

        width: 120px;

        height: 120px;
    }


    .b612-search-advanced-result__content {

        padding-right: 30px;
    }


    .b612-search-advanced-result__title {

        font-size: 27px;
    }


    .b612-search-advanced-result__summary {

        font-size: 1.05rem;

        line-height: 1.45;
    }


    .b612-search-advanced-result__link {

        font-size: 1rem;
    }
}

/* ==========================================================
   SMARTPHONE
========================================================== */

/* ==========================================================
   B612 RESULTS — SMARTPHONE
   Zone droite — résultats de recherche
   ========================================================== */

@media (max-width: 767px) {


    /* ======================================================
       CONTENEUR
    ====================================================== */

    .b612-search-advanced-results {

        position: relative;

        top: auto;

        right: auto;

        width:
            calc(100% - 24px);

        height: auto;

        max-height: 75vh;

        margin:
            20px 12px;

        padding:
            24px 20px;
    }


    /* ======================================================
       RÉSULTAT
    ====================================================== */

    .b612-search-advanced-result {

        display: flex;

        flex-direction: column;

        gap: 22px;

        min-height: 0;

        padding-bottom: 24px;

        margin-bottom: 24px;
    }


    /* ======================================================
       COUVERTURE
    ====================================================== */

    .b612-search-advanced-result__cover {

        align-self: center;

        width: 170px;

        height: 170px;
    }


    /* ======================================================
       CONTENU
    ====================================================== */

    .b612-search-advanced-result__content {

        padding-right: 0;
    }


    .b612-search-advanced-result__header {

        gap: 12px;
    }


    .b612-search-advanced-result__title {

        font-size: 27px;

        line-height: 1.05;
    }


    .b612-search-advanced-result__author {

        font-size: 1rem;
    }


    .b612-search-advanced-result__publisher {

        font-size: 11px;
    }


    .b612-search-advanced-result__summary {

        font-size: 1rem;

        line-height: 1.5;
    }


    /* ======================================================
       MÉTADONNÉES
    ====================================================== */

    .b612-search-advanced-result__meta {

        gap:
            7px 14px;

        font-size: 10px;
    }


    /* ======================================================
       ACTIONS
    ====================================================== */

    .b612-search-advanced-result__actions {

        flex-direction: row;
    }


    /* ======================================================
       LIEN
    ====================================================== */

    .b612-search-advanced-result__link {

        width: 100%;

        font-size: 0.95rem;
    }


    /* ======================================================
       FOOTER
    ====================================================== */

    .b612-search-advanced-result__footer {

        flex-wrap: wrap;

        gap: 12px;
    }


    .b612-search-advanced-result__isbn,
    .b612-search-advanced-result__publisher-footer {

        font-size: 0.9rem;
    }
}

/* Liens vers les pages /auteur/ et /editeur/ */
/* Les résultats s'affichent sur fond sombre : liens en gras, blancs au survol */
.b612-search-advanced-result__author a,
.b612-search-advanced-result__publisher a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgb(255 255 255 / 30%);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .2s ease, text-decoration-color .2s ease;
}

.b612-search-advanced-result__author a:hover,
.b612-search-advanced-result__author a:focus-visible,
.b612-search-advanced-result__publisher a:hover,
.b612-search-advanced-result__publisher a:focus-visible {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

/* Explorer par univers : « Afficher plus » (20 notices par chargement) */
.b612-explorer-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 26px 0 10px;
}

.b612-explorer-more__count {
    margin: 0;
    color: rgb(255 255 255 / 60%);
    font-family: var(--b612-next-font-body, "Filson Pro", sans-serif);
    font-size: 13px;
}

.b612-explorer-more__button {
    padding: 11px 26px;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    font-family: var(--b612-next-font-body, "Filson Pro", sans-serif);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.b612-explorer-more__button:hover,
.b612-explorer-more__button:focus-visible {
    border-color: #ffffff;
    background: #ffffff;
    color: #17182c;
}

.b612-explorer-more__button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.b612-explorer-more__button:disabled {
    cursor: wait;
    opacity: .6;
}


/* ==========================================================
   Bouton × : fermer la zone de résultats (ajouté par le JS)
   Collant en haut à droite pendant le défilement des résultats.
========================================================== */

.b612-search-advanced-results[hidden] {

    display: none !important;
}

.b612-search-advanced-results__close {

    position: sticky;

    top: 0;

    z-index: 5;

    float: right;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 40px;

    height: 40px;

    margin: -16px -22px 0 12px;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.35);

    border-radius: 50%;

    background: rgba(17, 21, 42, 0.75);

    color: #ffffff;

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

    font-size: 24px;

    line-height: 1;

    cursor: pointer;

    backdrop-filter: blur(6px);

    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.b612-search-advanced-results__close:hover,
.b612-search-advanced-results__close:focus-visible {

    border-color: #ffffff;

    background: #ffffff;

    color: #11152a;
}

.b612-search-advanced-results__close:focus-visible {

    outline: 2px solid #ffd500;

    outline-offset: 2px;
}

@media (max-width: 700px) {

    .b612-search-advanced-results__close {

        width: 36px;

        height: 36px;

        margin: -6px -6px 0 8px;

        font-size: 22px;
    }
}


/* ==========================================================
   MOBILE (≤ 767px) — RÉSULTATS EN PLEIN ÉCRAN (6 nov. 2026)
   La zone de résultats recouvre tout l'écran (plus besoin de
   défiler sous le Hero). Pour refaire une recherche : bouton ×
   (ou Échap), puis nouvelle saisie. Le JS ajoute la classe
   « b612-results-open » sur <html> pour bloquer la page derrière.
========================================================== */

@media (max-width: 767px) {

    .b612-search-advanced-results {

        position: fixed;

        inset: 0;

        z-index: 1100;               /* au-dessus du header (1000) */

        width: auto;

        height: 100vh;

        height: 100dvh;              /* hauteur réelle sur mobile (barres du navigateur) */

        max-height: none;

        margin: 0;

        padding:
            calc(16px + env(safe-area-inset-top, 0px))
            18px
            calc(24px + env(safe-area-inset-bottom, 0px));

        border-radius: 0;

        overscroll-behavior: contain;

        -webkit-overflow-scrolling: touch;

        background:
            linear-gradient(
                160deg,
                rgba(24, 26, 48, 0.97),
                rgba(8, 20, 42, 0.98)
            );
    }

    .b612-search-advanced-results__close {

        width: 42px;

        height: 42px;

        margin: 0 0 0 10px;

        font-size: 24px;
    }

    html.b612-results-open,
    html.b612-results-open body {

        overflow: hidden;
    }
}


/* ==========================================================
   SAISIE PRÉDICTIVE DU HERO (6 nov. 2026)
   Liste créée par pmb-connector/assets/js/b612-hero-suggest.js
   sous le champ .b612-search-advanced__searchbox
   ========================================================== */

.b612-hero-suggest {
    /* Position fixe calculée par le JS sous le champ (top, left, width,
       max-height) : le champ et le Hero coupent ce qui dépasse */
    position: fixed;
    z-index: 1050;              /* sous les résultats plein écran mobile (1100) */

    max-height: 470px;
    box-sizing: border-box;     /* largeur = celle du champ, marges comprises */
    overflow-y: auto;
    overscroll-behavior: contain;

    padding: 8px;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 18px 40px rgba(7, 21, 36, .28),
        0 2px 6px rgba(7, 21, 36, .12);

    color: var(--b612-next-color-text, #25283a);

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

.b612-hero-suggest[hidden] {
    display: none;
}

.b612-hero-suggest__group {
    padding: 10px 12px 4px;

    color: #626c80;

    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.b612-hero-suggest__option {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    padding: 8px 12px;

    box-sizing: border-box;

    border: 0;
    border-radius: 12px;

    background: transparent;
    color: inherit;

    font: inherit;
    text-align: left;
    text-decoration: none;

    cursor: pointer;
}

.b612-hero-suggest__option.is-active,
.b612-hero-suggest__option:hover {
    background: #f1f3f9;
}

.b612-hero-suggest__cover {
    flex: 0 0 34px;

    width: 34px;
    height: 48px;

    overflow: hidden;

    border-radius: 5px;

    background: #e9ecf2;
}

.b612-hero-suggest__cover img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.b612-hero-suggest__text {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}

.b612-hero-suggest__label {
    overflow: hidden;

    color: #18233f;

    font-size: .95rem;
    font-weight: 500;
    line-height: 1.3;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.b612-hero-suggest__label mark {
    background: none;
    color: var(--b612-next-color-primary, #28367f);
    font-weight: 700;
}

.b612-hero-suggest__meta {
    overflow: hidden;

    color: #646d7f;

    font-size: .78rem;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.b612-hero-suggest__empty {
    padding: 12px;

    color: #646d7f;

    font-size: .9rem;
}

/* Dernière ligne : lancer la recherche habituelle */
.b612-hero-suggest__option--search {
    margin-top: 4px;
    padding: 12px;

    border-top: 1px solid #eceef3;
    border-radius: 0 0 12px 12px;

    color: var(--b612-next-color-primary, #28367f);

    font-size: .9rem;
    font-weight: 600;
}

/* Mobile : liste un peu plus serrée */
@media (max-width: 767px) {

    .b612-hero-suggest {
        padding: 6px;
        border-radius: 16px;
    }

    .b612-hero-suggest__option {
        gap: 10px;
        padding: 8px 10px;
    }

    .b612-hero-suggest__label {
        font-size: .9rem;
    }
}
