/* +--------------------------------------------------------------------------+
// ? 2002-2013 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: modal.css,v 1.1.6.2 2026/11/05 09:52:09 rtigero Exp $ */

/* ======================================================================== */
/* Modal				                                                    */
/* ======================================================================== */

.modal-container {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #dfdfdfad;
    cursor: pointer;
}

.modal {
    width: 60%;
    min-width: 50%;
    min-height: 50%;
    padding: 30px;
    background-color: #fff;
    cursor: default;
    box-shadow: 7px 8px 7px #c5c5c573;
    position: relative;
}

.modal button {
    cursor: pointer;
}

.modal-header .modal-close {
    float: right;
}

.modal-content {
    width: 100%;
    margin-top: 20px;
    display: grid;
    grid-auto-rows: min-content;
    grid-template-columns: 100%;
    row-gap: 15px;
}

/* La repartition en trois rangees a ete dessinee pour la modale de facettes :
   un titre, une description, une liste. Elle ne vaut que pour elle : une modale
   de formulaire a autant d'enfants que de champs, et se retrouvait avec une
   rangee a 85% de la hauteur au milieu de sa saisie. */
#facettes_modal .modal-content {
    grid-template-rows: 10% 5% 85%;
}

.modal-footer {
    display: flex;
    justify-content: end;
    align-items: end;
    gap: 10px;
}

.modal-content .modal-title {
    margin-bottom: 10px !important;
}

.modal-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
    list-style: none;
}

.modal-separator {
    border-top: 1px solid #9d9b9b57;
    margin: 0px;
}

.modal-filters > li {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-filters .modal-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 50%;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-transform: uppercase;
    border: 1px solid gray;
}

.modal-filters .modal-filter.active,
.modal-filters .modal-filter:hover:not([disabled]) {
    background-color: #FCFCFC;
    font-weight: 600;
}

.modal-filters .modal-filter[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

.modal-content-list {
    overflow-y: auto;
}

.modal-list {
    display: grid;
    grid-template-columns: auto auto auto;
    column-gap: 4%;
    list-style: none;
}

.modal-list .modal-item {
    font-size: medium;
}

.modal-item-checkbox {
    width: 19px;
    height: 16px;
}

/* ======================================================================== */
/* Modale des recherches favorites du lecteur (#favorite_search_modal)      */
/* ======================================================================== */

/* La recherche multi-criteres allonge la modale : elle part du haut et la
   page defile, au lieu d'etre centree et coupee en hauteur */
#favorite_search_modal .modal-container {
    align-items: flex-start;
    overflow-y: auto;
    padding: 3vh 1em;
}

#favorite_search_modal .modal {
    width: 100%;
    max-width: 75em;
    min-width: 0;
    min-height: 0;
    padding: 1.4em 1.6em 1.6em;
    box-sizing: border-box;
}

/* Rappel de la recherche modifiee (date d'enregistrement), en encadre */
#favorite_search_modal .favorite_search_reminder {
    background: #f5f7fa;
    border: 1px solid #e4e7eb;
    padding: 0.6em 0.8em;
    margin: 0;
}

/* Champs de la modale, comme dans la maquette : libelle en gras sur sa
   propre ligne, champ de saisie en dessous, sur toute la largeur utile */
#favorite_search_modal .pmb-interface-element-group {
    margin: 0 0 1.1em 0;
}

#favorite_search_modal .pmb-interface-element-label {
    display: block;
    float: none;
    width: auto;
    font-weight: bold;
    margin: 0 0 .3em 0;
}

#favorite_search_modal input.pmb-interface-element,
#favorite_search_modal select.pmb-interface-element {
    display: block;
    float: none;
    box-sizing: border-box;
    width: 100%;
    max-width: 40em;
    padding: .45em .6em;
    font-size: 1em;
}

#favorite_search_modal select.pmb-interface-element {
    width: auto;
    max-width: 100%;
}

/* Asterisque des champs obligatoires */
.pmb-interface-element-mandatory-mark {
    color: #a61b1b;
}

/* Mention "(obligatoire)", lue par les lecteurs d'ecran seulement (la
   classe visually-hidden n'est pas definie par tous les themes) */
.pmb-interface-element-mandatory-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Bloc depliable des criteres, dernier du formulaire, au-dessus des boutons */
#favorite_search_modal .favorite_search_criterias > summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 0.6em;
}

#favorite_search_modal .favorite_search_criterias form {
    margin: 0;
}

/* Criteres de la recherche multi-criteres. Les themes les dimensionnent en
   pourcentages, sans retour a la ligne, et ne les empilent que sous une
   largeur d'ecran (media query) : dans la modale, plus etroite que la page,
   ils debordaient. Ils passent ici a la ligne selon la place disponible, et
   s'empilent selon la largeur de la modale elle-meme (container query). */
#favorite_search_modal .favorite_search_criterias {
    container-type: inline-size;
    container-name: favorite_search_criterias;
}

/* La liste des criteres est le seul bloc du formulaire de la modale : les
   regles de theme qui visent le dernier bloc du formulaire de recherche (la
   rangee des boutons, ex. ddd : .form_criteria_rmc > div:last-child) la
   mettaient en ligne. Les criteres sont empiles, un par ligne. */
#favorite_search_modal .favorite_search_criterias form > .rmc_search_criterias {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    float: none;
    height: auto;
    margin-top: 0;
}

#favorite_search_modal .rmc_search_criterias > .rmc_row {
    width: 100%;
}

#favorite_search_modal .rmc_search_criteria {
    flex-wrap: wrap;
}

#favorite_search_modal .rmc_inter_container {
    width: auto;
}

#favorite_search_modal .rmc_criteria_container {
    flex: 1 1 14em;
    min-width: 0;
}

#favorite_search_modal .rmc_criteria_form_container {
    flex: 3 1 24em;
    width: auto;
    min-width: 0;
}

@container favorite_search_criterias (max-width: 40em) {
    #favorite_search_modal .rmc_search_criteria {
        flex-direction: column;
        align-items: stretch;
    }

    #favorite_search_modal .rmc_inter_container,
    #favorite_search_modal .rmc_criteria_container,
    #favorite_search_modal .rmc_criteria_form_container {
        flex-basis: auto;
        width: 100%;
    }
}

/* Boutons a gauche, comme dans la maquette : Annuler puis Enregistrer */
#favorite_search_modal .modal-footer {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 1.4em;
}

@media (max-width: 720px) {
    #favorite_search_modal .modal {
        padding: 1em;
    }
}

/* Confirmation d'ajout aux recherches favorites : lue par les lecteurs
   d'ecran, masquee a l'ecran (le bouton change deja de libelle). La classe
   visually-hidden n'etant pas definie par tous les themes, la regle est ici */
#favorite_search_modal .favorite_search_status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Bouton "Ajouter aux recherches favorites" des pages de resultats */
.search_persopac_add_button {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    padding: .45em 1em;
    border: 1px solid #1f6feb;
    border-radius: 2px;
    background: #1f6feb;
    color: #fff;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.search_persopac_add_button:hover,
.search_persopac_add_button:focus {
    background: #1450a8;
    border-color: #1450a8;
}

.search_persopac_add_button:focus-visible {
    outline: 2px solid #1450a8;
    outline-offset: 2px;
}

/* Recherche ajoutee : le bouton reste focalisable mais ne propose plus l'ajout */
.search_persopac_add_button.search_persopac_add_button_done,
.search_persopac_add_button.search_persopac_add_button_done:hover,
.search_persopac_add_button.search_persopac_add_button_done:focus {
    background: #0b7a4b;
    border-color: #0b7a4b;
    cursor: default;
}

/* ======================================================================== */
/* Modale de pret numerique (PNB)                                           */
/* ======================================================================== */

:root {
    --pnb-modal-backdrop: rgba(0, 0, 0, .45);
    --pnb-modal-background: #ffffff;
    --pnb-modal-separator: #d0d0d0;
    --pnb-modal-focus: #1e3a8a;
    --pnb-error-color: #a61b1b;
}

/* La page ne defile pas sous la modale ouverte */
body.pnb-modal-open {
    overflow: hidden;
}

/* Fond plein ecran, boite centree ; l'affichage depend de l'attribut hidden.
   Unites en em : certains themes ramenent la police racine a 10px (62.5%), ce
   qui reduirait d'autant une boite et des textes exprimes en rem */
.pnb-modal {
    position: fixed;
    /* Largeur calee sur l'ecran (vw) plutot que sur inset: 0 : quand le contenu
       de la page deborde, le mobile elargit le viewport de mise en page et un
       conteneur fixe en inset: 0 deborderait d'autant a droite */
    top: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    box-sizing: border-box;
    /* Au-dessus des menus responsives des themes (9999), sous le bandeau cookies */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
    background-color: var(--pnb-modal-backdrop);
}

.pnb-modal[hidden] {
    display: none;
}

.pnb-modal-box {
    box-sizing: border-box;
    width: 100%;
    max-width: min(36em, calc(100vw - 2em));
    max-height: calc(100vh - 2em);
    max-height: calc(100dvh - 2em);
    overflow-y: auto;
    background-color: var(--pnb-modal-background);
    border-radius: .25em;
    box-shadow: 0 .5em 1.5em rgba(0, 0, 0, .25);
}

.pnb-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1em;
    padding: 1.25em 1.5em 0;
}

.pnb-modal-title {
    margin: 0;
    font-size: 1.25em;
}

.pnb-modal-close {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75em;
    height: 2.75em;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    color: inherit;
    font-size: 1.25em;
    cursor: pointer;
}

.pnb-modal-close:hover {
    background-color: rgba(0, 0, 0, .08);
}

.pnb-modal-close:focus-visible {
    outline: 2px solid var(--pnb-modal-focus);
    outline-offset: 2px;
}

.pnb-modal-body {
    padding: 1.25em 1.5em 1.5em;
}

/* Le conteneur garde ses classes uikit historiques ; leur marge haute n'a pas
   de sens sous le titre de la modale */
.pnb-modal-body .pnb-loan {
    margin-top: 0;
}

/* Formulaire de pret, en modale comme en affichage inline */
.pnb-loan :where(fieldset, legend, input, select) {
    box-sizing: border-box;
    max-width: 100%;
}


.pnb-loan .pnb-fieldset {
    min-width: 0;
    margin: 0 0 1em;
    padding: .75em 1em;
    border: 1px solid var(--pnb-modal-separator);
    border-radius: .25em;
}

.pnb-loan .pnb-legend {
    padding: 0 .25em;
    font-weight: bold;
    /* Certains themes donnent aux legend une hauteur de ligne de titre, qui
       espace exagerement une legende repartie sur deux lignes */
    line-height: 1.4;
}

.pnb-loan .pnb-choice {
    display: flex;
    align-items: flex-start;
    gap: .5em;
    margin: .4em 0;
}

.pnb-loan .pnb-choice input {
    flex: none;
    margin-top: .2em;
}

.pnb-loan .pnb-password {
    margin: 0 0 1em;
}

.pnb-loan .pnb-field {
    margin-bottom: .75em;
}

.pnb-loan .pnb-field label {
    display: block;
    margin-bottom: .25em;
    font-weight: bold;
}

.pnb-loan .pnb-field-input {
    display: flex;
    align-items: center;
    gap: .5em;
}

.pnb-field-input input {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 24em;
    padding: .4em .5em;
    font-size: 1em;
}

/* Erreur lisible sans la couleur (texte en gras) et contrastee (le rouge vif
   de .pnb_alert n'atteint pas 4.5:1 sur fond blanc) */
.pnb-loan .pnb-error {
    color: var(--pnb-error-color);
    font-weight: bold;
}

.pnb-loan input[aria-invalid="true"] {
    border-color: var(--pnb-error-color);
}

.pnb-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .75em;
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--pnb-modal-separator);
}

.pnb-loading {
    display: flex;
    justify-content: center;
    padding: 1em 0;
}

/* Bouton afficher/masquer le mot de passe : sans fond ni bordure natifs, la
   neutralisation de rgaa.css n'etant pas chargee hors mode RGAA */
.pnb-loan .password-toggle {
    flex: none;
    padding: .25em .4em;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1em;
    cursor: pointer;
}

.pnb-loan .password-toggle:focus-visible {
    outline: 2px solid var(--pnb-modal-focus);
    outline-offset: 2px;
}

/* Petit ecran : marges reduites, l'arriere-plan reste visible autour de la
   boite ; boutons en pleine largeur */
@media (max-width: 30em) {
    .pnb-modal {
        padding: .75em;
    }

    .pnb-modal-box {
        max-width: calc(100vw - 1.5em);
        max-height: calc(100vh - 1.5em);
        max-height: calc(100dvh - 1.5em);
    }

    .pnb-modal-head {
        padding: 1em 1em 0;
    }

    .pnb-modal-body {
        padding: 1em;
    }

    .pnb-modal-actions {
        flex-direction: column;
    }

    .pnb-modal-actions .bouton {
        width: 100%;
    }
}
