/* =========================================================================
   BIOPOINT - LA SELECTION REPLIEE (selection_repliee.css)
   =========================================================================
   Une longue liste tient sur une ligne : case « Tout », titre et resume,
   fleche qui deplie. Gabarit : templates/_selection_repliee.html ; gestes :
   static/js/selection_repliee.js. Jetons du socle (biopoint.css) seulement.
   ========================================================================= */
.sel-rep {
    border: 1px solid var(--bp-border-strong, #383843);
    border-radius: 12px;
    background: rgba(var(--bp-surface-rgb, 17, 17, 21), .55);
    margin: .5rem 0;
    min-width: 0;
}
.sel-rep.sel-rep-choisi { border-color: rgba(var(--bp-primary-rgb, 18, 87, 214), .55); }
.sel-rep-tete { display: flex; align-items: stretch; min-height: 52px; }
.sel-rep-tout {
    display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0;
    padding: 0 .4rem 0 .85rem; margin: 0; cursor: pointer;
    font-size: var(--bp-fs-small, .8125rem); font-weight: 700; color: var(--bp-text-2, #c3c3cd);
    border-right: 1px solid var(--bp-border, #26262e);
}
.sel-rep-tout input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
.sel-rep-tout span { padding-right: .45rem; }
.sel-rep-bouton {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .6rem;
    padding: .55rem .75rem .55rem .85rem; margin: 0; border: 0; background: transparent;
    color: var(--bp-text, #f3f3f6); text-align: left; cursor: pointer; border-radius: 0 12px 12px 0;
    font: inherit;
}
.sel-rep-lecture .sel-rep-bouton { border-radius: 12px; }
.sel-rep-bouton:hover { background: rgba(var(--bp-primary-rgb, 18, 87, 214), .08); }
.sel-rep-bouton:focus-visible { outline: 2px solid var(--bp-primary-soft, #8fb5ff); outline-offset: -2px; }
.sel-rep-texte { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.sel-rep-titre { font-weight: 700; font-size: var(--bp-fs-ui, .875rem); color: var(--bp-text, #f3f3f6);
                 overflow-wrap: break-word; }
.sel-rep-resume { font-size: var(--bp-fs-small, .8125rem); color: var(--bp-text-3, #9898a6); }
.sel-rep-resume b { color: var(--bp-primary-soft, #8fb5ff); font-variant-numeric: tabular-nums; }
.sel-rep-choisi .sel-rep-etat { color: var(--bp-primary-soft, #8fb5ff); font-weight: 600; }
.sel-rep-chevron {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--bp-primary-rgb, 18, 87, 214), .16); color: var(--bp-primary-soft, #8fb5ff);
    transition: transform var(--bp-duree-2, .2s) var(--bp-courbe, ease);
}
.sel-rep-ouverte > .sel-rep-tete .sel-rep-chevron { transform: rotate(180deg); }
.sel-rep-corps {
    padding: .6rem .75rem .75rem; border-top: 1px solid var(--bp-border, #26262e);
    max-height: min(60vh, 520px); overflow-y: auto; overscroll-behavior: contain;
}
.sel-rep-corps[hidden] { display: none; }
.sel-rep-aide { margin: 0 0 .5rem; font-size: var(--bp-fs-small, .8125rem); color: var(--bp-text-3, #9898a6); }
.sel-rep-recherche { min-height: 44px; margin-bottom: .55rem; position: sticky; top: -.6rem; z-index: 1; }
.sel-rep-masque { display: none !important; }
.sel-rep-vide { margin: .4rem 0 0; font-size: var(--bp-fs-small, .8125rem); color: var(--bp-text-3, #9898a6); }
@media (prefers-reduced-motion: reduce) { .sel-rep-chevron { transition: none; } }
@media (max-width: 575.98px) {
    .sel-rep-tout { padding-left: .7rem; }
    .sel-rep-bouton { padding-left: .7rem; padding-right: .6rem; }
    .sel-rep-corps { max-height: 70vh; padding: .55rem .6rem .65rem; }
}
/* Au telephone, la case seule : le resume dit deja « Tous sélectionnés ». */
@media (max-width: 575.98px) { .sel-rep-long { display: none; } .sel-rep-tout { padding-right: .25rem; } }
/* Une liste a lire (des noms) : en colonnes, sans case. */
.sel-rep-noms { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem .9rem;
                grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
                font-size: var(--bp-fs-small, .8125rem); color: var(--bp-text-2, #c3c3cd); }
.sel-rep-noms li { min-width: 0; overflow-wrap: anywhere; padding: .2rem 0; }
/* A l'impression, la liste complete : rien ne reste replie sur le papier. */
@media print {
    .sel-rep-corps[hidden] { display: block !important; }
    .sel-rep-corps { max-height: none; overflow: visible; }
    .sel-rep-tout, .sel-rep-chevron, .sel-rep-recherche { display: none !important; }
}
/* Une liste plafonnee (« 6 maximum ») : pas de case « Tout », la fleche prend la ligne. */
.sel-rep-plafond .sel-rep-bouton { border-radius: 12px; }
.sel-rep-limite { color: var(--bp-warning, #fbbf24); font-weight: 600; }
