/* ============================================================
   GiftCardX — couche UX mobile « app » (additive)
   Chargée APRÈS site.css + brands.css. Le bureau n'est pas touché :
   tout ce qui change la mise en page vit sous @media (max-width: 767.98px).
   Mobilier : barre d'onglets .mnav (footer.php), barres d'action .mbar,
   feuilles basses (menu, panier, modales, sélecteur de pays), toast.
   ============================================================ */

/* 0 — mobilier d'application masqué par défaut, à toute largeur */
.mnav, .mbar, .msheet-bd, .mtoast, .msearch-btn { display: none; }

@media (max-width: 767.98px) {

  /* ---------- 1. socle ---------- */
  :root {
    --hdr-h: 56px;
    --mnav-h: 62px;
    --sab: env(safe-area-inset-bottom, 0px);
  }
  html { scroll-padding-top: calc(var(--hdr-h) + 12px); }
  [id] { scroll-margin-top: calc(var(--hdr-h) + 12px); }
  body { padding-bottom: calc(var(--mnav-h) + var(--sab)); }
  body.has-mbar { padding-bottom: calc(82px + var(--sab)); }
  html.sheet-lock, html.sheet-lock body { overflow: hidden; }

  h2 { font-size: 22px; }
  .container { width: min(100% - 32px, 1320px); }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .icon-btn { width: 40px; height: 40px; }

  /* ---------- 2. en-tête compact ---------- */
  .site-header { background: rgba(250, 247, 241, .95); }
  .header-inner { padding: 8px 0; gap: 8px; min-height: 56px; }   /* jamais var(--hdr-h) : boucle (JS mesure le header) */
  .brand > svg, .brand > .brand-mark { width: 30px; height: 30px; }
  .brand-word { font-size: 21px; }
  .header-actions { gap: 6px; margin-inline-start: auto; }
  .nav-toggle, .cart-btn { display: none; }                  /* → onglets Menu / Panier */
  body.page-product .cart-btn { display: grid; }             /* la barre d'onglets s'efface derrière la barre d'achat */
  .msearch-btn { display: grid; }
  .msearch-btn .icon { width: 19px; height: 19px; }
  body.msearch-open .msearch-btn { border-color: var(--pine); color: var(--pine-deep); background: var(--mint); }
  body.page-catalog .msearch-btn { display: none; }         /* la barre de recherche y est déjà */
  .chip-btn { height: 40px; padding: 0 11px; font-size: 13px; gap: 5px; white-space: nowrap; }
  .chip-btn > .icon:first-child { display: none; }
  .header-mobile-search { display: none; padding: 0 0 10px; }
  body.page-catalog .header-mobile-search, body.msearch-open .header-mobile-search { display: block; }
  body.page-catalog.hdr-collapsed .header-mobile-search { display: none; }   /* repli au défilement (app-mobile.js) */
  .header-mobile-search input { height: 42px; font-size: 16px; }

  /* ---------- 3. barre d'onglets ---------- */
  .mnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--mnav-h) + var(--sab));
    padding: 4px 4px var(--sab);
    background: rgba(250, 247, 241, .97);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  .mnav a, .mnav button {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; min-width: 0; padding: 4px 2px;
    background: none; border: 0; border-radius: 12px;
    color: var(--muted); font: 600 10.5px/1.2 var(--font-ui);
    text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .mnav .icon { width: 24px; height: 24px; }
  .mnav .lbl { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mnav .is-active { color: var(--pine); }
  .mnav .is-active::before {
    content: ""; position: absolute; top: 0; left: 50%; width: 26px; height: 3px; margin-left: -13px;
    border-radius: 0 0 3px 3px; background: var(--pine);
  }
  .mnav .cart-badge { top: 1px; left: auto; right: auto; inset-inline-end: calc(50% - 22px); }
  body.has-mbar .mnav, html.kb-open .mnav, html.sheet-lock .mnav { display: none; }

  /* ---------- 4. barre d'action contextuelle (fiche, checkout, recharge) ---------- */
  .mbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + var(--sab));
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -16px rgba(24, 39, 32, .3);
    transform: translateY(110%); transition: transform .25s var(--ease);
  }
  body.has-mbar .mbar { transform: none; }
  html.kb-open .mbar, html.sheet-lock .mbar { display: none; }
  .mbar-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .mbar-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
  .mbar-total { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar .btn { flex: none; display: block; max-width: 58%; padding: 12px 18px; font-size: 15px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar .btn:disabled { opacity: .6; }

  /* ---------- 5. feuilles basses ---------- */
  .msheet-bd { position: fixed; inset: 0; z-index: 125; background: rgba(24, 39, 32, .42); animation: mfade .2s var(--ease) both; }
  .msheet-bd.is-on { display: block; }
  @keyframes mfade { from { opacity: 0; } }
  @keyframes msheetPop { from { transform: translateY(100%); } to { transform: none; } }

  /* menu (tiroir → feuille) */
  .mobile-menu-panel {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: min(88vh, 88dvh);
    padding: 8px 18px calc(18px + var(--sab));
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 48px rgba(24, 39, 32, .22);
    transform: translateY(104%);
  }
  .mobile-menu-panel::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 8px; border-radius: 999px; background: var(--line); }
  .mobile-menu.is-open .mobile-menu-panel { transform: translateY(0); }
  .mobile-menu-top { margin-bottom: 8px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-nav a { display: flex; align-items: center; min-height: 52px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 15px; line-height: 1.25; }
  .mobile-menu-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
  .mobile-locale { min-height: 48px; margin-bottom: 8px; }

  /* panier (dropdown → feuille, reste DANS le header : même contexte d'empilement que son voile) */
  .site-header:has(.cart-pop:not([hidden])) { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-wrap .cart-pop {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 130;
    width: auto; min-width: 0; max-height: min(86vh, 86dvh); overflow-y: auto;
    padding: 24px 18px calc(18px + var(--sab));
    border: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 48px rgba(24, 39, 32, .22);
    animation: msheetPop .26s var(--ease) both;
  }
  .menu-wrap .cart-pop::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 999px; background: var(--line); }
  .menu-wrap .cart-pop.cart-pop--empty { padding-top: 30px; }
  .cart-items { max-height: none; }
  .cart-item { padding: 12px 0; }
  .cart-item img { width: 60px; height: 40px; }
  .cart-item-info strong { font-size: 14.5px; }
  .cart-qty button { width: 32px; height: 32px; font-size: 16px; }
  .cart-item-x { width: 36px; height: 36px; font-size: 20px; }
  .cart-foot .btn { min-height: 50px; font-size: 16px; }

  /* modales (préférences, région) → feuilles */
  .modal-panel, .modal:not([hidden]) .modal-panel, .modal.is-closing .modal-panel {
    left: 0; right: 0; top: auto; bottom: 0;
    width: 100%; max-width: none; max-height: min(88vh, 88dvh);
    padding: 22px 18px calc(18px + var(--sab));
    border-radius: 22px 22px 0 0;
    transform: none;
  }
  .modal:not([hidden]) .modal-panel { animation: msheetPop .26s var(--ease) both; }
  .modal.is-closing .modal-panel { animation: msheetPop .18s var(--ease) reverse both; }
  .modal-panel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 999px; background: var(--line); }
  .modal-head { margin-bottom: 10px; }
  .modal-head h2 { font-size: 19px; }
  .pref-row { min-height: 52px; }
  .pref-option { min-height: 50px; }
  .modal-back { min-height: 44px; }
  .modal-save { min-height: 52px; margin-top: 16px; }

  /* sélecteur de pays de la recharge → feuille */
  .tu-country-pop {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 130;
    display: flex; flex-direction: column;
    max-height: min(80vh, 80dvh);
    padding: 22px 16px calc(12px + var(--sab));
    border: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 48px rgba(24, 39, 32, .22);
    animation: msheetPop .26s var(--ease) both;
  }
  .tu-country-pop[hidden] { display: none; }
  .tu-country-pop::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 999px; background: var(--line); }
  .tu-country-search { flex: none; font-size: 16px; }
  .tu-country-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
  .tu-country-list button { min-height: 48px; font-size: 15.5px; }

  /* toast (ajout au panier) */
  .mtoast {
    position: fixed; left: 16px; right: 16px; bottom: calc(var(--mnav-h) + var(--sab) + 12px); z-index: 140;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; background: var(--ink); color: #F3EFE6;
    border-radius: 14px; box-shadow: var(--shadow-l);
    font-size: 14px; font-weight: 600;
    visibility: hidden; opacity: 0; transform: translateY(16px);
    transition: transform .25s var(--ease), opacity .25s, visibility 0s .25s;
  }
  .mtoast.is-on { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .mtoast a { margin-inline-start: auto; padding: 6px 4px; color: #6FC79B; font-weight: 700; text-decoration: none; white-space: nowrap; }
  body.has-mbar .mtoast { bottom: calc(86px + var(--sab)); }
  html.sheet-lock .mtoast { opacity: 0; visibility: hidden; }

  /* ---------- 6. tuiles produit : 2 colonnes compactes ---------- */
  .card-grid, .card-grid--catalog, .card-grid--related, .tu-gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gift-card { border-radius: 14px; }
  .gift-card:hover { transform: none; box-shadow: none; }
  .gc-art { margin: 6px; border-radius: 9px; }
  .gc-badge { top: 6px; left: 6px; gap: 4px; padding: 3px 7px; font-size: 11px; }
  .gc-badge .icon { width: 11px; height: 11px; }
  .gc-range { display: none; }
  .gc-brand { font-size: 17px; }
  .gc-art--text { padding: 12px 10px; }
  .gc-body { gap: 2px; padding: 2px 10px 10px; }
  .gc-row h3 { font-size: 14px; line-height: 1.3; }
  .gc-meta { font-size: 12px; }
  .gc-foot { gap: 6px; padding-top: 8px; }
  .gc-price { gap: 4px; font-size: 12px; }
  .gc-price strong { font-size: 17px; }
  .gc-go { width: 28px; height: 28px; }
  .gc-go .icon { width: 15px; height: 15px; }
  .gift-card--ghost { grid-column: 1 / -1; padding: 22px 16px; }
  .grid-empty { padding: 28px 16px; }

  /* ---------- 7. accueil ---------- */
  .hero-v2 { padding: 16px 0 24px; }
  .hero-v2-grid { gap: 14px; }
  .hero-kicker { margin-bottom: 12px; }
  .hero-v2 h1 { margin-bottom: 10px; font-size: clamp(28px, 8.4vw, 34px); }
  .hero-v2 .hero-sub { margin-bottom: 14px; font-size: 15px; line-height: 1.5; }
  .hero-search-v2 { gap: 6px; padding: 6px 6px 6px 14px; border-radius: 14px; }
  .hero-search-v2 input { min-width: 0; font-size: 16px; }
  .hero-search-v2 .btn { min-height: 40px; padding: 9px 14px; font-size: 14px; }
  .hero-brandrow { flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 12px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .hero-brandrow::-webkit-scrollbar { display: none; }
  .hero-brandchip { flex: none; min-height: 40px; }
  .hero-v2-art { height: 196px; }
  .hero-fan-card { width: 58%; }
  .hero-toast { padding: 8px 12px 8px 10px; }
  .hero-toast strong { font-size: 12.5px; }
  .hero-toast em { font-size: 11px; }

  .catalog { padding: 12px 0 28px; }
  .catalog--category { padding-top: 0; }
  .section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 12px; margin-bottom: 14px; }
  .section-head--center { display: flex; }
  .section-head .eyebrow { margin-bottom: 4px; font-size: 11.5px; }
  .section-sub { margin-top: 4px; font-size: 13.5px; }
  .catalog-all-link { max-width: 132px; min-height: 40px; padding: 8px 12px; font-size: 12.5px; line-height: 1.2; white-space: normal; text-align: center; }
  .page-home .catalog--category .card-grid {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .page-home .catalog--category .card-grid::-webkit-scrollbar { display: none; }
  .page-home .catalog--category .card-grid > .gift-card { flex: 0 0 47%; scroll-snap-align: start; }
  .catalog-more { margin-top: 4px; }
  .catalog-more-sub { font-size: 14px; }
  .catalog-more-cats .chip { min-height: 38px; }

  .how { padding: 0 0 28px; }
  .how-panel { padding: 26px 16px 22px; border-radius: 20px; }
  .steps { gap: 22px; margin-top: 22px; }
  .step-num { top: -22px; font-size: 60px; }
  .step-icon { width: 56px; height: 56px; padding: 15px; margin-bottom: 12px; }
  .step h3 { font-size: 16.5px; }
  .step p { font-size: 14px; }

  .why { padding: 0 0 28px; }
  .why-grid { gap: 10px; margin-top: 16px; }
  .why-card { padding: 16px; }
  .why-card p { font-size: 14px; }
  .pay-row { margin-top: 22px; gap: 8px; }

  .topup-promo { padding: 22px 18px; border-radius: 18px; }
  .topup-promo h2 { font-size: 22px; }
  .topup-promo p { margin-bottom: 16px; font-size: 14px; }
  .topup-promo .btn { width: 100%; }

  .home-faq { padding: 2px 14px; border-radius: 16px; }
  .home-faq .sp-faq summary { padding: 13px 0; padding-inline-end: 26px; font-size: 14.5px; }
  .home-faq .sp-faq p { font-size: 14px; }

  /* ---------- 8. catalogue ---------- */
  .catalog-hero { padding-bottom: 12px; margin-bottom: 10px; }
  .catalog-hero .crumbs { padding-top: 6px; }
  .catalog-hero-inner { margin-top: 0; }
  .catalog-hero-copy .eyebrow { margin-bottom: 4px; font-size: 11.5px; }
  .catalog-hero-copy h1 { font-size: 26px; }
  .catalog-hero .catalog-sub { margin-top: 6px; font-size: 13.5px; }
  .catalog-page { padding-bottom: 36px; }
  .catalog-layout { gap: 10px; }
  .cat-side {
    position: sticky; top: var(--hdr-h); z-index: 20;
    margin: 0 -16px; padding: 8px 16px 6px;
    background: rgba(250, 247, 241, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0;
  }
  .cat-list { gap: 6px; }
  .cat-link { min-height: 38px; padding: 7px 12px; font-size: 13.5px; }
  .pager { gap: 6px; margin-top: 24px; }
  .page-btn { min-width: 44px; height: 44px; }
  .catx { padding: 14px 0 36px; }
  .catx-intro, .catx-cases { gap: 10px; margin-bottom: 14px; }
  .catx-copy h2 { font-size: 22px; }
  .catx-copy p { font-size: 15px; }
  .catx-highlights { padding: 14px 16px; gap: 10px; }
  .catx-case { padding: 14px 16px; }
  .catx-faq { padding: 12px 16px; }
  .catx-faq h2 { font-size: 21px; }

  /* ---------- 9. fil d'Ariane ---------- */
  .crumbs { flex-wrap: nowrap; gap: 6px; padding: 6px 0 2px; font-size: 12.5px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
  .crumbs::-webkit-scrollbar { display: none; }
  .crumbs a, .crumbs [aria-current] { display: inline-block; padding: 8px 0; }
  .crumbs > span[aria-hidden] { flex: none; }

  /* ---------- 10. fiche produit ---------- */
  .pdp { padding: 0 0 36px; }
  .pdp-grid { gap: 12px; padding-top: 6px; }
  .pdp-visual { border-radius: 16px; }
  ul.pdp-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; }
  ul.pdp-trust li { flex-direction: column; align-items: center; gap: 4px; padding: 9px 6px; border-radius: 10px; text-align: center; }
  ul.pdp-trust .icon { width: 18px; height: 18px; margin: 0; }
  ul.pdp-trust strong { font-size: 11.5px; line-height: 1.25; }
  ul.pdp-trust span { display: none; }
  .pdp-panel { padding: 16px 14px 14px; border-radius: 18px; }
  .pdp-panel h1 { font-size: 24px; }
  .pdp-tagline { margin: 6px 0 2px; font-size: 14px; }
  p.pdp-trust { flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; }
  .pdp-label { margin: 14px 0 6px; }
  .pdp-region { min-height: 56px; padding: 10px 12px; }
  .amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .amount { min-height: 46px; padding: 8px 4px; font-size: 15px; }
  .amount--labeled { padding: 7px 5px; }
  .pdp-buyrow { flex-wrap: nowrap; margin: 14px 0 12px; }
  .qty button { width: 44px; height: 46px; }
  .qty input { width: 40px; font-size: 16px; }
  .pdp-total strong { font-size: 26px; }
  .pdp-note { margin-top: 10px; font-size: 12.5px; }
  .pdp-content { margin-top: 28px; }
  .pdp-section { margin-bottom: 32px; }
  .pdp-section h2 { margin-bottom: 12px; font-size: 22px; }
  .pdp-about-grid { gap: 16px; }
  .pdp-about-copy p:not(.eyebrow) { margin-bottom: 12px; font-size: 15px; line-height: 1.7; }
  .pdp-perks { gap: 4px; padding: 10px; }
  .perk { gap: 10px; padding: 8px; }
  .perk-icon { width: 36px; height: 36px; }
  .redeem-steps { gap: 8px; margin-bottom: 14px; }
  .redeem-steps li { padding: 12px 14px; font-size: 13.5px; }
  .pdp-callout { gap: 12px; padding: 14px 16px; }
  .pdp-callout ul { padding-inline-start: 14px; }
  .faq { gap: 8px; }
  .faq-item summary { padding: 13px 14px; font-size: 14.5px; }
  .faq-item p { padding: 0 14px 14px; font-size: 14px; }
  .pdp-related .section-head { margin-bottom: 12px; }

  /* tableau régions × montants → cartes (data-th posé par app-mobile.js) */
  .pdp-table-wrap { overflow: visible; border: 0; background: none; }
  .pdp-table { display: block; min-width: 0; font-size: 14px; }
  .pdp-table thead { display: none; }
  .pdp-table tbody, .pdp-table tr, .pdp-table th, .pdp-table td { display: block; }
  .pdp-table tbody tr { margin-bottom: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  .pdp-table tbody tr:last-child { margin-bottom: 0; }
  .pdp-table tbody th { padding: 0 0 6px; border: 0; font-size: 15px; white-space: normal; }
  .pdp-table td { display: flex; gap: 10px; padding: 3px 0; border: 0; }
  .pdp-table td::before { content: attr(data-th); flex: none; width: 88px; padding-top: 2px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
  .pdp-table td:last-child { line-height: 1.5; }
  .pdp-table-note { font-size: 13.5px; }

  /* ---------- 11. recharge mobile / checkout / commande ---------- */
  .checkout-page, .order-page, .account-page { padding: 4px 0 36px; }
  .checkout-layout, .order-layout, .support-layout { gap: 12px; }
  .checkout-head h1, .order-head h1, .account-head h1, .checkout-empty h1, .account-auth-card h1 { font-size: 24px; }
  .checkout-tag { font-size: 14px; }
  .co-block { margin-top: 0; padding: 16px 14px; border-radius: 16px; }
  .co-block + .co-block, .checkout-main .co-block { margin-top: 12px; }
  .co-block-head { flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; }
  .co-block-head h2 { font-size: 17px; }
  .co-head-hint { flex-basis: 100%; margin: -4px 0 0 38px; }
  [dir="rtl"] .co-head-hint { margin: -4px 38px 0 0; }
  .co-alt { flex-basis: 100%; margin: 0; padding: 4px 0; text-align: start; }
  .co-input { min-height: 48px; font-size: 16px; }
  .co-label { margin: 12px 0 6px; font-size: 13.5px; }
  .co-check { min-height: 44px; }
  .co-check input { width: 20px; height: 20px; }
  .co-login-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .co-login-actions .btn { width: 100%; }
  .co-signed { flex-wrap: wrap; }
  .co-signout { padding: 6px 0; }
  .co-side-card { padding: 14px; border-radius: 16px; }
  .co-side-title { margin-bottom: 10px; }
  .co-place { min-height: 52px; padding: 14px 18px; font-size: 16px; }
  .co-assure { gap: 8px 14px; font-size: 12.5px; }
  .co-item { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img qty line"; gap: 4px 10px; align-items: center; }
  .co-item > img { grid-area: img; width: 60px; height: 40px; }
  .co-item-info { grid-area: info; }
  .co-item-qty { grid-area: qty; }
  .co-item-qty button { width: 32px; height: 32px; }
  .co-item-line { grid-area: line; text-align: end; }
  .co-item-rm { grid-area: rm; justify-self: end; width: 36px; height: 36px; }
  .checkout-empty { padding: 40px 0; }
  .checkout-empty .btn { width: 100%; }

  body.page-topup .checkout-side .co-side-card:not(.co-side-cta) { order: 5; }   /* récap après le formulaire */
  .tu-grid { gap: 12px; }
  .tu-country-btn { min-height: 50px; font-size: 16px; }
  .tu-prefix { min-height: 48px; padding: 12px 10px; }
  .coin-cards, .coin-cards.tu-operators { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .coin-card { min-height: 52px; gap: 8px; padding: 9px 10px; }
  .coin-card:hover { transform: none; }
  .coin-ico { width: 26px; height: 26px; }
  .coin-txt strong { font-size: 13.5px; }
  .tu-op { min-height: 48px; padding: 10px 8px; font-size: 14px; }
  .tu-amounts { gap: 8px; }
  .tu-amounts .coin-chip { min-height: 42px; padding: 9px 14px; font-size: 14.5px; }
  .tu-amount-row { max-width: none; }
  .coin-group-label { margin: 18px 0 9px; }
  .coin-more { margin-top: 18px; }
  .co-morecoins { min-height: 44px; margin-top: 12px; }
  .coin-selected { margin-top: 14px; }
  .tu-country-block { margin-top: 26px; }
  .tu-country-block h2 { margin-bottom: 12px; font-size: 20px; }
  .tu-carrier-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tu-carrier-list li { padding: 10px 12px; }
  .tu-carrier-list strong { font-size: 14px; }
  .tu-country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tu-country-tile { min-height: 46px; padding: 8px 10px; font-size: 13px; }
  .tu-country-tile span { white-space: normal; line-height: 1.25; }
  .tu-block-more a { display: inline-block; padding: 8px 0; }

  .order-head { align-items: flex-start; }
  .order-steps { gap: 8px; margin-top: 14px; }
  .order-steps li { padding: 10px 12px; }
  .order-pay, .order-items-block { margin-top: 12px; padding: 16px 14px; border-radius: 16px; }
  .op-invoice { gap: 14px; padding: 14px; }
  .op-qr { width: 176px; height: 176px; }
  .op-fields { gap: 10px; }
  .op-field-row code { padding: 9px 10px; font-size: 13px; }
  .op-copy { min-height: 44px; padding: 8px 14px; font-size: 13.5px; }
  .order-pay-status { flex-wrap: wrap; gap: 10px; padding: 12px 14px; font-size: 14px; }
  .order-pay-status .btn { margin-inline-start: 0; flex-basis: 100%; }
  .order-side { padding: 14px; }
  .order-items li { gap: 10px; }
  .order-items img { width: 60px; height: 40px; }
  .order-items strong { font-size: 14px; }
  .op-underpaid { padding: 14px; }

  /* ---------- 12. compte / support / suivi ---------- */
  .account-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 14px; }
  .account-head .btn { width: 100%; }
  .ao-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id status" "items total"; gap: 4px 12px; padding: 12px 14px; }
  .ao-id { grid-area: id; }
  .ao-status { grid-area: status; justify-self: end; }
  .ao-items { grid-area: items; }
  .ao-total { grid-area: total; justify-self: end; font-weight: 600; }
  .account-auth { gap: 14px; }
  .account-auth-card { padding: 18px 14px; }
  .account-form .btn { min-height: 50px; }
  .account-auth-aside { padding: 0; }
  .account-auth-aside .btn { width: 100%; }
  .account-empty { padding: 40px 0; }

  .support-page, .redeem-page, .pm-page, .legal-page { padding-bottom: 36px; }
  .support-main .co-block { margin-top: 0; }
  .sp-gate-grid { gap: 0; margin-bottom: 8px; }
  [data-sp-gate] .btn, [data-sp-form] .btn, .support-main form .btn { width: 100%; min-height: 50px; }
  .sp-select, .sp-textarea { font-size: 16px; }
  .sp-faq summary { min-height: 44px; padding: 12px 0; padding-inline-end: 24px; }
  .sp-done { padding: 28px 16px; }

  /* ---------- 13. pages statiques ---------- */
  .rd-steps { gap: 10px; }
  .rd-steps .co-block { padding: 14px 14px 14px 66px; }
  [dir="rtl"] .rd-steps .co-block { padding: 14px 66px 14px 14px; }
  .rd-num { left: 14px; top: 14px; width: 40px; height: 40px; font-size: 18px; }
  [dir="rtl"] .rd-num { left: auto; right: 14px; }
  .rd-steps h2 { font-size: 17px; }
  .rd-steps .btn { width: 100%; }
  .rd-help { margin-top: 12px; }
  .pm-grid { gap: 8px; }
  .pm-coin { min-height: 46px; }
  .legal-body h2 { margin: 22px 0 8px; font-size: 18px; }
  .soon { padding: 36px 0 56px; }
  .soon-art { width: 96px; height: 96px; margin-bottom: 18px; }
  .soon h1 { font-size: 26px; }
  .soon-sub { margin-bottom: 22px; font-size: 15px; }
  .soon-actions { flex-direction: column; gap: 10px; }
  .soon-actions .btn { width: 100%; }

  /* ---------- 14. guides ---------- */
  .guides { padding: 4px 0 36px; }
  .guides-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .guide-card { flex-direction: row; align-items: stretch; border-radius: 14px; }
  .guide-card:hover { transform: none; box-shadow: none; }
  .guide-card > picture { position: relative; display: block; flex: 0 0 36%; min-width: 0; min-height: 118px; }
  .guide-card > picture .guide-card-img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  .guide-card-body { gap: 4px; padding: 10px 12px; }
  .guide-card-body h2 { font-size: 14.5px; line-height: 1.3; }
  .guide-card-body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.45; }
  .guide-card-meta { font-size: 11px; }
  .gd-hero { gap: 12px; }
  .gd-hero-copy h1 { font-family: var(--font-display); font-size: 26px; letter-spacing: -.015em; line-height: 1.1; }
  .gd-hero-art img { border-radius: 14px; }
  .gd-meta { font-size: 12.5px; }
  .gd-body { padding-bottom: 36px; }
  .gd-section { margin-top: 22px; }
  .gd-section > h2 { margin-bottom: 12px; font-size: 22px; }
  .gd-steps { gap: 8px; }
  .gd-step { gap: 12px; padding: 14px; }
  .gd-num { width: 34px; height: 34px; font-size: 15px; }
  .gd-step h3 { font-size: 15.5px; }
  .gd-step p { font-size: 14px; }
  .gd-callout { margin-top: 22px; padding: 16px 18px; }
  .gd-related { gap: 10px; }
  .gd-related-card { padding: 14px 16px; }

  /* ---------- 15. pied de page ---------- */
  .site-footer { font-size: 14px; }
  .footer-grid { gap: 0; padding: 28px 0 10px; }
  .f-brand { margin-bottom: 16px; }
  .f-brand .brand { margin-bottom: 10px; }
  .f-tag { margin-bottom: 8px; font-size: 13.5px; }
  .f-hello { font-size: 12.5px; }
  .f-col { gap: 0; border-top: 1px solid rgba(243, 239, 230, .12); }
  .f-col .f-head { margin: 0; }
  .f-acc-btn {
    display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px;
    padding: 0; background: none; border: 0; color: #8FB39C;
    font: 700 12.5px/1.2 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; text-align: start;
    -webkit-tap-highlight-color: transparent;
  }
  .f-acc-btn::after { content: ""; width: 9px; height: 9px; margin-inline-end: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); }
  .f-acc-btn[aria-expanded="true"]::after { transform: rotate(-135deg); }
  .f-links { display: none; padding: 0 0 10px; }
  .f-acc-btn[aria-expanded="true"] + .f-links { display: grid; }
  .f-links a { display: flex; align-items: center; width: auto; min-height: 42px; font-size: 14.5px; }
  .f-mid { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 0; }
  .pay-chip { min-height: 36px; }
  .pay-chip-more { padding: 0 10px; }
  .pay-chip-more a { display: flex; align-items: center; min-height: 36px; }
  .catalog-clear { display: inline-block; padding: 8px 0; }
  .sp-side-note a, .order-side-note a, .tu-block-more a { display: inline-block; padding: 6px 0; }
  .pm-coin .coin-net { font-size: 10px; }
  .f-bottom { flex-direction: column; gap: 6px; padding: 12px 0 18px; text-align: center; }
  .f-bottom nav { gap: 6px; }
  .f-bottom nav a { display: inline-block; padding: 9px 8px; }

  /* ---------- 16. divers ---------- */
  .catalog-hero-perks { display: none; }
  .search-status { font-size: 13.5px; }
  .chip { min-height: 36px; }
  .hero-brandchip--all, .hero-brandchip--topup { min-height: 40px; }
}

/* téléphone en paysage : barres plus basses, libellés d'onglets masqués */
@media (max-width: 767.98px) and (max-height: 480px) and (orientation: landscape) {
  :root { --mnav-h: 48px; }
  .mnav a, .mnav button { min-height: 40px; }
  .mnav .lbl { display: none; }
  .mbar { padding-top: 6px; }
  .mbar .btn { min-height: 40px; padding: 9px 16px; }
  .mobile-menu-panel, .menu-wrap .cart-pop, .modal-panel, .modal:not([hidden]) .modal-panel, .tu-country-pop { max-height: 92vh; }
}

/* petits téléphones (≤ 360 px) */
@media (max-width: 360px) {
  .brand-word { font-size: 19px; }
  .chip-btn { padding: 0 8px; font-size: 12px; }
  .mnav a, .mnav button { font-size: 10px; }
  .amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-home .catalog--category .card-grid > .gift-card { flex-basis: 60%; }
  .mbar .btn { padding: 12px 14px; font-size: 14px; }
  body.page-product .msearch-btn { display: none; }
}

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .mbar, .mtoast, .mobile-menu-panel, .f-acc-btn::after { transition: none; }
  .menu-wrap .cart-pop, .modal:not([hidden]) .modal-panel, .modal.is-closing .modal-panel, .tu-country-pop, .msheet-bd { animation: none; }
}
