/* Atelia · console · réglage des bons d'avis (screens/bons-avis.js) : dans « Paramètres du restaurant » et dans l'onglet
   Réputation de la page d'un restaurant (carte « Bons d'avis »). Lisible de 390 px à 1280 px, sans défilement horizontal. */
.ba { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ba-groupe { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ba-groupe legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.ba-groupe[aria-invalid="true"] .ba-puce span { border-color: var(--rouge); }
.ba-etoiles, .ba-cibles { display: flex; flex-wrap: wrap; gap: 6px; }
.ba-puce { position: relative; display: inline-flex; cursor: pointer; }
.ba-puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ba-puce span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill, 999px); background: var(--surface); font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ba-puce input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.ba-puce input:focus-visible + span { box-shadow: 0 0 0 3px rgba(36,86,196,.3); }
.ba-puce input:disabled + span { opacity: .55; cursor: default; }
.ba-paliers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ba-palier { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; border: 1px solid var(--line-2, var(--line)); border-radius: 10px; background: var(--surface); min-width: 0; }
.ba-de, .ba-bon { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ba-montant { display: inline-flex; align-items: center; gap: 4px; }
.ba-montant input { width: 84px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; text-align: right; background: var(--surface); color: var(--ink); }
.ba-montant input[aria-invalid="true"] { border-color: var(--rouge); background: var(--rouge-bg); }
.ba-unite, .ba-mot, .ba-plus { font-size: 13.5px; color: var(--muted); }
.ba-plus { font-weight: 700; color: var(--ink); }
.ba-calcule { display: inline-flex; align-items: center; min-height: 34px; padding: 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.ba-fleche { color: var(--muted); font-weight: 700; }
.ba-retirer { margin-left: auto; }
.ba-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ba-err { margin: 0; min-height: 0; font-size: 13px; font-weight: 600; color: var(--rouge); }
.ba-err:empty { display: none; }
.ba-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink); width: fit-content; position: relative; }
.ba-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ba-piste { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line); transition: background .15s; flex: none; }
.ba-piste::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(22,36,63,.3); transition: transform .15s; }
.ba-switch input:checked + .ba-piste { background: var(--accent); }
.ba-switch input:checked + .ba-piste::after { transform: translateX(16px); }
.ba-switch input:focus-visible + .ba-piste { box-shadow: 0 0 0 3px rgba(36,86,196,.3); }
.ba-switch input:disabled + .ba-piste { opacity: .55; }
/* Règles (22/10, point 31) : chaque règle dans son cadre, titre lisible (« 5 étoiles · habitués ») et bouton « Retirer cette règle ». */
.ba-regles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ba-regle { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, var(--surface)); min-width: 0; }
.ba-regle-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
/* 04/11 : la carte à part « Avoir Deliveroo » (règle d'avoir propre à Deliveroo), même cadre qu'une règle. */
.ba-dlv { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, var(--surface)); min-width: 0; }
.ba-dlv-ligne { list-style: none; }
.ba-regle-titre { min-width: 0; font-size: 14px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.ba-regle-num { margin-right: 8px; color: var(--muted); font-weight: 700; }
.ba-retirer-regle { margin-left: auto; }
/* 27/10 : avoir Deliveroo par palier (liste « Avoir Deliveroo »), sur une règle « Les deux » seulement ; bon d'Uber Eats choisi dans
   une liste (5, 10 ou 18 €, « À choisir » pour un autre montant lu). */
.ba-avoir { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ba-avoir[hidden] { display: none; }
.ba-avoir select, .ba-bon select { min-height: 34px; max-width: 100%; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; background: var(--surface); color: var(--ink); }
.ba-avoir select[aria-invalid="true"], .ba-bon select[aria-invalid="true"] { border-color: var(--rouge); background: var(--rouge-bg); }
.ba-avoir select:disabled, .ba-bon select:disabled { opacity: .55; }
.ba-aide { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.ba-aide[hidden] { display: none; }
.ba-carte .card-b { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ba-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 10px; }
.ba-pied [data-ba-compte] { margin-right: auto; font-size: 13px; }
.ba-ok { border-color: var(--vert-bd); background: var(--vert-bg); color: var(--vert); }
@media (max-width: 520px) {
  .ba-palier { padding: 8px; }
  .ba-regle { padding: 10px 8px; }
  .ba-retirer { margin-left: 0; }
  .ba-montant input { width: 76px; }
  .ba-avoir { flex-basis: 100%; }
}
