:root{
  --bg:#f5f7fb;
  --panel:#fff;
  --ink:#0b1220;
  --mut:#5b667a;
  --brand:#2563eb;
  --brand-2:#1e4fc9;
  --border:#e6e9f0;
  --radius:16px;
  --shadow:0 10px 25px rgba(15,23,42,.10),0 1px 3px rgba(15,23,42,.06)
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  background:radial-gradient(circle at top,#e5edff 0,#f5f7fb 48%,#eef2ff 100%);
  color:var(--ink);
}
.wrap{
  max-width:1200px;
  margin:24px auto 32px;
  padding:0 24px 40px;
}
h1{
  text-align:center;
  font-size:26px;
  margin:8px 0 18px;
}
.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}
@media(max-width:980px){.grid{grid-template-columns:1fr}}
.card{
  background:var(--panel);
  border-radius:24px;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  padding:18px 18px 20px;
}
.hero{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eef3ff;
  border-radius:20px;
  height:260px;
  margin-bottom:14px;
}
.hero img{max-width:85%;max-height:85%;object-fit:contain}
.title{
  font-size:20px;
  font-weight:700;
  margin:0 0 10px;
  text-align:center;
}
.tabs{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-bottom:14px;
}
.tab{
  padding:8px 16px;
  border-radius:999px;
  border:1px solid var(--border);
  cursor:pointer;
  font-weight:600;
  font-size:14px;
  background:#fff;
  color:#0f172a;
  transition:.18s;
}
.tab.active{
  background:var(--brand);
  color:#fff;
  border-color:transparent;
  box-shadow:0 0 0 1px rgba(37,99,235,.2);
}
.badge-price{
  display:block;
  background:#eef3ff;
  border:1px solid #d7e2ff;
  color:var(--brand);
  font-weight:800;
  padding:10px 18px;
  border-radius:14px;
  font-size:18px;
  margin:8px auto 4px;
  text-align:center;
  width:fit-content;
}
fieldset{
  border:1px solid var(--border);
  border-radius:12px;
  margin:14px 0;
  padding:16px 14px 12px;
  position:relative;
  background:#f9fafb;
}
fieldset legend{
  position:absolute;
  top:-11px;
  left:16px;
  background:#fff;
  padding:0 8px;
  font-weight:700;
  font-size:13px;
  border-radius:999px;
}
.durations{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:6px;
}
.plan{
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 8px;
  text-align:center;
  cursor:pointer;
  transition:.18s;
  background:#fff;
  font-size:13px;
}
.plan.active{
  border-color:var(--brand);
  background:#eff4ff;
  box-shadow:0 0 0 1px rgba(37,99,235,.15);
}
.plan .p-title{font-weight:600}
.plan .p-price{margin-top:4px;font-weight:700;color:var(--brand);font-size:14px}
.qty-rows{display:flex;flex-direction:column;gap:10px}
.qty-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.qty-line label{
  font-weight:600;
  color:#0f172a;
  font-size:13px;
}
.stepper{
  display:inline-flex;
  align-items:center;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.stepper button{
  background:#f1f5f9;
  border:0;
  padding:8px 12px;
  font-weight:700;
  cursor:pointer;
  font-size:14px;
}
.stepper button:disabled{opacity:.4;cursor:default}
.stepper input{
  width:60px;
  text-align:center;
  border:0;
  padding:8px 0;
  font-size:14px;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button{appearance:none}
input[type=number]{-moz-appearance:textfield}
.notes ul{
  margin:0;
  padding-left:18px;
  line-height:1.5;
  font-size:13px;
}
.notes li+li{margin-top:4px}
.btn-add{
  display:block;
  margin:10px auto 0;
  padding:10px 18px;
  background:var(--brand);
  color:#fff;
  font-weight:700;
  border:none;
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
  transition:.18s;
}
.btn-add:hover{background:var(--brand-2)}
.section{display:none}
.section.active{display:block}

/* Cart / checkout bar */
.cartbar{
  position:sticky;
  bottom:0;
  left:0;
  right:0;
  background:#020617;
  color:#fff;
  border-top-left-radius:16px;
  border-top-right-radius:16px;
  box-shadow:0 -10px 25px rgba(15,23,42,.4);
  padding:10px 16px;
  margin-top:26px;
}
.cartbar__row{
  display:flex;
  align-items:center;
  gap:12px;
}
.cartbar__items{
  flex:1;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.chip{
  background:#0f172a;
  color:#e5edff;
  border:1px solid #334155;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
}
.btn-checkout{
  background:#22c55e;
  border:none;
  color:#022c22;
  font-weight:800;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-size:14px;
}
.btn-ghost{
  background:transparent;
  color:#e5edff;
  border:1px solid #475569;
  border-radius:8px;
  padding:8px 10px;
  cursor:pointer;
  font-size:13px;
}

/* Modal recap */
.modal{position:fixed;inset:0;display:grid;place-items:center;z-index:50}
.modal__backdrop{position:absolute;inset:0;background:rgba(2,6,23,.55)}
.modal__panel{
  position:relative;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:18px;
  max-width:640px;
  width:92%;
  max-height:80vh;
  overflow:auto;
}
.modal__title{margin:0 0 10px;font-size:20px}
.modal__list{
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  margin-bottom:12px;
  background:#f8fafc;
}
.modal__item{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:10px;
  margin:6px 0;
}
.modal__actions{display:flex;justify-content:flex-end;gap:8px}
.money{font-variant-numeric:tabular-nums}
.sum{display:flex;justify-content:space-between;align-items:center;margin:6px 0}
.sum b{font-weight:700}
.grand{
  border-top:1px dashed var(--border);
  margin-top:8px;
  padding-top:8px;
  font-size:15px;
}
.err{display:none;color:#b91c1c;font-size:12px;margin-left:8px}

/* Toast */
.toast{
  position:fixed;
  bottom:16px;
  right:16px;
  background:#111827;
  color:#fff;
  border:1px solid #374151;
  border-radius:12px;
  padding:10px 12px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);
  font-size:13px;
  max-width:380px;
}

/* Bandeau état API */
.apistate{
  display:none;
  margin:10px auto 18px;
  padding:10px 14px;
  border-radius:10px;
  max-width:720px;
  font-size:13px;
}
.apistate.err{
  display:block;
  background:#fef2f2;
  border:1px solid #fecaca;
  color:#7f1d1d;
}

/* Zone tests debug */
.testbar{
  margin:18px 0 8px;
  padding:10px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
}
.testbar h4{margin:0 0 8px;font-size:14px}
.testbar button{
  margin-right:6px;
  border:1px solid var(--border);
  background:#fff;
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer;
  font-size:12px;
}
.diag{margin:10px 0 0;font-size:12px;color:#374151}
.diag code{
  background:#eef2ff;
  padding:2px 6px;
  border-radius:6px;
}
