/* Page /best-basket/ : complete charte.css (mise en page proche des calculateurs). */
.bb-title h1, .bb-title p { margin: 0; }
.bb-title h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.bb-title p { max-width: 50rem; margin-top: .55rem; color: var(--text-muted); }
.bb-grid { display: grid; gap: 1rem; align-items: start; margin-top: 1.25rem; }
/* Formulaire en haut sur toute la largeur (panier a gauche, livraison a droite), resultats dessous en pleine largeur : plus de colonne figee a gauche. */
@media (min-width: 900px) { .bb-form { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } .bb-form > fieldset:first-child { grid-row: 1 / span 3; } }
.bb-share { display: grid; gap: .4rem; } .bb-share input { width: 100%; box-sizing: border-box; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .45rem .6rem; font: inherit; }
@media (min-width: 900px) { #bb-res .bb-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: .6rem; } }
.bb-form, .bb-result, .bb-notes { display: grid; gap: .9rem; padding: 1rem; min-width: 0; }
.bb-notes { margin-top: 1rem; } .bb-notes h2, .bb-notes p { margin: 0; }
.bb-form fieldset { border: 1px solid var(--border); border-radius: var(--radius-md); margin: 0; padding: .75rem .85rem .85rem; display: grid; gap: .6rem; min-width: 0; }
.bb-form legend { padding: 0 .35rem; font-weight: 600; color: var(--accent-text); }
.bb-form label { display: grid; gap: .25rem; font-size: .88rem; color: var(--soft); min-width: 0; }
.bb-form input:not([type=checkbox]), .bb-form select { width: 100%; box-sizing: border-box; background: var(--field); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .45rem .55rem; font: inherit; }
.bb-form input:focus-visible, .bb-form select:focus-visible, .bb-btn:focus-visible, .bb-lines button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bb-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: .6rem; }
.bb-check { display: flex !important; flex-direction: row; align-items: center; gap: .5rem; }
.bb-check input { width: auto; margin: 0; }
.bb-btn { font: inherit; padding: .5rem .9rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--field); color: var(--text); cursor: pointer; }
.bb-btn:disabled { opacity: .5; cursor: not-allowed; }
.bb-primary { background: var(--accent); color: var(--accent-ink, #fff); border-color: var(--accent); font-weight: 600; }
.bb-hint, .bb-msg { margin: 0; font-size: .82rem; color: var(--muted); }
.bb-msg:empty { display: none; }
.bb-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.bb-lines li { display: flex; align-items: center; gap: .5rem; padding: .4rem .55rem; border: 1px solid var(--border); border-radius: var(--radius-md); }
.bb-lines .bb-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.bb-lines input { width: 5.2rem !important; flex: none; }
.bb-lines button { flex: none; font: inherit; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: var(--radius-md); padding: .3rem .6rem; }
.bb-verdict { margin: 0; padding: .7rem .85rem; font-weight: 600; border: 1px solid var(--border); border-radius: var(--radius-md); }
.bb-verdict[data-state="ok"] { background: var(--ok-fill); border-color: var(--ok-line); }
.bb-verdict[data-state="warn"] { background: var(--warn-fill); border-color: var(--warn-line); }
.bb-verdict[data-state="bad"] { background: var(--danger-fill); border-color: var(--danger-line); }
#bb-res { display: grid; gap: 1.1rem; min-width: 0; }
#bb-res h2 { margin: 0; font-size: 1.1rem; } #bb-res h3 { margin: 0; font-size: .95rem; color: var(--soft); }
.bb-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: .7rem .8rem; display: grid; gap: .5rem; min-width: 0; }
.bb-card[data-top] { border-color: var(--ok-line); }
.bb-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .8rem; }
.bb-head strong { overflow-wrap: anywhere; }
.bb-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.bb-badge { display: inline-block; white-space: nowrap; line-height: 1.5; margin-left: .3rem; padding: 0 .45rem; border-radius: 999px; font-size: .72rem; border: 1px solid currentColor; opacity: .85; font-weight: 500; }
.bb-wrap { overflow-x: auto; }
.bb-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.bb-table th, .bb-table td { padding: .35rem .4rem; text-align: right; border-bottom: 1px solid var(--border); vertical-align: top; }
.bb-table th:first-child, .bb-table td:first-child { text-align: left; }
.bb-table td { font-variant-numeric: tabular-nums; }
.bb-sub { display: block; font-size: .76rem; color: var(--muted); }
.bb-sums { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .88rem; justify-content: flex-end; }
.bb-list { margin: 0; padding-left: 1.1rem; font-size: .88rem; }
@media (max-width: 520px) {
  .bb-row { grid-template-columns: 1fr; }
  .bb-table { font-size: .74rem; } .bb-table th, .bb-table td { padding: .3rem .2rem; }
}
