/* =========================================================
   LP RÉSERVATION — CSS AUTONOME (aucune dépendance externe)
   Charte : bleu #0056b3 / vert éco #82bc00 / sombre #0f172a
   Tout est préfixé .lpx- pour éviter tout conflit avec le thème.
   ========================================================= */

.lpx-wrap {
  --lpx-blue: #0056b3;
  --lpx-blue-dark: #044a97;
  --lpx-blue-light: #eaf2fb;
  --lpx-green: #82bc00;
  --lpx-green-dark: #6da000;
  --lpx-green-light: #f1f8e2;
  --lpx-dark: #0f172a;
  --lpx-slate: #64748b;
  --lpx-slate-light: #f1f5f9;
  --lpx-border: #e5e9f0;
  --lpx-white: #ffffff;
  --lpx-radius: 18px;
  --lpx-radius-sm: 12px;
  --lpx-shadow: 0 20px 55px rgba(15, 23, 42, .10);
  --lpx-shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);

  box-sizing: border-box;
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
  color: var(--lpx-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.lpx-wrap *, .lpx-wrap *::before, .lpx-wrap *::after { box-sizing: border-box; }

.lpx-card {
  background: var(--lpx-white);
  border: 1px solid var(--lpx-border);
  border-radius: 28px;
  box-shadow: var(--lpx-shadow);
  padding: 26px;
  position: relative;
  overflow: hidden;
}

/* ---------- Progress ---------- */
.lpx-progress { margin-bottom: 22px; }
.lpx-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.lpx-progress-step { color: var(--lpx-blue); font-weight: 800; font-size: 13px; letter-spacing: .3px; }
.lpx-progress-hint { color: var(--lpx-slate); font-size: 12px; font-weight: 600; }
.lpx-progress-track { width: 100%; height: 8px; background: var(--lpx-slate-light); border-radius: 99px; overflow: hidden; }
.lpx-progress-fill { height: 8px; background: linear-gradient(90deg,var(--lpx-blue),var(--lpx-green)); border-radius: 99px; width: 25%; transition: width .45s cubic-bezier(.4,0,.2,1); }

/* ---------- Steps ---------- */
.lpx-step { display: none; animation: lpxfade .35s ease; }
.lpx-step.is-active { display: block; }
@keyframes lpxfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.lpx-h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; color: var(--lpx-dark); }
.lpx-sub { color: var(--lpx-slate); margin: 0 0 20px; font-size: 14.5px; }

/* ---------- Choice cards (tap-to-select) ---------- */
.lpx-grid { display: grid; gap: 12px; margin-bottom: 22px; }
.lpx-grid-2 { grid-template-columns: 1fr 1fr; }
.lpx-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.lpx-choice {
  cursor: pointer; display: block; position: relative;
  border: 2px solid var(--lpx-border); border-radius: var(--lpx-radius);
  padding: 18px 16px; text-align: center; background: var(--lpx-white);
  transition: border-color .2s, background .2s, transform .1s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.lpx-choice:hover { border-color: var(--lpx-blue); }
.lpx-choice:active { transform: scale(.985); }
.lpx-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.lpx-choice.is-checked { border-color: var(--lpx-blue); background: var(--lpx-blue-light); box-shadow: var(--lpx-shadow-sm); }
.lpx-choice.lpx-choice--green.is-checked { border-color: var(--lpx-green); background: var(--lpx-green-light); }
.lpx-choice-ico { display: block; margin: 0 auto 10px; width: 34px; height: 34px; color: #cbd5e1; transition: color .2s; }
.lpx-choice.is-checked .lpx-choice-ico { color: var(--lpx-blue); }
.lpx-choice.lpx-choice--green.is-checked .lpx-choice-ico { color: var(--lpx-green); }
.lpx-choice-t { display: block; font-weight: 800; font-size: 15px; margin-bottom: 3px; }
.lpx-choice-d { display: block; font-size: 12px; color: var(--lpx-slate); }
.lpx-choice-left { text-align: left; }
.lpx-badge { position: absolute; top: 0; right: 0; background: var(--lpx-green); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 4px 9px; border-bottom-left-radius: 10px; }

/* ---------- Subscription select ---------- */
.lpx-panel { background: var(--lpx-slate-light); border: 1px solid var(--lpx-border); border-radius: var(--lpx-radius); padding: 18px; margin-bottom: 22px; }
.lpx-panel.is-hidden { display: none; }
.lpx-panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.lpx-label { display: block; font-size: 13px; font-weight: 700; color: var(--lpx-slate); margin-bottom: 7px; }

/* Segmented pills (jour / créneau / formule) */
.lpx-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.lpx-pill {
  cursor: pointer; border: 2px solid var(--lpx-border); background: var(--lpx-white);
  border-radius: 999px; padding: 11px 16px; font-weight: 700; font-size: 14px; color: var(--lpx-dark);
  transition: all .18s; -webkit-tap-highlight-color: transparent; user-select: none;
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
}
.lpx-pill:hover { border-color: var(--lpx-blue); }
.lpx-pill.is-checked { border-color: var(--lpx-blue); background: var(--lpx-blue); color: #fff; box-shadow: var(--lpx-shadow-sm); }
.lpx-pill input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ---------- Inputs ---------- */
.lpx-field { margin-bottom: 14px; }
.lpx-input, .lpx-select, .lpx-textarea {
  width: 100%; padding: 15px 16px; border: 1.5px solid var(--lpx-border);
  border-radius: var(--lpx-radius-sm); background: var(--lpx-white); font-size: 16px; /* 16px = pas de zoom iOS */
  color: var(--lpx-dark); font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.lpx-input:focus, .lpx-select:focus, .lpx-textarea:focus {
  outline: none; border-color: var(--lpx-blue); box-shadow: 0 0 0 3px rgba(0,86,179,.12);
}
.lpx-textarea { resize: vertical; min-height: 110px; }
.lpx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Bins rows ---------- */
.lpx-bin {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--lpx-border); border-radius: var(--lpx-radius);
  background: var(--lpx-white); margin-bottom: 10px; box-shadow: var(--lpx-shadow-sm);
  transition: border-color .2s;
}
.lpx-bin.is-active { border-color: var(--lpx-blue); }
.lpx-bin-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lpx-bin-thumb { width: 52px; height: 52px; border-radius: 12px; background: var(--lpx-slate-light); padding: 6px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.lpx-bin-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lpx-bin-name { font-weight: 800; font-size: 15px; }
.lpx-bin-price { font-size: 12.5px; color: var(--lpx-slate); font-weight: 600; }
.lpx-stepper { display: flex; align-items: center; background: var(--lpx-slate-light); border: 1px solid var(--lpx-border); border-radius: 12px; flex: 0 0 auto; }
.lpx-stepper button {
  width: 42px; height: 42px; border: 0; background: transparent; color: var(--lpx-blue);
  font-size: 22px; font-weight: 700; cursor: pointer; line-height: 1; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.lpx-stepper button:active { background: rgba(0,86,179,.08); }
.lpx-stepper input { width: 40px; text-align: center; border: 0; background: transparent; font-weight: 800; font-size: 16px; color: var(--lpx-dark); -moz-appearance: textfield; pointer-events: none; }
.lpx-stepper input::-webkit-outer-spin-button, .lpx-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Upsells ---------- */
.lpx-upsell {
  display: flex; align-items: center; gap: 13px; cursor: pointer;
  padding: 14px 15px; border: 2px solid var(--lpx-border); border-radius: var(--lpx-radius);
  background: var(--lpx-white); margin-bottom: 10px; transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.lpx-upsell:hover { border-color: var(--lpx-green); }
.lpx-upsell.is-checked { border-color: var(--lpx-green); background: var(--lpx-green-light); }
.lpx-upsell input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lpx-upsell-ico { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 11px; background: var(--lpx-slate-light); display: flex; align-items: center; justify-content: center; color: var(--lpx-slate); transition: all .18s; }
.lpx-upsell.is-checked .lpx-upsell-ico { background: var(--lpx-green); color: #fff; }
.lpx-upsell-ico svg { width: 22px; height: 22px; }
.lpx-upsell-body { flex: 1 1 auto; min-width: 0; }
.lpx-upsell-t { font-weight: 800; font-size: 14.5px; display: block; }
.lpx-upsell-d { font-size: 12.5px; color: var(--lpx-slate); display: block; }
.lpx-upsell-price { font-weight: 900; font-size: 14px; color: var(--lpx-green-dark); flex: 0 0 auto; white-space: nowrap; }
.lpx-upsell-price.is-free { color: var(--lpx-blue); }
.lpx-check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--lpx-border); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: #fff; transition: all .18s; }
.lpx-check svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.lpx-upsell.is-checked .lpx-check { background: var(--lpx-green); border-color: var(--lpx-green); }
.lpx-upsell.is-checked .lpx-check svg { opacity: 1; }

/* ---------- Info notes ---------- */
.lpx-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 15px; border-radius: var(--lpx-radius); font-size: 13.5px; margin-bottom: 16px; }
.lpx-note--blue { background: var(--lpx-blue-light); color: #0b4a8f; }
.lpx-note--green { background: var(--lpx-green-light); color: #4d6d00; }
.lpx-note svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.lpx-note.is-hidden { display: none; }

/* ---------- Summary box ---------- */
.lpx-summary { background: var(--lpx-dark); color: #fff; border-radius: var(--lpx-radius); padding: 18px 20px; margin-bottom: 20px; }
.lpx-summary-line { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: #cbd5e1; margin-bottom: 8px; }
.lpx-summary-line strong { color: #fff; }
.lpx-summary-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); }
.lpx-summary-total span { font-size: 15px; }
.lpx-summary-total strong { font-size: 26px; color: var(--lpx-green); font-weight: 900; }
.lpx-summary-opt.is-hidden { display: none; }

/* ---------- Estimated date ---------- */
.lpx-estimate { display: flex; gap: 14px; align-items: flex-start; background: var(--lpx-blue-light); border-radius: var(--lpx-radius); padding: 16px; margin-bottom: 16px; }
.lpx-estimate.is-hidden { display: none; }
.lpx-estimate svg { width: 26px; height: 26px; color: var(--lpx-blue); flex: 0 0 auto; }
.lpx-estimate-t { font-size: 13px; font-weight: 800; color: var(--lpx-dark); margin: 0 0 3px; }
.lpx-estimate-v { font-size: 18px; font-weight: 900; color: var(--lpx-blue); margin: 0 0 6px; }
.lpx-estimate-h { font-size: 12px; color: var(--lpx-slate); margin: 0; line-height: 1.45; }

/* ---------- Reassurance strip ---------- */
.lpx-trust { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 18px 0 4px; padding-top: 16px; border-top: 1px solid var(--lpx-border); }
.lpx-trust-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--lpx-slate); font-weight: 600; }
.lpx-trust-item svg { width: 16px; height: 16px; color: var(--lpx-green); }

/* ---------- Buttons / nav ---------- */
.lpx-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--lpx-border); }
.lpx-btn { border: 0; cursor: pointer; font-family: inherit; font-weight: 800; border-radius: var(--lpx-radius-sm); transition: all .2s; -webkit-tap-highlight-color: transparent; }
.lpx-btn-next { background: var(--lpx-blue); color: #fff; padding: 14px 30px; font-size: 15px; box-shadow: 0 6px 18px rgba(0,86,179,.28); }
.lpx-btn-next:hover:not(:disabled) { background: var(--lpx-blue-dark); }
.lpx-btn-pay { background: var(--lpx-green); color: #fff; padding: 16px 34px; font-size: 17px; font-weight: 900; box-shadow: 0 8px 22px rgba(130,188,0,.35); }
.lpx-btn-pay:hover:not(:disabled) { background: var(--lpx-green-dark); }
.lpx-btn-prev { background: transparent; color: var(--lpx-slate); padding: 12px 16px; font-size: 14px; }
.lpx-btn-prev:hover { color: var(--lpx-dark); }
.lpx-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.lpx-btn-block { width: 100%; }

.lpx-error, .lpx-success { margin-top: 14px; padding: 14px; border-radius: var(--lpx-radius-sm); font-size: 13.5px; font-weight: 600; }
.lpx-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lpx-success { background: var(--lpx-green-light); color: var(--lpx-green-dark); border: 1px solid #cde39a; }
.is-hidden { display: none !important; }

/* Spinner */
.lpx-spin { display: inline-block; width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: lpxspin .7s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes lpxspin { to { transform: rotate(360deg); } }

/* ---------- Mobile sticky bar ---------- */
.lpx-mobilebar { display: none; }
@media (max-width: 768px) {
  .lpx-card { padding: 18px; border-radius: 20px; }
  .lpx-wrap { padding-bottom: 92px; }
  .lpx-grid-3 { grid-template-columns: 1fr; }
  .lpx-h2 { font-size: 20px; }
  .lpx-nav { display: none; } /* remplacée par la barre mobile */

  .lpx-mobilebar {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 99990;
    gap: 10px; align-items: stretch; background: rgba(255,255,255,.96);
    border: 1px solid var(--lpx-border); border-radius: 18px; padding: 9px;
    box-shadow: 0 18px 50px rgba(21,28,44,.20); backdrop-filter: blur(10px);
  }
  .lpx-mobilebar .lpx-mtotal { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 0 6px 0 10px; }
  .lpx-mtotal-lbl { font-size: 10px; color: var(--lpx-slate); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
  .lpx-mtotal-val { font-size: 18px; font-weight: 900; color: var(--lpx-dark); line-height: 1.1; }
  .lpx-mobilebar button { flex: 1 1 0; min-height: 50px; border-radius: 13px; border: 0; font-weight: 800; font-size: 15px; cursor: pointer; font-family: inherit; }
  .lpx-mobilebar .lpx-mprev { flex: 0 0 auto; padding: 0 16px; background: var(--lpx-slate-light); color: var(--lpx-dark); }
  .lpx-mobilebar .lpx-mnext, .lpx-mobilebar .lpx-mpay { background: var(--lpx-green); color: #fff; box-shadow: 0 4px 15px rgba(130,188,0,.3); }
  .lpx-mobilebar button:disabled { opacity: .5; }
  .lpx-mtotal.is-hidden { display: none; }
}
@media (min-width: 769px) { .lpx-mobilebar { display: none !important; } }

/* =========================================================
   MODE GROUPÉ — foyers
   ========================================================= */
#lpx-mode-block { margin-top: 4px; }

.lpx-foyer {
  border: 1.5px solid var(--lpx-border); border-radius: var(--lpx-radius);
  padding: 16px; margin-bottom: 14px; background: var(--lpx-white);
  box-shadow: var(--lpx-shadow-sm);
}
.lpx-foyer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.lpx-foyer-num {
  font-weight: 800; font-size: 14px; color: var(--lpx-blue);
  background: var(--lpx-blue-light); padding: 5px 12px; border-radius: 999px;
}
.lpx-foyer-del {
  border: 0; background: #fef2f2; color: #dc2626; cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.lpx-foyer-del svg { width: 18px; height: 18px; }
.lpx-foyer-del:active { background: #fee2e2; }

.lpx-foyer-bins { margin-top: 6px; border-top: 1px dashed var(--lpx-border); padding-top: 12px; }
.lpx-fbin {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0;
}
.lpx-fbin + .lpx-fbin { border-top: 1px solid var(--lpx-slate-light); }
.lpx-fbin-info { display: flex; flex-direction: column; }
.lpx-fbin-name { font-weight: 700; font-size: 14px; }
.lpx-fbin-name::after { content: none; }
.lpx-fbin-price { font-size: 12px; color: var(--lpx-slate); font-weight: 600; }
.lpx-fbin.is-active .lpx-fbin-name { color: var(--lpx-blue); }
.lpx-fbin .lpx-stepper { transform: scale(.92); }

@media (max-width: 768px) {
  .lpx-foyer { padding: 13px; }
}

/* Options payantes par foyer */
.lpx-foyer-opts { margin-top: 12px; border-top: 1px dashed var(--lpx-border); padding-top: 12px; }
.lpx-foyer-opts-lbl { display: block; font-size: 12px; font-weight: 800; color: var(--lpx-slate); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.lpx-fopt {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 9px 11px; border: 1.5px solid var(--lpx-border); border-radius: 12px;
  background: var(--lpx-white); margin-bottom: 7px; transition: all .16s; -webkit-tap-highlight-color: transparent;
}
.lpx-fopt:hover { border-color: var(--lpx-green); }
.lpx-fopt.is-checked { border-color: var(--lpx-green); background: var(--lpx-green-light); }
.lpx-fopt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lpx-fopt-ico { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; background: var(--lpx-slate-light); display: flex; align-items: center; justify-content: center; color: var(--lpx-slate); transition: all .16s; }
.lpx-fopt.is-checked .lpx-fopt-ico { background: var(--lpx-green); color: #fff; }
.lpx-fopt-ico svg { width: 17px; height: 17px; }
.lpx-fopt-body { flex: 1 1 auto; min-width: 0; }
.lpx-fopt-t { font-weight: 700; font-size: 13.5px; }
.lpx-fopt-price { font-weight: 800; font-size: 13px; color: var(--lpx-green-dark); flex: 0 0 auto; white-space: nowrap; }
.lpx-fopt .lpx-check { width: 20px; height: 20px; }
.lpx-fopt .lpx-check svg { width: 12px; height: 12px; }
