/*
 * Promo page ("code promo {fournisseur}") — design system.
 * Source of truth: docs/design/promo-preview-fr.html (Etienne-validated mockup).
 * This is that file's own <style> block, copied verbatim — same selectors,
 * same values, nothing re-derived — with two deliberate changes only:
 *   1. The 2 @font-face blocks are dropped (Poppins is already self-hosted
 *      sitewide via OMGF).
 *   2. Every selector is scoped under .mbs-promo-page (a real ancestor of the
 *      whole card in the render — see class-provider-promo-pages-generator.php)
 *      so these short, generic class names (.card, .tag, .about, .rate, …)
 *      can never leak into/collide with the rest of the theme on this same
 *      page (this page keeps the real site header/footer — see
 *      templates/single-mbs_provider_promo.php). Scoping only adds an
 *      ancestor selector; it changes no color/padding/radius/size.
 * Enqueued only on is_singular('mbs_provider_promo') — see
 * MBS_Providers_Manager::promo_page_scripts().
 *
 * Do not hand-edit values here without re-checking against the mockup file.
 *
 * Mobile fidelity (1.4.5): the ≤480px block near the bottom + the now-always-
 * compact .cart/.phone values are ported from a SECOND, newer mockup file —
 * docs/design/promo-page-nomad.dc.html (MyBestSimProduct repo), block #1b
 * (390px mobile render) — not promo-preview-fr.html above, which only ever
 * specified the desktop (#1a) layout.
 */

.mbs-promo-page, .mbs-promo-page * { box-sizing: border-box; }

.mbs-promo-page {
    margin: 0;
    background: #eef3f8;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #0f172a;
    padding: 30px 16px 60px;   /* replaces the mockup's .wrap padding (breathing room inside the theme content area) */
    overflow-x: hidden;   /* safety net: nothing below should ever need to scroll horizontally on mobile */
}

.mbs-promo-page a { color: #17264a; text-decoration: none; }
.mbs-promo-page a:hover { color: #0f172a; }
.mbs-promo-page button { font-family: inherit; cursor: pointer; }
.mbs-promo-page ::selection { background: #bae6fd; }

.mbs-promo-page .card { background: #fff; border-radius: 22px; box-shadow: 0 30px 70px -34px rgba(14, 43, 77, .30); overflow: hidden; max-width: 1000px; margin: 0 auto; }
.mbs-promo-page .hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 34px; border-bottom: 1px solid #e8eef5; }
.mbs-promo-page .hd nav { display: flex; align-items: center; gap: 6px; }
.mbs-promo-page .hd nav a { font-size: 13.5px; color: #475569; padding: 8px 13px; border-radius: 999px; font-weight: 500; }
.mbs-promo-page .hd nav a.act { color: #0284c7; font-weight: 700; background: #f0f9ff; }
.mbs-promo-page .bd { padding: 26px 56px 40px; }
.mbs-promo-page .bc { font-size: 12.5px; color: #94a3b8; margin-bottom: 18px; display: flex; gap: 7px; align-items: center; }
.mbs-promo-page h1.t { font-size: 33px; font-weight: 700; letter-spacing: -.02em; line-height: 1.16; margin: 0 0 14px; }
.mbs-promo-page .disc { color: inherit; }
.mbs-promo-page .eeat { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #475569; margin-bottom: 16px; }
.mbs-promo-page .avatar { width: 26px; height: 26px; border-radius: 999px; object-fit: cover; border: 1.5px solid #e8eef5; }
.mbs-promo-page .lead { font-size: 15.5px; line-height: 1.6; color: #475569; margin: 0 0 26px; max-width: 680px; }
.mbs-promo-page .tile { border-radius: 12px; background: #fff; border: 1px solid #e8eef5; box-shadow: 0 6px 16px -10px rgba(14, 43, 77, .3); display: flex; align-items: center; justify-content: center; font-weight: 700; letter-spacing: -.03em; padding: 5px; }
.mbs-promo-page .tile img { display: block; }
/* cursor:pointer — the whole card is a click target now (Etienne, 2026-08-03; see
   bindHeroCardClick() in promo-page.js), not just the buttons inside it. */
.mbs-promo-page .coupon { border: 1px solid #e6edf6; border-radius: 18px; box-shadow: 0 22px 46px -24px rgba(15, 23, 42, .18); margin-bottom: 22px; background: #fff; overflow: hidden; cursor: pointer; }
.mbs-promo-page .coupon-topbar { display: flex; align-items: center; gap: 8px; background: #24365f; color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 11px 22px; }
.mbs-promo-page .coupon-topbar .star { color: #fff; font-size: 12px; }
.mbs-promo-page .coupon-body { padding: 22px 24px 20px; }
.mbs-promo-page .coupon-disc { flex: none; margin-left: auto; text-align: right; line-height: 1; padding-left: 12px; }
.mbs-promo-page .coupon-disc-val { font-size: 40px; font-weight: 800; color: #17264a; letter-spacing: -.02em; line-height: 1; }
.mbs-promo-page .coupon-disc-cap { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #94a3b8; margin-top: 4px; }
.mbs-promo-page .coupon-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
/* .tile-lg / .coupon-name / .coupon-sub: the coupon header's logo/name/subtitle used to
   be sized via inline styles in the render (can't be overridden by a media query) — now
   classes so the ≤480px breakpoint below can shrink them. Base values = the desktop
   mockup's (unchanged visually on desktop). */
.mbs-promo-page .tile-lg { width: 48px; height: 48px; font-size: 14px; }
.mbs-promo-page .coupon-name { font-weight: 800; font-size: 22px; line-height: 1.1; color: #0f172a; }
.mbs-promo-page .coupon-sub { font-size: 12.5px; color: #64748b; font-weight: 700; }
.mbs-promo-page .badge { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 6px 13px; border-radius: 999px; text-transform: uppercase; flex: none; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(245, 158, 11, .55); }
.mbs-promo-page .code-row { display: flex; align-items: stretch; gap: 10px; margin-bottom: 14px; }
.mbs-promo-page .code-box { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; border: 2px dashed #94a3b8; border-radius: 12px; padding: 13px 18px; }
.mbs-promo-page .code-box span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 21px; font-weight: 700; letter-spacing: .06em; color: #0f172a; }
.mbs-promo-page .btn-copy { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; border-radius: 12px; padding: 0 20px; font-size: 14px; font-weight: 700; }
.mbs-promo-page .btn-copy:hover { background: #e2e8f0; }
.mbs-promo-page .btn-claim { width: 100%; background: #dc2626; color: #fff; border: none; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; box-shadow: 0 10px 20px -12px rgba(220, 38, 38, .5); }
.mbs-promo-page .btn-claim:hover { background: #b91c1c; }
.mbs-promo-page .meta-row { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; font-size: 12.5px; color: #64748b; }
/* .cart — faithful to the validated mockup (docs/design/promo-page-nomad.dc.html /
   scratchpad promo-preview-fr.html): a full 264px phone with the 4-row order recap
   (plan, subtotal, code, total) + align-items:center, so the phone and the (shorter)
   3-step text column are simply centered against each other. No filler block, no
   stretch, no spread steps. At ≤820px the grid collapses to 1 column, phone centered. */
.mbs-promo-page .cart { display: grid; grid-template-columns: 1fr 312px; gap: 40px; align-items: center; background: linear-gradient(140deg, #f8fbff, #eef7fe); border: 1px solid #e3f0fb; border-radius: 22px; padding: 36px 40px; margin-bottom: 22px; }
/* Steps = comfortable, TIGHT cards (gap:12px in the render). Cards give the left
   column enough visual mass to match the phone's height, so the .cart box fills
   edge-to-edge (no floating text block / no big empty top+bottom) WITHOUT spreading
   the steps apart. The redundant phone "Sous-total" row was dropped to shorten the
   phone to the same height (see render). */
.mbs-promo-page .step { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid #eef2f7; border-radius: 14px; box-shadow: 0 6px 18px -12px rgba(14, 43, 77, .35); padding: 30px 22px; }
.mbs-promo-page .step-n { flex: none; width: 32px; height: 32px; border-radius: 999px; background: #24365f; color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px -8px rgba(23, 38, 74, .7); }
.mbs-promo-page .phone { width: 312px; background: #0f172a; border-radius: 46px; padding: 9px; box-shadow: 0 42px 80px -28px rgba(14, 43, 77, .46); }
.mbs-promo-page .phone-in { position: relative; background: #fff; border-radius: 34px; overflow: hidden; }
.mbs-promo-page .notch { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 74px; height: 19px; background: #0f172a; border-radius: 999px; z-index: 3; }
.mbs-promo-page .about { display: flex; gap: 16px; align-items: center; background: #f8fafc; border: 1px solid #e8eef5; border-radius: 16px; padding: 20px 22px; margin-bottom: 22px; }
.mbs-promo-page .rate { display: inline-flex; align-items: center; gap: 4px; background: #fff8e7; color: #92600a; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
/* CTA « Comparer toutes les offres » : bouton ROUGE, même format que les autres
   CTA de section (.band .red) — retour frère d'Etienne. */
.mbs-promo-page .cta-pill { display: flex; align-items: center; justify-content: center; gap: 8px; background: #dc2626; color: #fff; border: none; border-radius: 12px; padding: 16px 30px; font-size: 15.5px; font-weight: 700; width: max-content; max-width: 100%; margin: 0 auto 34px; box-shadow: 0 10px 22px -12px rgba(220, 38, 38, .55); }
.mbs-promo-page .cta-pill:hover { background: #b91c1c; color: #fff; }
.mbs-promo-page .shot { border: 1px dashed #cbd5e1; border-radius: 14px; padding: 16px 20px; background: #f8fafc; margin-bottom: 34px; display: flex; gap: 14px; align-items: center; }
.mbs-promo-page .tags-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; margin-bottom: 8px; }
.mbs-promo-page .tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.mbs-promo-page .tag { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; }
.mbs-promo-page .acc { border: 1px solid #e8eef5; border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.mbs-promo-page .acc-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; background: #fff; border: none; padding: 14px 18px; font-size: 14px; font-weight: 600; color: #0f172a; }
.mbs-promo-page .acc-body { padding: 2px 18px 16px; font-size: 13.5px; line-height: 1.6; color: #475569; display: none; }
.mbs-promo-page .acc.open .acc-body { display: block; }
.mbs-promo-page .acc .chev { color: #94a3b8; transition: transform .2s; }
.mbs-promo-page .acc.open .chev { transform: rotate(180deg); }
.mbs-promo-page h2.fq { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 16px; }
/* FAQ dans une boîte au fond BLEU (mêmes teintes que le module panier / les
   encarts d'article) pour la faire ressortir — retour frère d'Etienne. Chaque
   question = carte blanche flottant sur le bleu. */
.mbs-promo-page .faq { background: linear-gradient(140deg, #f8fbff, #eef7fe); border: 1px solid #e3f0fb; border-radius: 22px; margin-bottom: 34px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mbs-promo-page .faq-item { border: 1px solid #e3f0fb; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 6px 16px -12px rgba(14, 43, 77, .22); }
.mbs-promo-page .faq-item:first-child { border-top: 1px solid #e3f0fb; }
.mbs-promo-page .faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; border: none; padding: 16px 20px; text-align: left; font-size: 15px; font-weight: 600; color: #0f172a; }
.mbs-promo-page .faq-a { padding: 0 20px 18px; font-size: 14px; line-height: 1.6; color: #475569; display: none; }
.mbs-promo-page .faq-item.open .faq-a { display: block; }
.mbs-promo-page .rt-line { display: block; margin-bottom: 7px; }
.mbs-promo-page .rt-line:last-child { margin-bottom: 0; }
.mbs-promo-page .faq-item.open .faq-a { display: block; }
.mbs-promo-page .faq-q .chev { color: #94a3b8; flex: none; transition: transform .2s; }
.mbs-promo-page .faq-item.open .faq-q .chev { transform: rotate(180deg); }
.mbs-promo-page .band { background: #f4f6fa; border: 1px solid #e2e8f0; border-radius: 20px; padding: 28px 30px; text-align: center; margin-bottom: 8px; }
.mbs-promo-page .band-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.mbs-promo-page .band a { border-radius: 12px; padding: 16px 30px; font-size: 15.5px; font-weight: 700; color: #fff; }
.mbs-promo-page .band .sky { background: #24365f; box-shadow: 0 10px 22px -12px rgba(23, 38, 74, .55); }
.mbs-promo-page .band .red { background: #dc2626; box-shadow: 0 10px 22px -12px rgba(220, 38, 38, .55); }
.mbs-promo-page .band a:hover { color: #fff; }
.mbs-promo-page .tnum { font-variant-numeric: tabular-nums; }

/* Alternatives ("autres codes promo populaires") — filled client-side from
   /api/promo-ranking (see promo-page.js). 2×2 on desktop, 1 col on phones. */
.mbs-promo-page .promo-alts { margin-bottom: 22px; }
.mbs-promo-page .promo-alts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mbs-promo-page .promo-alt { display: flex; align-items: stretch; gap: 12px; background: #fff; border: 1px solid #e8eef5; border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 16px -12px rgba(14, 43, 77, .3); transition: box-shadow .15s, transform .15s; }
.mbs-promo-page .promo-alt:hover { box-shadow: 0 12px 26px -14px rgba(14, 43, 77, .42); transform: translateY(-1px); }
/* Logo remplit toute la hauteur de la card (retour Etienne). */
.mbs-promo-page .promo-alt-logo { flex: none; width: 60px; align-self: stretch; min-height: 56px; background: transparent; border: none; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 4px; }
.mbs-promo-page .promo-alt-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* Corps = 2 rangées (nom+réduction / code+CTA). Tout peut rétrécir (min-width:0)
   → la card ne peut JAMAIS déborder, même sur les petits écrans. */
.mbs-promo-page .promo-alt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.mbs-promo-page .promo-alt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.mbs-promo-page .promo-alt-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbs-promo-page .promo-alt-disc { flex: none; font-weight: 800; font-size: 16px; color: #17264a; letter-spacing: -.01em; }
.mbs-promo-page .promo-alt-codeline { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.mbs-promo-page .promo-alt-codelabel { flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; white-space: nowrap; }
.mbs-promo-page .promo-alt-code { flex: 0 1 auto; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 12px; font-weight: 700; color: #17264a; background: #eef2f7; border: 1px solid #d8e0ea; border-radius: 6px; padding: 2px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbs-promo-page .promo-alt-cta { flex: none; font-size: 12px; font-weight: 700; color: #fff; background: #dc2626; border: 1px solid #dc2626; border-radius: 8px; padding: 7px 14px; white-space: nowrap; }
.mbs-promo-page .promo-alt:hover .promo-alt-cta { background: #b91c1c; border-color: #b91c1c; }
.mbs-promo-page .oc-card { border: 1px solid #e8eef5; border-radius: 16px; padding: 20px 22px; margin-bottom: 30px; background: #fff; box-shadow: 0 6px 16px -12px rgba(14, 43, 77, .25); }
.mbs-promo-page .oc-intro { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: #475569; }
.mbs-promo-page .oc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mbs-promo-page .oc-row { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 16px; }
.mbs-promo-page .oc-valid { background: #ecfdf5; border: 1px solid #a7f3d0; }
.mbs-promo-page .oc-invalid { background: #fef2f2; border: 1px solid #fecaca; }
.mbs-promo-page .oc-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; }
.mbs-promo-page .oc-ico-ok { background: #10b981; }
.mbs-promo-page .oc-ico-bad { background: #ef4444; }
.mbs-promo-page .oc-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; font-size: 15px; letter-spacing: .03em; color: #0f172a; }
.mbs-promo-page .oc-struck { text-decoration: line-through; color: #b91c1c; font-weight: 700; font-size: 14px; }
.mbs-promo-page .oc-mid { color: #94a3b8; font-size: 12.5px; font-weight: 500; }
.mbs-promo-page .oc-status { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.mbs-promo-page .oc-ok { color: #047857; }
.mbs-promo-page .oc-disc-badge { background: #d1fae5; color: #047857; font-weight: 800; font-size: 13px; padding: 2px 9px; border-radius: 999px; }
.mbs-promo-page .oc-bad { color: #dc2626; }
.mbs-promo-page .oc-note { margin: 14px 0 0; font-size: 12px; line-height: 1.55; color: #94a3b8; }

/* Preuve V2 (retour frère d'Etienne) — même format que le module panier : boîte
   au fond bleu, titre DANS la boîte, texte (3 puces) + CTA rouge à GAUCHE, capture
   RÉELLE à DROITE (E-E-A-T). Image laissée pristine (aucun overlay). */
.mbs-promo-page .promo-proof { margin: 0 0 34px; }
.mbs-promo-page .promo-proof-box { background: linear-gradient(140deg, #f8fbff, #eef7fe); border: 1px solid #e3f0fb; border-radius: 22px; padding: 32px 36px; }
.mbs-promo-page .promo-proof-title { display: flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 22px; }
.mbs-promo-page .promo-proof-check { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none; border-radius: 999px; background: #d1fae5; color: #047857; font-size: 14px; font-weight: 800; }
/* La colonne texte s'étire à la hauteur de l'image et répartit puces + CTA pour
   remplir l'espace (retour Etienne : trop de blanc à côté de la capture). Puces
   agrandies. */
.mbs-promo-page .promo-proof-cols { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 34px; align-items: stretch; }
.mbs-promo-page .promo-proof-text { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.mbs-promo-page .promo-proof-bullets { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.mbs-promo-page .promo-proof-bullets li { position: relative; padding-left: 42px; font-size: 17px; line-height: 1.55; color: #334155; font-weight: 500; }
.mbs-promo-page .promo-proof-bullets li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: #d1fae5; color: #047857; font-size: 15px; font-weight: 800; }
/* CTA « Voir l'offre » : hérite du rouge de .btn-claim, mis en valeur et CENTRÉ
   sous les puces (retour Etienne : le mettre plus en avant, au centre). */
.mbs-promo-page .promo-proof-cta { width: max-content; max-width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 16px 46px; font-size: 16px; margin: 4px auto 0; }
.mbs-promo-page .promo-proof-fig { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.mbs-promo-page .promo-proof-img { max-width: 380px; width: 100%; height: auto; border-radius: 16px; border: 1px solid #e2e8f0; box-shadow: 0 10px 34px rgba(15, 23, 42, .12); }
.mbs-promo-page .promo-proof-cap { max-width: 400px; margin: 13px auto 0; font-size: 12.5px; line-height: 1.55; color: #64748b; }
@media (max-width: 820px) {
    /* Empilé : capture AU-DESSUS, puis puces + CTA (voir la preuve, puis agir). */
    .mbs-promo-page .promo-proof-box { padding: 24px 20px; }
    .mbs-promo-page .promo-proof-cols { grid-template-columns: 1fr; gap: 24px; }
    .mbs-promo-page .promo-proof-fig { order: -1; }
}
@media (max-width: 480px) {
    .mbs-promo-page .promo-proof-title { font-size: 20px; }
    .mbs-promo-page .promo-proof-img { max-width: 320px; border-radius: 13px; }
    .mbs-promo-page .promo-proof-cta { width: 100%; justify-content: center; }
}

/* Price table (V2 validé 2026-07-22) — real catalogue, filled client-side from
   /api/products (see promo-page.js). Horizontal scroll on narrow screens
   rather than a stacked-card rework: keeps head/row alignment for a 4-column
   table, same pattern already used for wide content in this design system. */
.mbs-promo-page .promo-table { margin-bottom: 22px; }
.mbs-promo-page .promo-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 8px 20px -12px rgba(15, 23, 42, .18); }
.mbs-promo-page .promo-table-el { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mbs-promo-page .promo-table-el th { text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #17264a; background: linear-gradient(180deg, #f4f6fa, #e8edf4); padding: 14px 16px; white-space: nowrap; border-bottom: 2px solid #cbd5e1; }
.mbs-promo-page .promo-table-el th:last-child { color: #047857; font-size: 12px; background: linear-gradient(180deg, #ecfdf5, #d1fae5); border-bottom-color: #6ee7b7; border-left: 2px solid #a7f3cd; }
.mbs-promo-page .promo-table-el td { padding: 14px 16px; border-top: 1px solid #eef4fb; color: #334155; white-space: nowrap; }
.mbs-promo-page .promo-table-el tbody tr:nth-child(even) { background: #f7fbff; }
.mbs-promo-page .promo-table-el tbody tr:hover { background: #eff6ff; }
.mbs-promo-page .promo-table-dest { font-weight: 700; color: #0f172a; }
.mbs-promo-page .promo-table-old { color: #94a3b8; text-decoration: line-through; font-size: 13px; white-space: nowrap; }
.mbs-promo-page .promo-table-diff { color: #047857; font-weight: 800; }
.mbs-promo-page .promo-table-el td.promo-table-diff { background: #ecfdf5; border-left: 2px solid #a7f3cd; }

/* ── Design repris de la page Avis V2 (retour Etienne 29/07) : titres à filet bleu,
   cartes alternatives, accordéon FAQ. Valeurs identiques à avis-v2.css, re-scopées
   sous .mbs-promo-page pour la page code promo. ── */
.mbs-promo-page .av-h2 { margin: 0 0 4px; font-size: 25px; font-weight: 800; letter-spacing: -.02em; color: #0f172a; line-height: 1.2; }
.mbs-promo-page .av-h2rule { width: 56px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, #0ea5e9, #38bdf8); margin-bottom: 20px; }

/* Alternatives (« Autres codes promo populaires ») — cartes façon Avis V2.
   Etienne, 2026-08-03 : cible 6 cartes en grille 2x3 (avant : 4, déséquilibré en 3+1) —
   voir MAX dans promo-page.js. La grille CSS Grid `auto-fit` d'origine packait les cartes
   au plus large possible, ce qui produisait justement cette dernière rangée orpheline
   alignée à gauche. Passée en FLEXBOX avec wrap + justify-content:center et une
   max-width calculée par carte (3 colonnes desktop / 2 tablette / 1 mobile, mêmes
   breakpoints que le reste de cette feuille) : la dernière rangée, quelle qu'en soit la
   taille (moins de fournisseurs disponibles, ou nombre non multiple de 3), se CENTRE
   automatiquement au lieu de coller à gauche avec un trou — jamais de carte orpheline,
   pour n'importe quel nombre de cartes réellement rendues par promo-page.js. */
.mbs-promo-page .av-pop-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.mbs-promo-page .av-pop { flex: 1 1 260px; max-width: calc(33.333% - 8px); display: flex; flex-direction: column; gap: 10px; border: 1px solid #e8eef4; border-radius: 16px; padding: 14px 16px; background: #fff; transition: box-shadow .2s, transform .2s, border-color .2s; }
.mbs-promo-page .av-pop:hover { box-shadow: 0 16px 30px -20px rgba(2,132,199,.4); transform: translateY(-3px); border-color: #bae6fd; color: inherit; }
.mbs-promo-page .av-pop-top { display: flex; align-items: center; gap: 12px; }
.mbs-promo-page .av-pop-logo { width: 40px; height: 40px; border-radius: 11px; border: 1px solid #e6eef6; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.mbs-promo-page .av-pop-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.mbs-promo-page .av-pop-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14.5px; color: #0f172a; }
.mbs-promo-page .av-pop-disc { background: #24365f; color: #fff; font-weight: 800; font-size: 13px; padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.mbs-promo-page .av-pop-coderow { display: flex; align-items: center; justify-content: center; gap: 8px; }
.mbs-promo-page .av-pop-codelabel { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #0f172a; }
.mbs-promo-page .av-pop-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 13px; color: #000; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 7px; padding: 2px 9px; }
.mbs-promo-page .av-pop-cta { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; background: #dc2626; color: #fff; font-weight: 700; font-size: 13.5px; padding: 10px 14px; border-radius: 11px; transition: background .15s; }
.mbs-promo-page .av-pop:hover .av-pop-cta { background: #b91c1c; color: #fff; }

/* FAQ — accordéon façon Avis V2 (le « + » pivote en « x »). */
.mbs-promo-page .av-faq { display: flex; flex-direction: column; gap: 10px; margin-bottom: 34px; }
.mbs-promo-page .av-faq-item { border: 1px solid #e8eef4; border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.mbs-promo-page .av-faq-item.open { border-color: #bae6fd; box-shadow: 0 12px 28px -20px rgba(2, 132, 199, .32); }
.mbs-promo-page .av-faq-q { width: 100%; background: none; border: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; text-align: left; font-size: 15.5px; font-weight: 700; color: #0f172a; font-family: inherit; cursor: pointer; }
.mbs-promo-page .av-faq-q .sg { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; background: #f0f9ff; color: #0ea5e9; font-size: 20px; font-weight: 400; flex-shrink: 0; line-height: 1; transition: transform .2s, background .2s; }
.mbs-promo-page .av-faq-item.open .sg { transform: rotate(45deg); background: #e0f2fe; }
.mbs-promo-page .av-faq-a { padding: 0 20px 18px; font-size: 14.5px; line-height: 1.65; color: #475569; display: none; }
.mbs-promo-page .av-faq-item.open .av-faq-a { display: block; }
.mbs-promo-page .av-faq-a p { margin: 0 0 10px; }
.mbs-promo-page .av-faq-a p:last-child { margin-bottom: 0; }

@media (max-width: 820px) {
    .mbs-promo-page .bd { padding: 22px 20px 30px; }
    .mbs-promo-page h1.t { font-size: 26px; }
    .mbs-promo-page .cart { grid-template-columns: 1fr; gap: 26px; }
    .mbs-promo-page .av-pop { max-width: calc(50% - 6px); } /* 2 columns — see .av-pop-grid comment above */
    .mbs-promo-page .phone { margin: 0 auto; }
    .mbs-promo-page { padding: 20px 10px 48px; }
}

/* ────────────────────────────────────────────────────────────────────────
 * Mobile fidelity (≤480px) — ported from docs/design/promo-page-nomad.dc.html
 * #1b (the 390px mobile render, MyBestSimProduct repo/docs/design/). The
 * ≤820px block above only handles the tablet-width cart reflow; at true
 * phone widths the coupon card itself needs to shrink (logo/name/badge/code
 * row) or it overflows — see class-provider-promo-pages-generator.php for
 * the matching render-side classes (.tile-lg, .coupon-name, .coupon-sub,
 * .u-mobile-hide) these rules target.
 * ──────────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    /* Utility: hides desktop-only copy (byline prefixes/separators, the
       coupon subtitle's " · exclusif MyBestSim" suffix) — #1b drops these
       for space, #1a keeps them. */
    .mbs-promo-page .u-mobile-hide { display: none; }

    .mbs-promo-page .bd { padding: 16px 18px 24px; }
    .mbs-promo-page h1.t { font-size: 25px; }
    .mbs-promo-page .av-h2 { font-size: 20px; }
    .mbs-promo-page .av-pop { max-width: 100%; } /* 1 column — see .av-pop-grid comment above */

    /* Byline : nom + avatar sur la 1re ligne, date vérifiée + note sur la 2e —
       plus de chevauchement/serrage sur mobile (retour Etienne). */
    .mbs-promo-page .eeat { gap: 6px 12px; font-size: 12px; }
    .mbs-promo-page .eeat > span:first-child { flex-basis: 100%; }
    .mbs-promo-page .avatar { width: 22px; height: 22px; }

    .mbs-promo-page .coupon-body { padding: 16px 16px 15px; }
    .mbs-promo-page .coupon-topbar { padding: 9px 16px; font-size: 10px; letter-spacing: .05em; }
    .mbs-promo-page .coupon-disc-val { font-size: 30px; }
    .mbs-promo-page .coupon-hd { gap: 11px; margin-bottom: 16px; }
    .mbs-promo-page .tile-lg { width: 42px; height: 42px; font-size: 12px; }
    .mbs-promo-page .coupon-name { font-size: 18px; }
    .mbs-promo-page .coupon-sub { font-size: 11.5px; }
    .mbs-promo-page .badge { font-size: 10px; padding: 5px 9px; }

    /* Code + "Copier" stay on one line — code-box shrinks (flex:1, no min-width),
       the button gets a fixed comfortable tap height instead of matching the
       code-box's font-driven height. */
    .mbs-promo-page .code-row { gap: 8px; margin-bottom: 12px; }
    .mbs-promo-page .code-box { padding: 11px 14px; min-width: 0; }
    .mbs-promo-page .code-box span { font-size: 17px; letter-spacing: .05em; }
    .mbs-promo-page .btn-copy { padding: 0 16px; height: 44px; font-size: 13px; flex: none; }

    /* Cart on phones: the desktop .cart padding (36px 40px) + a 292px phone overflow
       on narrow screens (Galaxy S8+, Z Fold). Shrink the padding and let the phone
       fill the (now 1-column) width, capped, so it never exceeds the viewport. */
    .mbs-promo-page .cart { padding: 22px 16px; gap: 22px; }
    .mbs-promo-page .phone { width: 100%; max-width: 320px; }
    .mbs-promo-page .step { padding: 20px 16px; }
    .mbs-promo-page .promo-alts-grid { grid-template-columns: 1fr; }
    /* Alternatives sur mobile : logo + CTA + label resserrés → le CODE s'affiche en
       ENTIER et tout tient large (retour Etienne : « ça dépasse »). */
    .mbs-promo-page .promo-alt { padding: 12px; gap: 10px; }
    .mbs-promo-page .promo-alt-logo { width: 48px; padding: 3px; }
    /* Le label « Code promo » de chaque carte est retiré sur mobile (le titre de
       section « AUTRES CODES PROMO POPULAIRES » donne déjà le contexte) → le CODE
       s'affiche EN ENTIER, sans troncature, et tout tient large. */
    .mbs-promo-page .promo-alt-codelabel { display: none; }
    .mbs-promo-page .promo-alt-code { font-size: 12.5px; }
    .mbs-promo-page .promo-alt-cta { font-size: 11.5px; padding: 6px 11px; }
    .mbs-promo-page .promo-alt-name { font-size: 14px; }

    /* « À propos » : logo EN HAUT + texte dessous (retour Etienne), au lieu du logo
       à gauche qui écrasait le texte sur mobile. */
    .mbs-promo-page .about { flex-direction: column; align-items: flex-start; gap: 12px; }

    /* Pill « Comparer » pleine largeur (jamais de débordement). */
    .mbs-promo-page .cta-pill { width: 100%; padding: 14px 18px; font-size: 14.5px; }

    /* Tableau des prix : EMPILÉ sur mobile — chaque ligne = une carte, plus AUCUN
       scroll horizontal (retour Etienne : jamais scroller vers la droite). */
    .mbs-promo-page .promo-table-wrap { overflow-x: visible; border: none; border-radius: 0; box-shadow: none; }
    .mbs-promo-page .promo-table-el, .mbs-promo-page .promo-table-el tbody, .mbs-promo-page .promo-table-el tr, .mbs-promo-page .promo-table-el td { display: block; width: 100%; }
    .mbs-promo-page .promo-table-el thead { display: none; }
    .mbs-promo-page .promo-table-el tr { border: 1px solid #e2e8f0; border-radius: 13px; margin-bottom: 10px; padding: 12px 14px; background: #fff; box-shadow: 0 6px 16px -12px rgba(14, 43, 77, .25); }
    .mbs-promo-page .promo-table-el tbody tr:nth-child(even) { background: #fff; }
    .mbs-promo-page .promo-table-el td { border: none; padding: 5px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; white-space: normal; }
    .mbs-promo-page .promo-table-el td::before { content: attr(data-label); flex: none; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #94a3b8; }
    .mbs-promo-page .promo-table-el td.promo-table-dest { justify-content: flex-start; gap: 8px; border-bottom: 1px solid #eef2f7; padding: 0 0 9px; margin-bottom: 5px; font-size: 15.5px; line-height: 1.25; }
    .mbs-promo-page .promo-table-el td.promo-table-dest::before { display: none; }
    .mbs-promo-page .promo-table-el td.promo-table-old, .mbs-promo-page .promo-table-el td.promo-table-diff { white-space: nowrap; }
    /* Nouveau prix (avec le code) BIEN mis en avant en vert (retour Etienne) :
       ligne teintée verte + valeur verte, grasse, plus grande. */
    .mbs-promo-page .promo-table-el td.promo-table-diff { background: #ecfdf5; border-left: none; border-radius: 9px; padding: 9px 12px; margin-top: 3px; font-size: 15.5px; font-weight: 800; color: #047857; }
    .mbs-promo-page .promo-table-el td.promo-table-diff::before { color: #047857; }

    /* « meilleur code » : lignes compactées + autorisées à wrapper → tiennent sans déborder. */
    .mbs-promo-page .oc-row { padding: 11px 13px; gap: 9px; flex-wrap: wrap; }
    .mbs-promo-page .oc-code { font-size: 13.5px; }
    .mbs-promo-page .oc-struck { font-size: 13px; }
    .mbs-promo-page .oc-status { font-size: 12px; gap: 7px; }
    .mbs-promo-page .oc-disc-badge { font-size: 12px; padding: 2px 7px; }
}

/* Extra-narrow (Galaxy S8+ ~360px, Z Fold folded ~280px): tighten further so nothing
   overflows the viewport. */
@media (max-width: 360px) {
    .mbs-promo-page { padding: 16px 8px 48px; }
    .mbs-promo-page .bd { padding: 14px 13px 22px; }
    .mbs-promo-page h1.t { font-size: 22px; }
    .mbs-promo-page .cart { padding: 16px 12px; }
    .mbs-promo-page .coupon-body { padding: 14px; }
    .mbs-promo-page .code-box { padding: 10px 10px; }
    .mbs-promo-page .code-box span { font-size: 15px; letter-spacing: .03em; }
    .mbs-promo-page .btn-copy { padding: 0 12px; }
    /* Give the phone order rows room at ~320px so the price isn't clipped by the
       phone screen's overflow:hidden (inline 22px padding -> 15px). */
    .mbs-promo-page [data-promo-cart] { padding-left: 15px !important; padding-right: 15px !important; }

    /* (barre sticky : gérée par le bloc dédié + son breakpoint 560px plus bas) */
}

/* ────────────────────────────────────────────────────────────────────────
 * Barre sticky (bas) — pleine largeur, fond navy marque (#17264a→#24365f),
 * révélée au scroll (.on). Gauche : logo + nom + « code promo CODE ».
 * Droite : réduction au-dessus du bouton « Voir l'offre ». Retour Etienne 2026-07-31.
 * ──────────────────────────────────────────────────────────────────────── */
.mbs-promo-sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 0; opacity: 0; transform: translateY(140%); transition: opacity .25s, transform .25s; pointer-events: none; z-index: 9990; font-family: 'Poppins', system-ui, sans-serif; }
.mbs-promo-sticky-bar.on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mbs-promo-sticky-bar .mps-in { display: flex; align-items: center; justify-content: center; gap: clamp(24px, 5vw, 92px); background: #24365f; border: none; border-radius: 0; box-shadow: 0 -6px 28px -12px rgba(15,23,42,.55); padding: clamp(11px, 1.4vw, 18px) clamp(16px, 4vw, 64px); padding-bottom: calc(clamp(11px, 1.4vw, 18px) + env(safe-area-inset-bottom)); width: 100%; color: #fff; text-decoration: none; cursor: pointer; }
.mbs-promo-sticky-bar .mps-in:hover { color: #fff; }
.mbs-promo-sticky-bar .mps-lft { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 34px); min-width: 0; }
.mbs-promo-sticky-bar .mps-lg { width: clamp(58px, 5.6vw, 78px); height: clamp(58px, 5.6vw, 78px); border-radius: 16px; background: #fff; border: 1px solid rgba(255,255,255,.4); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; padding: 5px; }
.mbs-promo-sticky-bar .mps-lg img { width: 100%; height: 100%; object-fit: contain; }
.mbs-promo-sticky-bar .mps-txt { min-width: 0; text-align: left; }
.mbs-promo-sticky-bar .mps-l1 { font-weight: 800; font-size: clamp(20px, 2.15vw, 31px); line-height: 1.12; color: #fff; white-space: nowrap; }
.mbs-promo-sticky-bar .mps-l1 .mps-pname { font-weight: 800; }
.mbs-promo-sticky-bar .mps-l1 .mps-disc { font-weight: 900; font-size: 1.06em; margin-left: .55em; letter-spacing: normal; }
.mbs-promo-sticky-bar .mps-mavec { display: none; }
.mbs-promo-sticky-bar .mps-l2 { font-size: clamp(17px, 1.9vw, 26px); font-weight: 700; color: #fff; margin-top: 2px; white-space: nowrap; }
.mbs-promo-sticky-bar .mps-code { display: inline-block; vertical-align: middle; background: rgba(255,255,255,.2); color: #fff; padding: 2px 12px; border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .3px; font-size: .95em; margin-left: 0; }
.mbs-promo-sticky-bar .mps-bt { flex-shrink: 0; display: inline-flex; align-items: center; background: #dc2626; color: #fff; font-weight: 800; font-size: clamp(17px, 1.8vw, 22px); padding: clamp(13px, 1.4vw, 18px) clamp(28px, 3.2vw, 52px); border-radius: 14px; box-shadow: 0 12px 26px -8px rgba(220,38,38,.75); white-space: nowrap; }
.mbs-promo-sticky-bar .mps-bt:hover { background: #b91c1c; color: #fff; box-shadow: 0 14px 30px -8px rgba(220,38,38,.85); }
/* No-code affiliate mode (2026-08-04) — mirrors avis-v2.css's own .payg/.nm/.cta/.amt
   1:1 (class-avis-v2-preview.php, 1.8.31 "sexy façon code promo", Etienne's validated
   final round): name as an uppercase eyebrow label, CTA phrase bold uppercase below it,
   amount in amber. See render_promo_page()'s .mps-payg markup. */
.mbs-promo-sticky-bar .mps-payg { text-align: left; min-width: 0; }
.mbs-promo-sticky-bar .mps-payg .mps-nm { display: block; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; font-size: clamp(12px, 1.15vw, 15px); color: #cbd5e1; line-height: 1; margin-bottom: 4px; }
.mbs-promo-sticky-bar .mps-payg .mps-cta { display: block; text-transform: uppercase; letter-spacing: .01em; font-weight: 900; font-size: clamp(20px, 2.15vw, 31px); line-height: 1.03; color: #fff; }
.mbs-promo-sticky-bar .mps-payg .mps-cta .mps-amt { color: #fbbf24; }
@media (max-width: 640px) {
    .mbs-promo-sticky-bar .mps-in { justify-content: center; gap: clamp(10px, 2.6vw, 26px); padding: 8px clamp(11px, 3vw, 24px); padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .mbs-promo-sticky-bar .mps-lft { gap: clamp(9px, 2.3vw, 16px); }
    .mbs-promo-sticky-bar .mps-lg { width: clamp(42px, 11vw, 60px); height: clamp(42px, 11vw, 60px); border-radius: 12px; }
    .mbs-promo-sticky-bar .mps-rdc { display: none; }
    .mbs-promo-sticky-bar .mps-davec { display: none; }
    .mbs-promo-sticky-bar .mps-mavec { display: inline; }
    .mbs-promo-sticky-bar .mps-l1 { font-size: clamp(14px, 4.3vw, 24px); white-space: nowrap; line-height: 1.15; }
    .mbs-promo-sticky-bar .mps-l1 .mps-disc { margin-left: .42em; font-size: 1.18em; }
    .mbs-promo-sticky-bar .mps-l2 { font-size: clamp(12px, 3.6vw, 20px); white-space: nowrap; line-height: 1.15; margin-top: 3px; }
    .mbs-promo-sticky-bar .mps-code { padding: 2px 10px; font-size: 1.1em; }
    .mbs-promo-sticky-bar .mps-bt { font-size: clamp(11px, 3vw, 18px); padding: clamp(8px, 2.4vw, 14px) clamp(12px, 3.4vw, 26px); border-radius: 11px; box-shadow: 0 8px 18px -8px rgba(220,38,38,.7); }
    .mbs-promo-sticky-bar .mps-payg .mps-nm { font-size: clamp(10px, 2.7vw, 13px); letter-spacing: .12em; margin-bottom: 2px; }
    .mbs-promo-sticky-bar .mps-payg .mps-cta { font-size: clamp(15px, 4.3vw, 22px); line-height: 1.1; }
}
