/* Base pilotes de l'espace organisateur (pro-pilotes.js). Charte « Corde » (DESIGN.md) : blanc sur gris clair, carbone pour
   les données, rouge seulement pour l'action ; chiffres Manrope tabulaires. Reprend bt-bloc / bt-table (pro-billetterie.css)
   et le tiroir pg-tiroir (pro-gestion.css) ; préfixe bp-. Téléphone : lignes empilées dès 767 px, rien ne déborde à 320 px. */

/* ---------------------------------------------------------------- en-tête */
.bp-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.bp-tete > div:first-child { min-width: 0; flex: 1 1 420px; }
.bp-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 10px 0 0; font: 600 14px/1.4 var(--f-text); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bp-resume .ps-demo { flex-basis: 100%; max-width: max-content; }
.bp-tete-act { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-tete-act .btn, .bp-f-act .btn, .bp-dbl-act .btn, .bp-vide .btn { display: inline-flex; align-items: center; gap: 7px; }
.bp-tete-act .ico, .bp-dbl-act .ico, .bp-vide .ico { width: 17px; height: 17px; }

/* ---------------------------------------------------------------- filtres */
.bp-liste-b { padding-top: 16px; }
.bp-filtres { display: grid; grid-template-columns: minmax(0, 2fr) repeat(5, minmax(0, 1fr)); align-items: end; gap: 10px 12px; margin: 0 0 14px; }
.bp-filtres select, .bp-filtres input[type=search] { width: 100%; min-height: 42px; }
.bp-q-c { position: relative; display: block; }
.bp-q-c .ico { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; color: var(--ink-3); pointer-events: none; }
.bp-q-c input { padding-left: 35px; }
.bp-chk { grid-column: 1 / 2; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font: 600 14px var(--f-text); color: var(--ink-2); cursor: pointer; }
.bp-chk input { width: 18px; height: 18px; margin: 0; accent-color: var(--red-deep); }
.bp-raz { justify-self: start; }
.bp-raz[hidden] { display: none; }

/* ---------------------------------------------------------------- liste */
.bp-compte { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; font: 600 13.5px var(--f-text); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bp-table-w { margin: 0 -22px; border-left: 0; border-right: 0; border-radius: 0; }
.bp-table th:first-child, .bp-table td:first-child { padding-left: 22px; }
.bp-table th:last-child, .bp-table td:last-child { padding-right: 22px; }
.bp-table thead th { padding-top: 0; padding-bottom: 0; height: 40px; vertical-align: middle; }
.bp-table thead th.n .bp-tri { justify-content: flex-end; }
.bp-tri { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 40px; padding: 0; border: 0; background: none; font: inherit; color: inherit; white-space: nowrap; cursor: pointer; }
.bp-tri .ico { width: 14px; height: 14px; opacity: .45; transition: opacity .15s; }
.bp-tri:hover { color: var(--ink); }
.bp-tri:hover .ico, .bp-tri.actif .ico { opacity: 1; }
.bp-tri.actif { color: var(--ink); font-weight: 700; }
.bp-table tbody tr { cursor: pointer; transition: background .15s; }
.bp-table tbody tr:hover { background: var(--paper); }
.bp-table tbody tr:focus-within { background: var(--paper); }
.bp-table tbody th { min-width: 210px; max-width: 340px; font-weight: 500; }
.bp-nom { display: inline; padding: 0; border: 0; background: none; font: 700 14.5px/1.3 var(--f-text); color: var(--ink); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.bp-nom:hover { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; }
.bp-meta { display: grid !important; gap: 1px; }
.bp-meta > span { min-width: 0; overflow-wrap: anywhere; }
.bp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.bp-tag { display: inline-flex; align-items: center; gap: 2px; min-height: 22px; padding: 0 8px; border-radius: 99px; background: var(--paper-2); font: 600 12px/1 var(--f-text); color: var(--ink-2); white-space: nowrap; }
.bp-alerte { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px 0 6px; border-radius: 99px; background: var(--danger-bg); font: 600 12px/1 var(--f-text); color: var(--red-hover, #b42318); white-space: nowrap; }
.bp-alerte .ico { width: 14px; height: 14px; }
.bp-ico-note { display: inline-grid; place-items: center; width: 22px; height: 22px; color: var(--ink-3); }
.bp-ico-note .ico { width: 15px; height: 15px; }
.bp-table td b.bt-num { font-weight: 700; white-space: nowrap; }
.bp-proch { color: var(--green) !important; font-weight: 600 !important; }
.bp-table tbody td:nth-of-type(1) { min-width: 150px; }
.bp-loin { color: var(--yellow-ink); font-weight: 700; }
.bp-plus { margin: 14px 0 0; text-align: center; }

/* fidélité : carbone plein pour les fidèles, contour pour les revenus, gris pour une première journée */
.bp-niv { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border: 1px solid transparent; border-radius: 99px; font: 700 12px/1 var(--f-text); white-space: nowrap; }
.bp-niv.fidele { background: var(--ink); color: #fff; }
.bp-niv.revenu { border-color: var(--ink); color: var(--ink); }
.bp-niv.premiere { background: var(--paper-2); color: var(--ink-2); }
.bp-niv.nouveau { border: 1px dashed var(--rule-strong); color: var(--ink-3); }

/* chargement */
.bp-sq { display: grid; gap: 8px; padding: 6px 0; }
.bp-sq span { height: 44px; border-radius: 8px; background: linear-gradient(90deg, var(--paper) 0%, var(--paper-2) 50%, var(--paper) 100%); background-size: 200% 100%; animation: bp-luit 1.3s ease-in-out infinite; }
@keyframes bp-luit { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .bp-sq span { animation: none; } }

/* vide */
.bp-vide { padding: 18px 0 8px; max-width: 64ch; }
.bp-vide p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.bp-vide b { color: var(--ink); font: 800 17px/1.3 var(--f-display); }
.bp-vide-g { padding: 26px 0 14px; }

/* ---------------------------------------------------------------- fiche (tiroir) */
.bp-tiroir .pg-t-tete p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bp-tiroir .pg-t-tete p > span:not(.bp-niv) { font-size: 13.5px; color: var(--ink-3); }
.bp-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 6px; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.bp-chiffres > div { min-width: 0; padding: 10px 12px; }
.bp-chiffres > div + div { border-left: 1px solid var(--rule); }
.bp-chiffres dt { font: 600 12px/1.25 var(--f-text); color: var(--ink-3); }
.bp-chiffres dd { margin: 3px 0 0; font: 800 20px/1.1 var(--f-display); letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.bp-f-s { padding: 18px 0 2px; border-top: 1px solid var(--paper-2); }
.bp-f-s:first-of-type { border-top: 0; }
.bp-f-s h3 { margin: 0 0 10px; font: 800 15.5px/1.25 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.bp-f-s > p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.bp-ident { display: grid; gap: 6px; margin: 0 0 8px; }
.bp-ident > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px; font-size: 14px; }
.bp-ident dt { color: var(--ink-3); }
.bp-ident dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.bp-aide { margin: 6px 0 0; max-width: 72ch; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.bp-f-int { display: grid; gap: 10px; }
.bp-f-int textarea { width: 100%; resize: vertical; }
.bp-etiq { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.bp-etiq .bp-tag { min-height: 26px; font-size: 12.5px; padding-right: 3px; }
.bp-etiq .bp-tag:not(:has(button)) { padding-right: 9px; }
.bp-etiq .bp-tag button { display: grid; place-items: center; width: 22px; height: 22px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; }
.bp-etiq .bp-tag button:hover { background: var(--rule); color: var(--ink); }
.bp-etiq .bp-tag .ico { width: 13px; height: 13px; }
.bp-etiq-aj { display: flex; align-items: flex-end; gap: 8px; }
.bp-etiq-aj .fld { flex: 1 1 auto; }
.bp-etiq-aj .btn { min-height: 42px; }
.bp-f-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 0; }
.bp-ok { font: 600 13.5px var(--f-text); color: var(--green); }
.bp-jours { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.bp-jours li { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--paper-2); }
.bp-jours li:first-child { border-top: 0; }
.bp-j-d { font: 700 14px/1.35 var(--f-text); color: var(--ink); white-space: nowrap; }
.bp-j-t { min-width: 0; }
.bp-j-t b { display: block; font: 600 14px/1.35 var(--f-text); color: var(--ink); }
.bp-j-t small { display: block; font-size: 12.5px; color: var(--ink-3); }
.bp-j-e { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; }
.bp-j-e:empty { display: none; }
.bp-jours li.fictif .bp-j-d, .bp-jours li.fictif .bp-j-t b { color: var(--ink-3); font-weight: 500; }
.bp-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 99px; background: var(--paper-2); font: 600 12px/1.2 var(--f-text); color: var(--ink-2); }
.bp-badge.ok { background: var(--green-2); color: var(--green); }
.bp-badge.attente { background: var(--warn-bg); color: var(--yellow-ink); }
.bp-badge.avenir { background: var(--ink); color: #fff; }
.bp-f-retrait { margin-top: 10px; }
.bp-danger { background: var(--red-hover, #b42318) !important; border-color: var(--red-hover, #b42318) !important; color: #fff !important; }
.bp-danger-l { color: var(--red-hover, #b42318) !important; }
.bp-conf { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.bp-conf[hidden] { display: none; }
.bp-conf p { margin: 0 0 8px; font-size: 14px; color: var(--ink); }
.bp-conf-b { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 !important; }

/* ---------------------------------------------------------------- doublons */
.bp-dbl { margin: 0 0 14px; padding: 12px 14px 4px; border: 1px solid var(--rule); border-radius: 10px; }
.bp-dbl legend { padding: 0 6px; font: 800 15px var(--f-display); color: var(--ink); }
.bp-dbl-l { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--paper-2); cursor: pointer; }
.bp-dbl-l:first-of-type { border-top: 0; }
.bp-dbl-l input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--red-deep); flex: none; }
.bp-dbl-l b { display: block; font: 600 14px var(--f-text); color: var(--ink); overflow-wrap: anywhere; }
.bp-dbl-l small { display: block; font-size: 12.5px; color: var(--ink-3); }
.bp-dbl-act { margin: 6px 0 10px; }
.bp-ok-l { margin: 4px 0 10px; font: 600 14px var(--f-text); color: var(--green); }
.bp-dbl-ap { margin: 4px 0 8px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper-2); }
.bp-dbl-ap h4 { margin: 0 0 8px; font: 700 14.5px var(--f-display); color: var(--ink); }
.bp-dbl-ap h4:focus { outline: none; }
.bp-dbl-fiche { display: grid; gap: 4px; margin: 0 0 8px; }
.bp-dbl-fiche div { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); gap: 8px; font-size: 13.5px; }
.bp-dbl-fiche dt { color: var(--ink-3); }
.bp-dbl-fiche dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.bp-dbl-liste { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.bp-dbl-liste li { margin: 2px 0; overflow-wrap: anywhere; }
.bp-dbl-def { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; font: 600 13.5px/1.4 var(--f-text); color: var(--red-deep); }
.bp-dbl-def .ico { flex: none; width: 17px; height: 17px; margin-top: 1px; }

/* ---------------------------------------------------------------- import */
.bp-depot { position: relative; display: block; cursor: pointer; }
.bp-depot input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.bp-depot > span { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; border: 1.5px dashed var(--rule-strong); border-radius: 12px; background: var(--paper); text-align: center; transition: border-color .15s, background .15s; }
.bp-depot:hover > span { border-color: var(--ink-3); background: #fff; }
.bp-depot input:focus-visible + span { outline: 2px solid var(--red-deep); outline-offset: 2px; }
.bp-depot .ico { width: 24px; height: 24px; color: var(--ink-2); }
.bp-depot b { font: 700 15px var(--f-text); color: var(--ink); }
.bp-depot small { font-size: 12.5px; color: var(--ink-3); }
.bp-imp-z { margin-top: 16px; }
.bp-imp-n { margin: 0 0 12px; font: 600 14px var(--f-text); color: var(--ink); }
.bp-map fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.bp-map legend { padding: 0; font: 800 15.5px var(--f-display); color: var(--ink); }
.bp-map-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 12px 0 0; }
.bp-map-g select { width: 100%; }
.bp-imp-ap { margin: 14px 0 0; }
.bp-imp-ap summary { cursor: pointer; font: 600 14px/32px var(--f-text); color: var(--ink-2); }
.bp-imp-ap .bt-table td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.bp-map .bp-f-act { margin-top: 16px; }
.bp-rapport { padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.bp-rapport p { margin: 0 0 6px; }
.bp-rapport ul { margin: 0 0 10px; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.bp-rapport summary { cursor: pointer; font: 600 13.5px var(--f-text); color: var(--ink-2); margin-bottom: 6px; }
.bp-err-l { max-height: 220px; overflow-y: auto; font-size: 13px !important; }

/* ---------------------------------------------------------------- conservation */
.bp-conserv .bt-bloc-h a { font: 600 14px var(--f-text); color: var(--red-deep); text-underline-offset: 3px; }
.bp-cons-g { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px 32px; align-items: start; }
.bp-cons-t p { margin: 0 0 8px; max-width: 70ch; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.bp-cons-f .fld { max-width: 320px; }
.bp-cons-f select { width: 100%; }

/* ---------------------------------------------------------------- tablette */
@media (max-width: 1100px) {
  .bp-filtres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bp-filtres .bp-q { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- téléphone : lignes empilées */
@media (max-width: 767px) {
  .bp-tete-act { width: 100%; }
  .bp-tete-act .btn { flex: 1 1 auto; justify-content: center; }
  .bp-filtres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-chk { grid-column: 1 / -1; }
  .bp-table-w { margin: 0 -14px; overflow: visible; }
  .bp-table, .bp-table tbody, .bp-table tr { display: block; }
  .bp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bp-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 14px; border-top: 1px solid var(--bt-line, var(--paper-2)); }
  .bp-table tbody th, .bp-table tbody td { display: block; min-width: 0 !important; max-width: none; padding: 0 !important; border: 0; text-align: left !important; white-space: normal; }
  .bp-table tbody th { grid-column: 1 / -1; }
  .bp-table tbody td::before { content: attr(data-l); display: block; margin-bottom: 1px; font: 600 11.5px/1.2 var(--f-text); color: var(--ink-3); }
  .bp-table tbody td:nth-of-type(1) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
  .bp-table tbody td:nth-of-type(1)::before { flex-basis: 100%; }
  .bp-table tbody td:nth-of-type(1) small { display: inline; margin: 0; }
  .bp-table tbody td:last-child { grid-column: 1 / -1; }
  .bp-table tbody td:last-child::before { display: none; }
  .bp-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-chiffres > div:nth-child(3) { border-left: 0; }
  .bp-chiffres > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .bp-ident > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bp-jours li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bp-j-e { grid-column: 1; }
  .bp-map-g, .bp-cons-g { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 359px) {
  .bp-filtres { grid-template-columns: minmax(0, 1fr); }
  .bp-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- reprise de l'historique (import : RGPD, nature, aperçu, annulation) */
.bp-imp-rgpd { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--rule); border-left: 3px solid var(--red-deep); border-radius: 10px; background: var(--paper); }
.bp-imp-rgpd .ico { width: 20px; height: 20px; color: var(--red-deep); margin-top: 1px; }
.bp-imp-rgpd p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); max-width: 70ch; }
.bp-imp-rgpd p:last-child { margin-bottom: 0; }
.bp-imp-rgpd b { color: var(--ink); }
.bp-imp-der { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 10px; }
.bp-imp-der p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.bp-imp-der .bp-conf { flex-basis: 100%; }
.bp-imp-annule, .bp-imp-bw { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--paper-2); font: 600 12px/20px var(--f-text); color: var(--ink-2); }
.bp-imp-nat { margin: 0 0 16px !important; }
.bp-radio { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; font-size: 14px; color: var(--ink); cursor: pointer; }
.bp-radio input { margin-top: 3px; accent-color: var(--red-deep); }
.bp-imp-sim { margin-top: 16px; }
.bp-imp-res .bt-table-w { margin: 4px 0 10px; }
.bp-imp-t td { vertical-align: top; }
.bp-imp-t td small { display: block; font-size: 12px; color: var(--ink-3); }
.bp-imp-t .bp-imp-e { white-space: normal; }
.bp-imp-e { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 600 12px/20px var(--f-text); background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.bp-imp-e.nouveau { background: #e6f2ea; color: #1d5a33; }
.bp-imp-e.email_partage { background: #fdf1dc; color: #7a4b00; }
.bp-imp-e.ignore { background: #f6e3e1; color: #8a2a20; }
.bp-imp-demo { margin: 6px 0 0; font: 600 13.5px var(--f-text); color: var(--ink-2); }
@media (max-width: 767px) {
  .bp-map-g { grid-template-columns: minmax(0, 1fr); }
  .bp-imp-der .btn { width: 100%; justify-content: center; }
}
