/* Les styles historiques préservent les écrans spécialisés de PMB.
   Les adaptations restent dans ce thème pour faciliter les mises à jour. */
@import url("../genbib/colonnes.css");
@import url("../genbib/genbib.css");
@import url("../genbib/gallerie_photos.css");
@import url("../genbib/liste_bulletins.css");
@import url("../genbib/tags.css");
@import url("../genbib/visionneuse.css");

:root {
    --sg-green: #084c39;
    --sg-dark: #123c30;
    --sg-gold: #d2ad59;
    --sg-ink: #243c33;
    --sg-muted: #586a61;
    --sg-paper: #f4f7f4;
    --sg-line: #dbe5de;
}
html { height: auto; scroll-padding-top: 24px; }
body#pmbopac {
    height: auto;
    min-height: 100vh;
    background: var(--sg-paper);
    color: var(--sg-ink);
    font: 16px/1.6 "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--sg-green); text-underline-offset: 3px; }
a:hover { color: #765916; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
[tabindex]:focus-visible { outline: 3px solid #997119; outline-offset: 4px; }
img { max-width: 100%; height: auto; }
input, select, textarea, button { font: inherit; }

/* Le gabarit natif place l'introduction après le contenu. La grille permet
   une hauteur de bannière fluide, sans le décalage fixe de 280 px de genbib. */
#container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    width: min(1240px, 100%);
    min-height: 100vh;
    padding: 0 40px;
    margin: 0 auto;
    background: #fff;
    box-shadow: none;
}
#main { display: contents; }
#main #main_header {
    grid-column: 1 / -1;
    grid-row: 1;
    position: static;
    width: auto;
    height: auto;
    margin: 0 -40px;
    padding: 0;
    background: none;
    text-align: left;
}
#main #main_hors_footer {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 0 0 24px;
}
#intro { display: none; }
#bandeau {
    grid-column: 2;
    grid-row: 2;
    position: static;
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0 0 24px 28px;
    border-left: 1px solid var(--sg-line);
    background: transparent;
}
#bandeau_2 { grid-column: 1 / -1; position: static; width: auto; }
#bandeau_2:empty { display: none; }
#main #footer {
    grid-column: 1 / -1;
    grid-row: 4;
    width: auto;
    margin: 0;
    padding: 24px 0;
    border-top: 1px solid var(--sg-line);
    color: var(--sg-muted);
    font-size: 13px;
    text-align: left;
}
#footer a { display: inline-block; padding: 6px 0; margin-right: 16px; }

.sg-topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 40px; }
.sg-brand { display: flex; align-items: center; gap: 14px; color: var(--sg-dark); text-decoration: none; }
.sg-brand img { width: 58px; height: 58px; object-fit: contain; flex-shrink: 0; }
.sg-brand span { font: bold 20px/1.25 Georgia, "Times New Roman", serif; }
.sg-brand small { display: block; margin-top: 5px; font: 13px/1.4 "Segoe UI", Arial, sans-serif; color: var(--sg-muted); }
.sg-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.sg-nav a { padding: 10px 0; font-size: 14px; font-weight: 600; text-decoration: none; }
.sg-nav a:hover { text-decoration: underline; }
.sg-nav { align-items: center; }
.sg-nav a.sg-nav-search { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--sg-green); border-radius: 999px; color: var(--sg-green); background: #fff; }
.sg-nav a.sg-nav-search::before { content: ""; width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 4px 4px 0 -2px currentColor; }
.sg-nav a.sg-nav-search:hover { color: #fff; background: var(--sg-green); text-decoration: none; }
.sg-hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--sg-green); color: white; border-bottom: 5px solid var(--sg-gold); }
.sg-hero-copy { padding: 42px 48px; align-self: center; }
#main_header .sg-hero h1 { margin: 0 0 18px; color: white; background: none; font: 500 clamp(38px, 4.5vw, 60px)/1.06 Georgia, "Times New Roman", serif; }
.sg-hero-copy p { max-width: 390px; margin: 0; color: #edf4ed; font-size: 16px; line-height: 1.7; }
.sg-hero-link { display: inline-flex; gap: 24px; align-items: center; min-height: 44px; margin-top: 22px; color: #f2d698; font-size: 15px; font-weight: 600; text-decoration: none; }
.sg-hero-link:hover { color: #fff; text-decoration: underline; }
.sg-hero-image { position: relative; margin: 0; min-height: 340px; overflow: hidden; }
.sg-hero-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.sg-hero-image figcaption { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 24px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: #fff; font-size: 12px; }

#intro_message { margin: 0 0 24px; padding: 0; }
#intro_message .p1 { color: var(--sg-ink); }
#intro_message .p2:empty { display: none; }
.sg-search-intro h2 { margin: 0 0 6px; color: var(--sg-dark); font: 500 29px/1.25 Georgia, "Times New Roman", serif; }
#intro_message .sg-search-intro p { margin: 0; color: var(--sg-muted); font-size: 15px; font-weight: 400; }
#navigator { display: flex; flex-wrap: wrap; gap: 8px 20px; border: 0; padding: 0; margin: 0 0 16px; background: transparent; }
#navigator a { display: inline-block; padding: 6px 0; font-size: 13px; }
#navigator table, #navigator tbody { display: block; width: 100%; }
#navigator tr { display: flex; flex-wrap: wrap; gap: 8px 20px; }
#navigator td { display: block; flex: 0 0 auto; }
#navigator td a { padding: 6px 14px; border: 1px solid var(--sg-line); border-radius: 999px; background: #fff; text-decoration: none; }
#navigator td a:hover { border-color: var(--sg-green); color: var(--sg-green); }
.sg-home #navigator { display: none; }
#search { width: 100%; margin: 0 0 28px; padding: 0; border: 1px solid var(--sg-line); border-radius: 8px; background: #fff; }
#main #search ul.search_tabs { position: static; display: flex; flex-wrap: wrap; gap: 0; width: auto; margin: 0; padding: 6px 12px 0; border-bottom: 1px solid var(--sg-line); background: #f4f7f4; }
#main #search ul.search_tabs li, #main #search ul.search_tabs li#current, #main #search ul.search_tabs li:hover, #main #search ul.search_tabs li#current:hover { float: none; display: block; margin: 0; padding: 0; border: 0; background: transparent; }
#main #search ul.search_tabs li a { display: block; padding: 12px 10px; color: var(--sg-muted); font-size: 13px; font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
#main #search ul.search_tabs li#current a { color: var(--sg-green); border-color: var(--sg-green); }
#search > .row { padding: 22px; }
#search form { margin: 0; }
#search form input.text_query { display: block; width: 100%; max-width: 100%; min-width: 0; margin: 8px 0 12px; min-height: 52px; padding: 12px 14px; border: 1px solid #82988b; border-radius: 4px; color: var(--sg-ink); background: #fff; font-size: 16px; line-height: 1.5; }
#search select, #bandeau select, #search textarea { max-width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #a4b7aa; border-radius: 4px; color: var(--sg-ink); background: #fff; }
input.bouton, input.boutonrechercher, button.bouton { min-height: 44px; max-width: 100%; margin: 4px 6px 4px 0; padding: 10px 20px; border: 1px solid var(--sg-green); border-radius: 4px; background: var(--sg-green); color: #fff; font-weight: 600; cursor: pointer; text-shadow: none; }
input.bouton:hover, input.boutonrechercher:hover { background: var(--sg-dark); }
#search .button_search_help { background: #fff; color: var(--sg-green); }
#simple_search_zone { margin-top: 12px; font-size: 14px; }
#zsimples { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding-right: 16px; border: 1px solid var(--sg-line); border-radius: 999px; background: var(--sg-paper); }
#zsimples:hover { border-color: var(--sg-green); }
#zsimplesImg { width: 40px; height: 40px; padding: 14px; object-fit: contain; flex-shrink: 0; cursor: pointer; }
#zsimplesLabelChild { cursor: pointer; font-weight: 600; color: var(--sg-green); }
#zsimplesChild { max-width: 100%; }
#zsimplesChild .row { display: flex; flex-wrap: wrap; gap: 8px; }
#zsimplesChild .row > span { float: none !important; width: auto !important; flex: 1 1 160px; display: flex; gap: 6px; align-items: center; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--sg-green); }
#main_hors_footer h3 { position: static; margin: 24px 0 12px; color: var(--sg-dark); background: none; font-size: 18px; line-height: 1.45; }
#main_hors_footer #categories h3 span, #main_hors_footer #location h3 span { position: static; margin: 0; padding: 0; background: none; }
#categories-container, #location-container, #last_entries, #etagere-container { width: 100%; padding: 18px; border: 1px solid var(--sg-line); border-radius: 6px; background: #fff; }
#categories-container:empty::after, #categories-container:has(> .div_clr:only-child)::after, #location-container:empty::after { content: "Aucun élément à afficher pour le moment."; color: var(--sg-muted); font-size: 14px; }
/* Taille du texte et langue sur une même ligne, en tête de colonne. */
#bandeau { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: 0 12px; }
#bandeau > * { flex: 1 1 100%; }
#bandeau #accessibility { flex: 0 0 auto; position: static; padding: 0; margin: 0 0 24px; }
#accessibility ul { display: flex; margin: 0; padding: 0; list-style: none; border: 1px solid #a4b7aa; border-radius: 4px; overflow: hidden; background: #fff; }
#accessibility li { margin: 0; padding: 0; }
#accessibility li + li { border-left: 1px solid #a4b7aa; }
#accessibility a { display: inline-flex; justify-content: center; align-items: center; min-width: 40px; min-height: 42px; color: var(--sg-green); font-weight: 600; text-decoration: none; }
#accessibility a:hover { color: #fff; background: var(--sg-green); }
#bandeau #accueil { flex: 1 1 0; min-width: 110px; margin: 0 0 24px; padding: 0; }
#bandeau #accueil > a, #bandeau #accueil p.centered { display: none; }
#bandeau #accueil #lang_select { width: 100%; margin: 0; padding: 0; background: none; }
#bandeau #accueil #lang_select select { border: 1px solid #a4b7aa; }
#lang_select select { width: 100%; }
#bandeau h3 { margin: 0 0 12px; color: var(--sg-dark); font: 500 23px/1.3 Georgia, "Times New Roman", serif; }
#bandeau #connexion, #bandeau #adresse { width: 100%; margin: 0 0 28px; padding: 0; color: var(--sg-muted); font-size: 14px; }
#connexion #login_form input.login, #connexion #login_form input.password { width: 100%; min-height: 44px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid #a4b7aa; border-radius: 4px; background: #fff; color: var(--sg-ink); font-size: 16px; }
#connexion #login_form input.password { padding-right: 46px; }
#connexion #login_form input.bouton { position: static; width: 100%; margin: 12px 0 4px; padding: 10px 16px; text-transform: none; }
#login_form .myform-password-text-visually { position: relative; width: 100%; }
#login_form #myform-password-visually { position: absolute; left: auto; right: 2px; top: 12px; width: 44px; height: 44px; transform: none; background: transparent; color: var(--sg-green); border: 0; }
#login_form a { display: inline-block; padding: 8px 0; }
#login_form form, #login_form .row { max-width: 100%; }
#login_form button.fa-eye, #login_form button.fa-eye-slash { min-width: 44px; min-height: 44px; }
#adresse { border-top: 1px solid var(--sg-line); padding-top: 24px !important; }
#adresse br { line-height: 1.8; }
#main_hors_footer table { max-width: 100%; }
#main_hors_footer td, #main_hors_footer th { overflow-wrap: anywhere; }
#main_hors_footer .notice-parent, #main_hors_footer .notice-child { max-width: 100%; overflow-wrap: anywhere; }

@media (max-width: 1000px) {
    #container { grid-template-columns: minmax(0, 1fr) 240px; padding: 0 24px; gap: 28px; }
    #main #main_header { margin: 0 -24px; }
    .sg-topbar { padding: 18px 24px; gap: 16px; }
    .sg-brand span { font-size: 18px; }
    .sg-nav { gap: 4px 14px; }
    .sg-hero-copy { padding: 32px; }
    .sg-hero-image { min-height: 320px; }
    #bandeau { padding-left: 20px; }
}
@media (max-width: 760px) {
    #container { display: flex; flex-direction: column; padding: 0 20px; gap: 28px; }
    #main #main_header { order: 0; margin: 0 -20px; }
    #main #main_hors_footer { order: 1; padding: 0; }
    #bandeau { order: 2; padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--sg-line); }
    #bandeau_2 { order: 3; }
    #main #footer { order: 4; }
    .sg-topbar { flex-direction: column; align-items: stretch; padding: 16px 20px 10px; gap: 12px; }
    .sg-brand img { width: 48px; height: 48px; }
    .sg-brand span { font-size: 18px; }
    .sg-nav { justify-content: space-between; gap: 0 12px; border-top: 1px solid var(--sg-line); padding-top: 6px; }
    .sg-nav a { font-size: 13px; }
    .sg-hero { grid-template-columns: minmax(0, 1fr); }
    .sg-hero-copy { padding: 28px 24px; }
    #main_header .sg-hero h1 { font-size: 42px; }
    .sg-hero-copy p { max-width: 450px; font-size: 15px; }
    .sg-hero-link { margin-top: 14px; }
    .sg-hero-image { min-height: 195px; }
    .sg-hero-image img { object-position: center 55%; }
    .sg-hero-image figcaption { padding-left: 20px; }
    .sg-search-intro h2 { font-size: 27px; }
    #main #search ul.search_tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px 8px 0; }
    #main #search ul.search_tabs li a { height: 100%; padding: 10px 6px; font-size: 12px; }
    #search > .row { padding: 16px; }
    #search form input.text_query { margin-top: 12px; }
    #search select { width: 100%; }
    #search input.boutonrechercher { width: 100%; }
    #connexion, #accueil, #adresse { max-width: 480px; }
    #main_hors_footer [class^="colonne"] { float: none; width: 100%; }
    #main_hors_footer table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
    #container, #main { display: block; width: 100%; padding: 0; }
    .sg-nav, .sg-hero-link, #bandeau, #navigator { display: none; }
    .sg-hero { color: #000; background: #fff; }
    #main_header .sg-hero h1, .sg-hero-copy p { color: #000; }
}

/* Deuxième version : les livres occupent tout le fond, tandis que les
   surfaces de lecture restent suffisamment opaques pour le contraste. */
.sg-slide-controls[hidden], .sg-slide-controls button[hidden] { display: none !important; }
:root {
    --sg-display: Georgia, "Times New Roman", serif;
    --sg-radius: 8px;
    --sg-books: url("images/livres.jpg");
}
body#pmbopac {
    background-image: linear-gradient(rgba(18, 35, 29, .28), rgba(18, 35, 29, .45)), var(--sg-books);
    background-color: var(--sg-dark);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
#container {
    width: min(1320px, calc(100% - 64px));
    min-height: calc(100vh - 48px);
    margin: 24px auto;
    background: rgba(255, 255, 255, .95);
    border-radius: var(--sg-radius);
    box-shadow: 0 20px 70px rgba(0, 0, 0, .2);
}
.sg-topbar { background: var(--sg-paper); border-radius: var(--sg-radius) var(--sg-radius) 0 0; }
#main_header .sg-hero h1 { font-family: var(--sg-display); white-space: pre-line; }
.sg-search-intro h2, #bandeau h3, .sg-brand span { font-family: var(--sg-display); }
.sg-hero { position: relative; grid-template-columns: .9fr 1.1fr; }
.sg-hero-copy { padding: 32px 40px; }
.sg-hero-image { min-height: 310px; isolation: isolate; }
.sg-hero-image .sg-slide { opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.sg-hero-image .sg-slide.is-active { opacity: 1; }
.sg-hero-image figcaption { z-index: 2; }
.sg-slide-controls { position: absolute; z-index: 3; top: 12px; right: 12px; display: flex; gap: 6px; }
.sg-slide-controls[hidden] { display: none; }
.sg-slide-controls button { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; color: white; background: rgba(10,30,23,.78); font: 24px/1 Arial, sans-serif; cursor: pointer; }
.sg-slide-controls button:hover { background: var(--sg-green); }
.sg-slide-controls .sg-slide-pause { font-size: 17px; }
.sg-motion .sg-hero h1 { animation: sg-arrive 650ms ease-out both; }
.sg-motion .sg-hero-image .sg-slide.is-active { animation: sg-pan 12s ease-in-out infinite alternate; }
.sg-paused .sg-hero-image .sg-slide { animation-play-state: paused; }
@keyframes sg-pan { from { transform: scale(1); } to { transform: scale(1.045); } }
@keyframes sg-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
#search { border-radius: var(--sg-radius); box-shadow: 0 8px 24px rgba(24, 48, 35, .055); background: rgba(255,255,255,.98); }
#main #search ul.search_tabs { border-radius: var(--sg-radius) var(--sg-radius) 0 0; background: var(--sg-paper); }
#search > p { margin: 18px 22px 0; color: var(--sg-muted); font-size: 14px; }
#categories-container, #location-container { background: rgba(255,255,255,.95); }
.sg-empty { margin: 0; font-size: 14px; color: var(--sg-muted); }
.sg-contact { font-style: normal; }
.sg-contact p { margin: 0 0 14px; }
.sg-contact a { overflow-wrap: anywhere; }
.sg-footer-note { display: block; margin-bottom: 8px; color: var(--sg-muted); }
/* Les liens institutionnels sont publiés par Gestion Biblio. Masquer aussi
   les anciens liens natifs lorsque JavaScript est désactivé. */
#footer #footer_link_website, #footer .lien_pmb_footer { display: none; }
#main #footer { padding-top: 18px; }
@media (max-width: 1000px) {
    #container { width: calc(100% - 32px); margin: 16px auto; }
    .sg-hero-copy { padding: 28px; }
    #main_header .sg-hero h1 { font-size: 44px; }
}
@media (max-width: 760px) {
    body#pmbopac { background-attachment: scroll; }
    #container { width: calc(100% - 16px); margin: 8px auto; padding: 0 16px; gap: 24px; }
    #main #main_header { margin: 0 -16px; }
    .sg-topbar { padding: 12px 16px 8px; gap: 8px; }
    .sg-brand img { width: 40px; height: 40px; }
    .sg-brand span { font-size: 16px; }
    .sg-brand small { font-size: 12px; margin-top: 2px; }
    .sg-nav { gap: 0 8px; }
    .sg-nav a { font-size: 12px; padding: 9px 0; }
    /* Bouton de recherche sur sa propre ligne, les trois liens en dessous. */
    .sg-nav a.sg-nav-search { flex: 1 1 100%; justify-content: center; margin: 4px 0; padding: 9px 16px; font-size: 13px; }
    .sg-hero { grid-template-columns: minmax(0, 1fr); }
    .sg-hero-copy { padding: 16px 18px 12px; }
    #main_header .sg-hero h1 { font-size: clamp(25px, 6.5vw, 32px); line-height: 1.12; white-space: normal; margin-bottom: 8px; }
    .sg-hero-copy p { font-size: 13px; line-height: 1.45; max-width: none; }
    .sg-hero-link { margin-top: 6px; min-height: 36px; font-size: 13px; }
    .sg-hero-image { min-height: 165px; }
    .sg-hero-image figcaption { padding: 24px 14px 10px; font-size: 11px; }
    .sg-slide-controls { top: 8px; right: 8px; gap: 4px; }
    .sg-search-intro h2 { font-size: 25px; }
    #search > p { margin: 14px 16px 0; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .sg-motion .sg-hero h1, .sg-motion .sg-hero-image .sg-slide { animation: none; }
    .sg-hero-image .sg-slide { transition: none; }
}
@media print {
    body#pmbopac { background: #fff; }
    #container { width: 100%; margin: 0; box-shadow: none; }
    .sg-slide-controls { display: none; }
}

/* Bouton « Réserver ce document » : c'est l'action principale d'une notice,
   elle ne doit pas ressembler à un simple lien de texte. */
#bt_resa {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 48px; margin: 6px 0 14px; padding: 12px 26px;
    border-radius: 999px; background: var(--sg-gold); color: var(--sg-dark);
    border: 2px solid var(--sg-gold); font-size: 16px; font-weight: 700;
    text-decoration: none; box-shadow: 0 4px 12px rgba(24, 48, 35, .25);
    transition: background .15s, color .15s, transform .15s;
}
#bt_resa::before { content: "\1F4D6"; font-size: 18px; }
#bt_resa:hover, #bt_resa:focus-visible {
    background: var(--sg-green); border-color: var(--sg-green); color: #fff;
    transform: translateY(-1px); text-decoration: none;
}
#bt_resa:focus-visible { outline: 3px solid var(--sg-dark); outline-offset: 3px; }

/* Fenêtre de connexion ouverte par la réservation : une carte centrée,
   au lieu de textes blancs posés sur la photo de fond. */
body#pmbopac.popup {
    min-height: 100vh; margin: 0; padding: 16px; box-sizing: border-box;
}
/* Le centrage ne vaut que pour la carte de connexion : appliqué à la page de
   confirmation, il rangeait ses blocs côte à côte. */
body#pmbopac.popup:has(.popup_connexion_empr) {
    display: flex; align-items: center; justify-content: center;
}
body#pmbopac.popup > br { display: none; }
body#pmbopac.popup .popup_connexion_empr {
    width: 100%; max-width: 420px; box-sizing: border-box; padding: 28px 26px;
    background: rgba(255, 255, 255, .97); border-radius: var(--sg-radius);
    border-top: 5px solid var(--sg-gold); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    color: var(--sg-ink);
}
body#pmbopac.popup .popup_connexion_empr h3 {
    margin: 0 0 14px; padding: 0; background: none; color: var(--sg-dark);
    font: 500 21px/1.3 var(--sg-display);
}
body#pmbopac.popup .popup_connexion_empr blockquote { margin: 0; padding: 0; }
body#pmbopac.popup .popup_connexion_empr form { display: flex; flex-direction: column; gap: 6px; }
body#pmbopac.popup #connexion_empr_mandatory { margin: 0 0 6px; padding: 0; background: none; color: var(--sg-muted); font-size: 13px; }
body#pmbopac.popup .popup_connexion_empr label {
    margin-top: 8px; padding: 0; background: none; color: var(--sg-dark); font-size: 14px; font-weight: 600;
}
body#pmbopac.popup .popup_connexion_empr input[type="text"],
body#pmbopac.popup .popup_connexion_empr input[type="password"] {
    width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px;
    border: 1px solid #a4b7aa; border-radius: 4px; background: #fff; color: var(--sg-ink); font-size: 16px;
}
body#pmbopac.popup .password-text-visually { position: relative; }
body#pmbopac.popup .password-text-visually input { padding-right: 48px; }
body#pmbopac.popup #password_visually {
    position: absolute; top: 1px; right: 1px; width: 44px; height: 44px;
    border: 0; background: transparent; color: var(--sg-green); cursor: pointer;
}
body#pmbopac.popup .popup_connexion_empr input.bouton { width: 100%; margin: 14px 0 4px; }
body#pmbopac.popup .popup_connexion_empr a.ask-password {
    display: block; padding: 8px 0; background: none; color: var(--sg-green); text-align: center; font-size: 14px;
}

/* Page de confirmation d'une réservation (même fenêtre) : une feuille blanche
   opaque sur la photo, pour que le titre, le message et la notice se lisent. */
body#pmbopac.popup:not(:has(.popup_connexion_empr)) {
    background-image: linear-gradient(rgba(18, 35, 29, .55), rgba(18, 35, 29, .7)), var(--sg-books);
    background-size: cover; background-attachment: fixed;
    color: var(--sg-ink); font-size: 15px; line-height: 1.5;
}
body#pmbopac.popup:not(:has(.popup_connexion_empr)) > * { max-width: 640px; margin-left: auto; margin-right: auto; }
body#pmbopac.popup:not(:has(.popup_connexion_empr)) > .notification,
body#pmbopac.popup:not(:has(.popup_connexion_empr)) > div:not(.notification):not(.row):not(:empty) {
    background: #fff; box-sizing: border-box;
}
/* Message de réservation : bandeau vert, au lieu de texte rouge sur la photo. */
body#pmbopac.popup .notification {
    margin: 0 auto 0; padding: 18px 22px; background: #fff; border-top: 5px solid var(--sg-gold);
    border-radius: var(--sg-radius) var(--sg-radius) 0 0; color: var(--sg-dark);
}
body#pmbopac.popup .notification [class^="notification-title"] {
    margin: 0 0 6px; color: var(--sg-dark); font: 500 20px/1.3 var(--sg-display);
}
body#pmbopac.popup .notification .row { margin: 0; padding: 0; }
body#pmbopac.popup .notification [class^="notification-message"] {
    display: inline-block; padding: 8px 14px; border-radius: 6px; background: #e7f2ea;
    color: var(--sg-green); font-size: 15px; font-weight: 700;
}
body#pmbopac.popup .notification-error [class^="notification-message"],
body#pmbopac.popup .notification-warning [class^="notification-message"] { background: #fbe9e7; color: #8a1f11; }
/* Notice réservée, juste sous le message, sur la même feuille. */
body#pmbopac.popup #notice, body#pmbopac.popup [id^="el"][id$="Parent"], body#pmbopac.popup [id^="el"][id$="Child"] {
    background: #fff; color: var(--sg-ink);
}
body#pmbopac.popup .notice-parent, body#pmbopac.popup .notice-child, body#pmbopac.popup .notice_corps {
    background: #fff; color: var(--sg-ink); padding: 0 22px;
}
body#pmbopac.popup .notice-heada, body#pmbopac.popup .notice-heada a { color: var(--sg-dark); font-weight: 700; }
body#pmbopac.popup td, body#pmbopac.popup th { color: var(--sg-ink); }
body#pmbopac.popup .notice-child td.labelNotice, body#pmbopac.popup td.labelNotice { color: #fff; }
body#pmbopac.popup a { color: var(--sg-green); }

/* Titre « Ajout d'une réservation » : posé directement sur la photo de fond,
   il doit être clair pour rester lisible (il était vert foncé sur fond sombre). */
body#pmbopac.popup:not(:has(.popup_connexion_empr)) > h3 {
    max-width: 640px; margin: 4px auto 12px; padding: 0; background: none;
    font: 500 22px/1.3 var(--sg-display); text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}
body#pmbopac.popup:not(:has(.popup_connexion_empr)) > h3, body#pmbopac.popup:not(:has(.popup_connexion_empr)) > h3 span { color: #fff; background: none; }
/* Libellés « Titre : », « Auteurs : »… (cellules gris foncé) : texte clair,
   sinon la règle générale des cellules les rend vert foncé sur gris foncé. */
body#pmbopac.popup td.bg-grey, body#pmbopac.popup td.align_right.bg-grey { color: #fff; font-weight: 700; }
