/* ======================================================
   RNF – Cart RAF (Amazon-like)
   Scope : uniquement page panier
   Dépendance : body.rnf-cart-raf
   Notes :
   - Layout Desktop: grille 3 colonnes
   - Mobile: remove en overlay + suppression labels Woo "Produit/Quantité"
   - Stepper: Astra (a.minus/a.plus) stylisé RAF (pas de .rnf-qty)
   - Mini-header: header.rf-mini-checkout-header (mobile)
   ====================================================== */

body.rnf-cart-raf .woocommerce-cart-form{
  margin-top: 16px;
}

/* ------------------------------------------------------
   1) RESET TABLE WOOCOMMERCE / ASTRA
------------------------------------------------------ */
body.rnf-cart-raf table.shop_table,
body.rnf-cart-raf table.shop_table thead,
body.rnf-cart-raf table.shop_table tbody,
body.rnf-cart-raf table.shop_table tr,
body.rnf-cart-raf table.shop_table td{
  border: 0 !important;
  background: transparent !important;
}

body.rnf-cart-raf table.shop_table thead{
  display: none !important;
}

/* ------------------------------------------------------
   2) CARTE PRODUIT – DESKTOP (structure principale)
------------------------------------------------------ */
body.rnf-cart-raf tr.cart_item{
  display: grid !important;
  grid-template-columns: 110px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 8px;

  background: #fff;
  border: 1px solid #ecdce2;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;

  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

body.rnf-cart-raf tr.cart_item > td{
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  position: static !important;
}

/* Image */
body.rnf-cart-raf td.product-thumbnail{
  grid-column: 1;
  grid-row: 1 / span 2;
}
body.rnf-cart-raf td.product-thumbnail img{
  width: 96px;
  height: auto;
  border-radius: 14px;
  border: 1px solid #f3e8ec;
  display: block;
}

/* Nom + actions */
body.rnf-cart-raf td.product-name{
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
body.rnf-cart-raf td.product-name a{
  font-weight: 700;
  color: #2b2b2b;
  text-decoration: none;
}
body.rnf-cart-raf td.product-name a:hover{
  text-decoration: underline;
}

body.rnf-cart-raf .rnf-cart-actions-inline{
  margin-top: 6px;
}
body.rnf-cart-raf .rnf-cart-actions-inline a{
  font-size: 13px;
  color: #a14b68;
  text-decoration: none;
}
body.rnf-cart-raf .rnf-cart-actions-inline a:hover{
  text-decoration: underline;
}

/* Prix (un seul) */
body.rnf-cart-raf td.product-price{
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: end;

  font-weight: 800;
  font-size: 16px;
  color: #a14b68;
  white-space: nowrap;
}

/* Sous-total ligne masqué */
body.rnf-cart-raf td.product-subtotal{
  display: none !important;
}

/* Quantité */
body.rnf-cart-raf td.product-quantity{
  grid-column: 2;
  grid-row: 2;
}

/* Stepper Astra -> DA RAF */
body.rnf-cart-raf td.product-quantity .quantity{
  display: inline-flex;
  align-items: center;
  gap: 6px;

  border: 1px solid #ecdce2;
  border-radius: 999px;
  padding: 4px 6px;
  background: #fff;
}

body.rnf-cart-raf td.product-quantity .quantity a.minus,
body.rnf-cart-raf td.product-quantity .quantity a.plus{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #ecdce2;
  background: #f7e8ed;
  color: #a14b68;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  font-size: 16px;
  line-height: 1;
  user-select: none;
}

body.rnf-cart-raf td.product-quantity .quantity a.minus:hover,
body.rnf-cart-raf td.product-quantity .quantity a.plus:hover{
  background: #fdf7fa;
}

body.rnf-cart-raf td.product-quantity .quantity input.qty{
  width: 34px !important;
  min-width: 34px !important;
  border: 0 !important;
  background: transparent !important;
  text-align: center !important;
  font-weight: 700;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
}

/* Accessibilité: cacher les SR-only hors écran */
body.rnf-cart-raf td.product-quantity .quantity .screen-reader-text{
  position: absolute !important;
  left: -9999px !important;
}

/* Supprimer (croix) – desktop */
body.rnf-cart-raf td.product-remove{
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
}
body.rnf-cart-raf td.product-remove a.remove{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #ecdce2;
  background: #f7e8ed;
  color: #a14b68 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}
body.rnf-cart-raf td.product-remove a.remove:hover{
  opacity: 1;
}

/* ------------------------------------------------------
   3) MOBILE – layout robuste (remove en overlay)
------------------------------------------------------ */
@media (max-width: 767px){

  /* Woo/Astra responsive: supprime les labels "Produit:", "Quantité:" */
  body.rnf-cart-raf .shop_table_responsive tr.cart_item td::before{
    display: none !important;
    content: none !important;
  }

  /* Grille mobile stable + espace pour la croix */
  body.rnf-cart-raf tr.cart_item{
    position: relative !important;
    grid-template-columns: 86px 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 8px 12px !important;
    padding: 12px 12px 14px !important;
    padding-right: 44px !important;
  }

  /* Remove en overlay top-right */
  body.rnf-cart-raf td.product-remove{
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2;
  }
  body.rnf-cart-raf td.product-remove a.remove{
    width: 30px !important;
    height: 30px !important;
  }

  /* Image à gauche */
  body.rnf-cart-raf td.product-thumbnail{
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
  }
  body.rnf-cart-raf td.product-thumbnail img{
    width: 76px !important;
  }

  /* Nom/Actions à droite */
  body.rnf-cart-raf td.product-name{
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  /* Neutralise wrappers Astra qui peuvent recentrer */
  body.rnf-cart-raf td.product-name .ast-product-image,
  body.rnf-cart-raf td.product-name .ast-product-name{
    display: block !important;
    text-align: left !important;
  }

  body.rnf-cart-raf td.product-name a{
    display: block !important;
    text-align: left !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
    margin: 0 !important;
  }

  body.rnf-cart-raf .rnf-cart-actions-inline{
    margin-top: 6px !important;
  }

  /* Prix sous le titre */
  body.rnf-cart-raf td.product-price{
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    text-align: left !important;
    font-size: 15px !important;
    margin: 0 !important;
  }

  /* Quantité sous le prix */
  body.rnf-cart-raf td.product-quantity{
    grid-column: 2 !important;
    grid-row: 3 !important;
    justify-self: start !important;
    margin: 0 !important;
  }
}

/* ------------------------------------------------------
   4) LIVRAISON ESTIMÉE
------------------------------------------------------ */
body.rnf-cart-raf .rnf-delivery{
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ecdce2;
  border-radius: 16px;
  background: #fff;
  margin: 16px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

body.rnf-cart-raf .rnf-delivery__icon{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #f7e8ed;
  color: #a14b68;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.rnf-cart-raf .rnf-delivery__title{
  font-weight: 800;
  color: #2b2b2b;
  margin-bottom: 2px;
}

body.rnf-cart-raf .rnf-delivery__sub{
  font-size: 13px;
  color: #6f6a6c;
}

/* ------------------------------------------------------
   5) MIS DE CÔTÉ (même style que cartes panier)
------------------------------------------------------ */
body.rnf-cart-raf .rnf-saved{
  margin-top: 18px;
}

body.rnf-cart-raf .rnf-saved__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}

body.rnf-cart-raf .rnf-saved__title{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #2b2b2b;
}

body.rnf-cart-raf .rnf-saved__clear{
  color: #a14b68;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
body.rnf-cart-raf .rnf-saved__clear:hover{
  text-decoration: underline;
}

body.rnf-cart-raf .rnf-saved__list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 768px){
  body.rnf-cart-raf .rnf-saved__list{
    grid-template-columns: 1fr 1fr;
  }
}

body.rnf-cart-raf .rnf-saved__item{
  display: grid;
  grid-template-columns: 110px 1fr;
  column-gap: 16px;
  row-gap: 8px;

  background: #fff;
  border: 1px solid #ecdce2;
  border-radius: 16px;
  padding: 14px;

  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

body.rnf-cart-raf .rnf-saved__media img,
body.rnf-cart-raf .rnf-saved__img{
  width: 96px;
  height: auto;
  border-radius: 14px;
  border: 1px solid #f3e8ec;
  display: block;
}

body.rnf-cart-raf .rnf-saved__name{
  font-weight: 800;
  color: #2b2b2b;
  margin: 0 0 6px;
}

body.rnf-cart-raf .rnf-saved__meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #6f6a6c;
  font-size: 13px;
  margin: 0 0 10px;
}

body.rnf-cart-raf .rnf-saved__move{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #ecdce2;
  border-radius: 12px;
  padding: 8px 10px;

  background: #f7e8ed;
  color: #a14b68;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  width: fit-content;
}
body.rnf-cart-raf .rnf-saved__move:hover{
  background: #fdf7fa;
}

/* ------------------------------------------------------
   6) WOO NOTICES (Panier)
------------------------------------------------------ */
body.rnf-cart-raf .woocommerce-notices-wrapper{
  margin: 12px 0 14px;
}

body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-message,
body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-info,
body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-error{
  position: relative;
  border: 1px solid #ecdce2 !important;
  border-radius: 16px !important;
  background: #fff !important;
  padding: 12px 14px 12px 44px !important;
  margin: 0 0 10px !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  color: #2b2b2b !important;
  font-weight: 700;
}

body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-message::before{
  content: "♥";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f7e8ed;
  border: 1px solid #ecdce2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a14b68;
  font-size: 14px;
  line-height: 1;
}

body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-info::before{
  content: "i";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f7e8ed;
  border: 1px solid #ecdce2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a14b68;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}

body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-error{
  border-color: #f1c9d6 !important;
  background: #fff7fa !important;
}

body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-error::before{
  content: "!";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #f7e8ed;
  border: 1px solid #f1c9d6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a14b68;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}

body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-message a,
body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-info a{
  color: #a14b68;
  font-weight: 800;
  text-decoration: none;
}
body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-message a:hover,
body.rnf-cart-raf .woocommerce-notices-wrapper .woocommerce-info a:hover{
  text-decoration: underline;
}

/* ------------------------------------------------------
   7) MINI HEADER – Mobile (logo -> reassurance -> retour)
   HTML fourni :
   <header class="rf-mini-checkout-header"> ... </header>
------------------------------------------------------ */
@media (max-width: 767px){

  body.rnf-cart-raf header.rf-mini-checkout-header{
    background: #fff !important;
    border-bottom: 1px solid #f3e8ec !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.04);
  }

  body.rnf-cart-raf .rf-mini-checkout-header-inner{
    padding: 10px 12px 12px !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
  }

  /* 1) Logo */
  body.rnf-cart-raf .rf-mch-center{
    order: 1;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  body.rnf-cart-raf a.rf-mch-logo img{
    max-height: 34px !important;
    width: auto !important;
    display: block;
  }

  /* 2) Réassurance (chips en ligne) */
  body.rnf-cart-raf .rf-mch-right{
    order: 2;
    width: 100%;
  }
  body.rnf-cart-raf ul.rf-mch-reassurance{
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;

    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;

    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px !important;
  }
  body.rnf-cart-raf ul.rf-mch-reassurance::-webkit-scrollbar{
    height: 0;
  }
  body.rnf-cart-raf ul.rf-mch-reassurance li{
    flex: 0 0 auto;
    white-space: nowrap;

    border: 1px solid #ecdce2 !important;
    background: #fff !important;
    border-radius: 999px !important;

    padding: 9px 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #6f6a6c !important;

    box-shadow: 0 4px 14px rgba(0,0,0,0.03);
  }

  /* 3) Retour minimaliste */
  body.rnf-cart-raf .rf-mch-left{
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  body.rnf-cart-raf a.rf-mch-back{
    display: inline-flex !important;
    align-items: center;
    gap: 8px;

    padding: 4px 2px !important;
    border: 0 !important;
    background: transparent !important;

    color: #a14b68 !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    text-decoration: none !important;
  }

  /* Remplace visuellement “← Retourner en boutique” par “← Retour” */
  body.rnf-cart-raf a.rf-mch-back{
    font-size: 0 !important;
  }
  body.rnf-cart-raf a.rf-mch-back::before{
    content: "← Retour";
    font-size: 13px;
    font-weight: 800;
  }
}

/* ======================================================
   RAF – Upsell items : rail horizontal (mobile)
   Markup: .rnf-fsp-upsell-items > .rnf-fsp-upsell-item
   ====================================================== */
@media (max-width: 767px){

  body.rnf-cart-raf .rnf-fsp-upsell-items{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;

    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 6px 2px 10px !important;
    margin: 0 !important;
  }

  body.rnf-cart-raf .rnf-fsp-upsell-items::-webkit-scrollbar{
    height: 0;
  }

  body.rnf-cart-raf .rnf-fsp-upsell-item{
    flex: 0 0 74% !important;
    max-width: 320px;
    scroll-snap-align: start;

    background: #fff;
    border: 1px solid #ecdce2;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  }

  body.rnf-cart-raf .rnf-fsp-upsell-thumb{
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #f3e8ec;
    background: #fff;
  }
  body.rnf-cart-raf .rnf-fsp-upsell-thumb img{
    display: block;
    width: 100%;
    height: auto;
  }

  body.rnf-cart-raf .rnf-fsp-upsell-name{
    margin-top: 10px;
    font-weight: 800;
    line-height: 1.25;
  }
  body.rnf-cart-raf .rnf-fsp-upsell-name a{
    color: #2b2b2b;
    text-decoration: none;
  }

  body.rnf-cart-raf .rnf-fsp-upsell-price{
    margin-top: 6px;
    color: #a14b68;
    font-weight: 900;
  }
  body.rnf-cart-raf .rnf-fsp-upsell-price del{
    color: #6f6a6c;
    opacity: .8;
    margin-right: 6px;
  }

  body.rnf-cart-raf .rnf-fsp-upsell-btn{
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #ecdce2;
    background: #f7e8ed;

    color: #a14b68;
    font-weight: 900;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
  }
  body.rnf-cart-raf .rnf-fsp-upsell-btn:hover{
    background: #fdf7fa;
  }
}

/* ======================================================
   RAF – Free Gift grid : rail horizontal (mobile)
   Markup : .rf-fg-grid > .rf-fg-item
   ====================================================== */
@media (max-width: 767px){

  body.rnf-cart-raf .rf-fg-grid{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;

    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;

    padding: 6px 2px 10px !important;
    margin: 0 !important;
  }

  body.rnf-cart-raf .rf-fg-grid::-webkit-scrollbar{
    height: 0;
  }

  body.rnf-cart-raf .rf-fg-item{
    flex: 0 0 74% !important;
    max-width: 320px;
    scroll-snap-align: start;

    background: #fff;
    border: 1px solid #ecdce2;
    border-radius: 16px;
    padding: 12px;

    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  }

  body.rnf-cart-raf .rf-fg-thumb{
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #f3e8ec;
    background: #fff;
  }

  body.rnf-cart-raf .rf-fg-thumb img{
    display: block;
    width: 100%;
    height: auto;
  }

  body.rnf-cart-raf .rf-fg-info{
    margin-top: 10px;
  }

  body.rnf-cart-raf .rf-fg-title{
    font-weight: 800;
    line-height: 1.25;
    color: #2b2b2b;
    margin-bottom: 6px;
  }

  body.rnf-cart-raf .rf-fg-price{
    font-size: 14px;
    margin-bottom: 10px;
  }

  body.rnf-cart-raf .rf-fg-old{
    color: #6f6a6c;
    text-decoration: line-through;
    margin-right: 6px;
  }

  body.rnf-cart-raf .rf-fg-free{
    color: #a14b68;
    font-weight: 900;
  }

  body.rnf-cart-raf .rf-fg-add{
    width: 100%;
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid #ecdce2;
    background: #f7e8ed;

    color: #a14b68;
    font-weight: 900;
    font-size: 14px;
  }

  body.rnf-cart-raf .rf-fg-add:hover{
    background: #fdf7fa;
  }
}

/* ======================================================
   RAF – Expédition (Cart totals) – basé sur ton HTML
   Sélectionné: li.rnf-ship-selected
   Objectifs:
   - cartes propres avec camion
   - pas de débordement sur PC
   - pas de texte coupé au début
   ====================================================== */

/* On évite que la colonne du tableau force le débordement */
body.rnf-cart-raf .cart_totals td{
  min-width: 0 !important;
}

/* Liste */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods{
  width: 500px !important;
  list-style: none !important;
  margin: 10px 0 12px !important;
  padding: 0 !important;
margin-left:10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 767px){
  body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods{
  width: 100% !important;
}}  

/* Carte */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;

  position: relative;
  border: 1px solid #ecdce2 !important;
  border-radius: 16px !important;
  background: #fff !important;
  padding: 12px 12px 12px 56px !important; /* place camion (stable) */
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .12s ease;
}

body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li:hover{
  border-color: #eab0c0 !important;
  background: #fdf7fa !important;
}

/* Radio caché (accessible) */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li input.shipping_method{
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
}

/* Label = grille texte + prix (anti-débordement) */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li label{
  cursor: pointer;
  margin: 0 !important;

  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;

  min-width: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
  transform: none !important;

  font-weight: 800;
  color: #2b2b2b;
  line-height: 1.2;

  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: visible !important;
}

/* Prix */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li label .amount,
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li label .woocommerce-Price-amount{
  font-weight: 900;
  color: #a14b68;
  white-space: nowrap !important;
}

/* Camion (pastille) */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li::before{
  content: "🚚";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(0);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7e8ed;
  border: 1px solid #ecdce2;
  color: #a14b68;
  font-size: 16px;
  line-height: 1;
  transition: transform .22s ease, background-color .22s ease, border-color .22s ease;
}

/* État sélectionné (persistant via ta classe) */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li.rnf-ship-selected{
  border-color: #eab0c0 !important;
  background: #fff7fa !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
}

@keyframes rf-truck-start{
  0%   { transform: translateY(-50%) translateX(0); }
  60%  { transform: translateY(-50%) translateX(10px); }
  100% { transform: translateY(-50%) translateX(6px); }
}

body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li.rnf-ship-selected::before{
  left: 14px;
  background: #fff7fa;
  border-color: #eab0c0;
  animation: rf-truck-start .28s ease-out 1;
  transform: translateY(-50%) translateX(6px);
}

/* Motion safe */
@media (prefers-reduced-motion: reduce){
  body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li::before{
    transition: none !important;
    animation: none !important;
  }
}

/* Texte d’aide */
body.rnf-cart-raf .woocommerce-shipping-destination{
  margin: 10px 0 6px !important;
  color: #6f6a6c !important;
  font-size: 13px;
}

/* Calculateur */
body.rnf-cart-raf .woocommerce-shipping-calculator{
  margin-top: 8px;
}

body.rnf-cart-raf .woocommerce-shipping-calculator .shipping-calculator-button{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a14b68;
  font-weight: 800;
  text-decoration: none;
}
body.rnf-cart-raf .woocommerce-shipping-calculator .shipping-calculator-button:hover{
  text-decoration: underline;
}

/* Form calc */
body.rnf-cart-raf .woocommerce-shipping-calculator-form{
  margin-top: 10px;
  border: 1px solid #ecdce2;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}

body.rnf-cart-raf .woocommerce-shipping-calculator-form .form-row{
  margin-bottom: 10px;
}

body.rnf-cart-raf .woocommerce-shipping-calculator-form label{
  font-size: 13px;
  font-weight: 800;
  color: #2b2b2b;
}

body.rnf-cart-raf .woocommerce-shipping-calculator-form .input-text,
body.rnf-cart-raf .woocommerce-shipping-calculator-form select{
  border: 1px solid #ecdce2 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

body.rnf-cart-raf .woocommerce-shipping-calculator-form button.button{
  border-radius: 14px !important;
  background: #f7e8ed !important;
  border: 1px solid #ecdce2 !important;
  color: #a14b68 !important;
  font-weight: 900 !important;
}

/* Mobile: prix sous le libellé */
@media (max-width: 767px){
  body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li label{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 6px;
  }

  body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li label .amount,
  body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li label .woocommerce-Price-amount{
    justify-self: start;
    font-size: 14px;
  }
}

/* ======================================================
   Expédition : titre au-dessus (plein largeur)
   ====================================================== */
body.rnf-cart-raf .cart_totals tr.woocommerce-shipping-totals{
  display: block !important;
}

body.rnf-cart-raf .cart_totals tr.woocommerce-shipping-totals > th,
body.rnf-cart-raf .cart_totals tr.woocommerce-shipping-totals > td{
  display: block !important;
  width: 100% !important;
}

body.rnf-cart-raf .cart_totals tr.woocommerce-shipping-totals > th{
  padding: 0 0 8px !important;
  margin: 0 !important;
  border: 0 !important;

  font-weight: 900;
  font-size: 16px;
  color: #a14b68;
}

body.rnf-cart-raf .cart_totals tr.woocommerce-shipping-totals > td{
  padding: 0 !important;
  border: 0 !important;
}
/* ======================================================
   FIX – Mobile overflow (grand blanc à droite)
   Version corrigée : scope limité au panier RAF
   ====================================================== */
@media (max-width: 767px){

  /* 1) On NE touche plus jamais à html/body.
        On limite le "no overflow-x" à la page panier RAF. */
  body.rnf-cart-raf{
    overflow-x: hidden !important;
  }

  /* 2) Le wrapper principal ne doit jamais dépasser */
  body.rnf-cart-raf #page,
  body.rnf-cart-raf .site,
  body.rnf-cart-raf .site-content,
  body.rnf-cart-raf .content-area,
  body.rnf-cart-raf .ast-container,
  body.rnf-cart-raf .woocommerce{
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 3) Woo tables (souvent la source) */
  body.rnf-cart-raf table.shop_table,
  body.rnf-cart-raf .cart_totals table{
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;   /* clé anti-débordement */
  }

  body.rnf-cart-raf table.shop_table td,
  body.rnf-cart-raf table.shop_table th,
  body.rnf-cart-raf .cart_totals td,
  body.rnf-cart-raf .cart_totals th{
    min-width: 0 !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* 4) Évite qu’un élément inline “force” une largeur */
  body.rnf-cart-raf img,
  body.rnf-cart-raf svg,
  body.rnf-cart-raf iframe{
    max-width: 100% !important;
    height: auto !important;
  }

  /* 5) Cartes produits : autorise la colonne texte à rétrécir */
  body.rnf-cart-raf tr.cart_item{
    min-width: 0 !important;
  }
  body.rnf-cart-raf td.product-name,
  body.rnf-cart-raf td.product-price,
  body.rnf-cart-raf td.product-quantity{
    min-width: 0 !important;
  }

  /* 6) Empêche un “nowrap” agressif (prix/labels) de pousser le viewport */
  body.rnf-cart-raf td.product-price,
  body.rnf-cart-raf .woocommerce-Price-amount,
  body.rnf-cart-raf #shipping_method label{
    max-width: 100% !important;
  }
}


/* ======================================================
   PATCH – Expédition : camion centré + trait “route”
   Cible: #shipping_method > li::before (pastille) + ::after (route)
   ====================================================== */

/* 1) On sécurise le centrage vertical/horizontal de la pastille */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li{
  position: relative; /* au cas où */
}

body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li::before{
  /* centrage strict */
  top: 50% !important;
  left: 14px !important;
  transform: translateY(-50%) !important;

  width: 30px !important;
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

/* 2) Route : un trait fin sous la pastille, qui “défile” quand sélectionné */
@keyframes rf-road-move{
  0%   { background-position: 0 0; }
  100% { background-position: 14px 0; }
}

/* On prépare la route (invisible si non sélectionné) */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li::after{
  content: "";
  position: absolute;
  left: 14px;               /* aligné avec la pastille */
  top: 50%;
  transform: translateY(calc(-50% + 14px)); /* sous la pastille */
  width: 30px;
  height: 6px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;

  /* “route” : un trait + petits pointillés */
  background:
    linear-gradient(to right, rgba(161,75,104,0.22), rgba(161,75,104,0.22)) center / 100% 2px no-repeat,
    repeating-linear-gradient(
      to right,
      rgba(161,75,104,0.22) 0,
      rgba(161,75,104,0.22) 4px,
      rgba(161,75,104,0.00) 4px,
      rgba(161,75,104,0.00) 8px
    ) center / 100% 2px no-repeat;
}

/* 3) “Roule” en permanence sur sélectionné : bounce + route animée */
@keyframes rf-truck-roll-bounce{
  0%,100% { transform: translateY(-50%) translateX(6px); }
  50%     { transform: translateY(calc(-50% - 1px)) translateX(6px); }
}

body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li.rnf-ship-selected::before{
  transform: translateY(-50%) translateX(6px) !important;
  animation: rf-truck-roll-bounce 0.55s ease-in-out infinite;
}

body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li.rnf-ship-selected::after{
  opacity: 1;
  animation: rf-road-move 0.45s linear infinite;
}

/* Motion safe */
@media (prefers-reduced-motion: reduce){
  body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li.rnf-ship-selected::before,
  body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li.rnf-ship-selected::after{
    animation: none !important;
  }
}
/* ======================================================
   PATCH – Camion SVG centré (remplace l’emoji)
   ====================================================== */

/* Pastille : on enlève le texte emoji */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li::before{
  content: "" !important;                 /* plus d’emoji */
  font-size: 0 !important;
}

/* Camion SVG en “mask” pour un rendu net + centré */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li::before{
  /* garde tes dimensions/position existantes */
  width: 30px !important;
  height: 30px !important;

  /* couleur du pictogramme */
  background-color: #a14b68;

  /* masque SVG */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h10v9h-1.1a2.5 2.5 0 0 0-4.8 0H8.9a2.5 2.5 0 0 0-4.8 0H3V7Zm14 2h3.3l1.7 2.3V14h-1.1a2.5 2.5 0 0 0-4.8 0H15V9h2ZM7 15.5A1.5 1.5 0 1 1 7 18.5 1.5 1.5 0 0 1 7 15.5Zm12 0A1.5 1.5 0 1 1 19 18.5 1.5 1.5 0 0 1 19 15.5Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h10v9h-1.1a2.5 2.5 0 0 0-4.8 0H8.9a2.5 2.5 0 0 0-4.8 0H3V7Zm14 2h3.3l1.7 2.3V14h-1.1a2.5 2.5 0 0 0-4.8 0H15V9h2ZM7 15.5A1.5 1.5 0 1 1 7 18.5 1.5 1.5 0 0 1 7 15.5Zm12 0A1.5 1.5 0 1 1 19 18.5 1.5 1.5 0 0 1 19 15.5Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat;

  /* IMPORTANT: on remet le fond de pastille via un pseudo “inset” avec box-shadow */
  border-radius: 999px !important;
  box-shadow:
    inset 0 0 0 999px #f7e8ed,   /* fond pastille */
    inset 0 0 0 1px #ecdce2;     /* bordure pastille */
}

/* État sélectionné : fond/bordure de pastille adaptés */
body.rnf-cart-raf #shipping_method.woocommerce-shipping-methods > li.rnf-ship-selected::before{
  box-shadow:
    inset 0 0 0 999px #fff7fa,
    inset 0 0 0 1px #eab0c0;
}

