/* ══════════════════════════════════════════════════════════════════════════
   offres.css — Générateur d'offres à la carte (/offres)
   Conçu mobile d'abord : une colonne, cibles tactiles ≥ 44px, récapitulatif
   collant en bas d'écran pour que le total reste visible pendant le choix.
   ══════════════════════════════════════════════════════════════════════════ */
.bo-page {
  --bo-navy:   #13294B;
  --bo-blue:   #184280;
  --bo-amber:  #F5B935;
  --bo-green:  #22B14C;
  --bo-muted:  #6B7A90;
  --bo-line:   #DDE4EF;
  --bo-soft:   #F4F7FB;
  --bo-font:   'Jost', system-ui, sans-serif;
  max-width: 760px;
  margin: 0 auto;
  padding: 104px 16px 190px;   /* place pour l'en-tête fixe + le récap collant */
  font-family: var(--bo-font);
  color: var(--bo-navy);
}

/* ── En-tête ── */
.bo-head { text-align: center; margin-bottom: 28px; }
.bo-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bo-amber); margin: 0 0 6px;
}
.bo-title { font-size: clamp(26px, 6vw, 38px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.bo-sub { font-size: 15px; line-height: 1.5; color: var(--bo-muted); margin: 0; }

/* ── Étapes ── */
/* ⚠️ Ce sont des <section> : styles.css leur impose `padding: 80px 0`,
   ce qui ajoutait 160px de vide par étape. On remet le rembourrage à zéro. */
.bo-page .bo-step { padding: 0; margin-bottom: 26px; }
.bo-step__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bo-step__num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--bo-blue); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.bo-step__head h2 { font-size: 17px; font-weight: 700; margin: 0; }
.bo-hint { font-size: 13px; color: var(--bo-muted); margin: -4px 0 12px; }

/* ── Choix de l'infofiche : pastilles ── */
.bo-fiches { display: flex; flex-wrap: wrap; gap: 8px; }
.bo-fiche { position: relative; cursor: pointer; }
.bo-fiche input { position: absolute; opacity: 0; width: 0; height: 0; }
.bo-fiche__name {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--bo-line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--bo-navy);
  transition: border-color .15s, background-color .15s, color .15s;
}
.bo-fiche input:checked + .bo-fiche__name { background: var(--bo-blue); border-color: var(--bo-blue); color: #fff; }
.bo-fiche input:focus-visible + .bo-fiche__name { outline: 3px solid rgba(245,185,53,.55); outline-offset: 2px; }

/* ── Carte d'option ── */
.bo-offers { display: flex; flex-direction: column; gap: 12px; }
.bo-offer {
  border: 1.5px solid var(--bo-line); border-radius: 16px; background: #fff;
  padding: 14px; transition: border-color .16s, box-shadow .16s;
}
.bo-offer.is-on { border-color: var(--bo-blue); box-shadow: 0 8px 22px -14px rgba(24,66,128,.55); }
.bo-offer__top { display: flex; align-items: flex-start; gap: 12px; }
.bo-offer__ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  background: var(--bo-soft); color: var(--bo-blue);
  display: grid; place-items: center; font-size: 21px;
}
.bo-offer.is-on .bo-offer__ic { background: var(--bo-blue); color: #fff; }
.bo-offer__id { flex: 1 1 auto; min-width: 0; }
.bo-offer__id h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 3px; }
.bo-offer__id p { font-size: 13px; line-height: 1.45; color: var(--bo-muted); margin: 0; }
.bo-offer__owned {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 10px 0 0; padding: 8px 10px; border-radius: 9px;
  background: #EAF7EF; color: #17703A; font-size: 12.5px; line-height: 1.4;
}
.bo-offer__owned ion-icon { flex: 0 0 auto; font-size: 15px; margin-top: 1px; }

/* Interrupteur */
.bo-switch { flex: 0 0 auto; position: relative; cursor: pointer; padding: 4px; }
.bo-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.bo-switch__track {
  display: block; width: 46px; height: 27px; border-radius: 999px;
  background: #CBD5E4; transition: background-color .18s;
}
.bo-switch__dot {
  display: block; width: 21px; height: 21px; margin: 3px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s;
}
.bo-switch input:checked + .bo-switch__track { background: var(--bo-green); }
.bo-switch input:checked + .bo-switch__track .bo-switch__dot { transform: translateX(19px); }
.bo-switch input:focus-visible + .bo-switch__track { outline: 3px solid rgba(245,185,53,.55); outline-offset: 2px; }

/* ── Paliers ── */
.bo-tiers {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--bo-line);
}
.bo-tiers[hidden] { display: none; }
.bo-tier { position: relative; cursor: pointer; }
.bo-tier input { position: absolute; opacity: 0; width: 0; height: 0; }
.bo-tier__box {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 68px; padding: 8px 6px;
  border: 1.5px solid var(--bo-line); border-radius: 12px; background: #fff;
  transition: border-color .15s, background-color .15s;
}
.bo-tier__val { font-size: 15px; font-weight: 700; line-height: 1.1; }
.bo-tier__val small { display: block; font-size: 11px; font-weight: 500; color: var(--bo-muted); }
.bo-tier__price { font-size: 13px; font-weight: 700; color: var(--bo-blue); }
.bo-tier__off {
  position: absolute; top: -8px; right: -4px;
  background: var(--bo-amber); color: var(--bo-navy);
  font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 999px;
}
.bo-tier input:checked + .bo-tier__box { border-color: var(--bo-blue); background: #EEF4FE; }
.bo-tier input:checked + .bo-tier__box .bo-tier__val { color: var(--bo-blue); }
.bo-tier input:focus-visible + .bo-tier__box { outline: 3px solid rgba(245,185,53,.55); outline-offset: 2px; }

/* ── Combos ── */
.bo-combos { display: flex; flex-direction: column; gap: 10px; }
.bo-combo {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 13px 14px; border: 1.5px dashed var(--bo-blue); border-radius: 14px;
  background: #F7FAFF; color: var(--bo-navy); cursor: pointer; font-family: inherit;
  transition: background-color .15s;
}
.bo-combo:hover { background: #EEF4FE; }
.bo-combo__title { font-size: 15px; font-weight: 700; }
.bo-combo__desc { font-size: 12.5px; color: var(--bo-muted); }
.bo-combo__off { font-size: 12.5px; font-weight: 700; color: var(--bo-green); }

/* ── Récapitulatif collant ── */
.bo-summary {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--bo-line);
  box-shadow: 0 -8px 26px -18px rgba(19,41,75,.6);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px;
}
.bo-summary__toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: inherit; color: var(--bo-navy);
}
.bo-summary__count { flex: 1 1 auto; text-align: left; font-size: 13.5px; color: var(--bo-muted); }
.bo-summary__total { font-size: 20px; font-weight: 800; }
.bo-summary__toggle ion-icon { font-size: 16px; color: var(--bo-muted); transition: transform .2s; }
.bo-summary.is-open .bo-summary__toggle ion-icon { transform: rotate(180deg); }
.bo-summary__detail { max-height: 42vh; overflow-y: auto; }
.bo-summary__detail ul { list-style: none; margin: 0 0 6px; padding: 0; }
.bo-summary__detail li,
.bo-summary__row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; padding: 5px 0; margin: 0;
  border-bottom: 1px solid #F0F3F8;
}
.bo-summary__detail li em { font-style: normal; color: var(--bo-muted); }
.bo-summary__row--save { color: var(--bo-green); font-weight: 700; border-bottom: 0; }
#boComboRow { color: var(--bo-blue); font-weight: 600; }

/* ── Boutons ── */
.bo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: background-color .16s, opacity .16s;
}
.bo-btn--primary { background: var(--bo-blue); color: #fff; }
.bo-btn--primary:hover { background: #143767; color: #fff; }
.bo-btn:disabled { opacity: .45; cursor: not-allowed; }
.bo-summary__go { width: 100%; }

/* ── Aucun infofiche ── */
.bo-empty { text-align: center; padding: 40px 16px; }
.bo-empty p { font-size: 15px; color: var(--bo-muted); margin: 0 0 16px; }

/* ── À partir de la tablette : les options passent sur 2 colonnes ── */
@media (min-width: 720px) {
  .bo-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bo-summary {
    left: 50%; right: auto; bottom: 18px; transform: translateX(-50%);
    width: min(724px, calc(100vw - 32px));
    border: 1px solid var(--bo-line); border-radius: 18px;
    padding: 12px 18px;
    flex-direction: row; align-items: center; gap: 16px;
  }
  .bo-summary__toggle { width: auto; flex: 1 1 auto; }
  .bo-summary__go { width: auto; flex: 0 0 auto; }
  .bo-summary__detail {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
    background: #fff; border: 1px solid var(--bo-line); border-radius: 14px;
    padding: 12px 16px; box-shadow: 0 16px 40px -22px rgba(19,41,75,.65);
  }
}

/* ── Récapitulatif de commande (/offres-commander) ── */
.bo-recap { border: 1.5px solid var(--bo-line); border-radius: 16px; background: #fff; padding: 6px 16px; }
.bo-recap__line {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid #F0F3F8; font-size: 14.5px;
}
.bo-recap__line em { display: block; font-style: normal; font-size: 12.5px; color: var(--bo-muted); }
.bo-recap__price { flex: 0 0 auto; font-weight: 700; white-space: nowrap; }
.bo-recap__price s { color: var(--bo-muted); font-weight: 500; margin-right: 6px; }
.bo-recap__line--combo { color: var(--bo-blue); }
.bo-recap__line--save { color: var(--bo-green); font-weight: 700; }
.bo-recap__total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 0 6px; font-size: 20px; font-weight: 800;
}
.bo-recap__htg { margin: 0 0 14px; font-size: 12.5px; color: var(--bo-muted); }
.bo-recap__actions { display: flex; gap: 10px; margin-top: 18px; }
.bo-recap__pay { flex: 1 1 auto; }
.bo-recap__pay .bo-btn { width: 100%; }
.bo-btn--ghost { background: #fff; border: 1.5px solid var(--bo-line); color: var(--bo-navy); flex: 0 0 auto; }
.bo-btn--ghost:hover { background: var(--bo-soft); color: var(--bo-navy); }
@media (max-width: 480px) { .bo-recap__actions { flex-direction: column-reverse; } .bo-btn--ghost { width: 100%; } }
