/* ══════════════════════════════════
   Template Arche publicitaire — basé sur la fiche Rollup
   ══════════════════════════════════ */

body#product #wrapper .container {
  padding-top: 20px !important;
}

body#product #wrapper .container {
  padding-left: 60px !important;
  padding-right: 60px !important;
  max-width: 1400px;
}

:root {
  --rp-blue:   #0078c8;
  --rp-blue-h: #005fa3;
  --rp-border: #e5e7eb;
  --rp-radius: 6px;
  --rp-text:   #111827;
  --rp-muted:  #6b7280;
  --rp-active: #eff6ff;
  --rp-cta-gap: 24px;   /* écart unique prix → bouton « Ajouter au panier » (tous types) */
}

/* ════ Fil d'Ariane ════ */
.rp-breadcrumb { margin: 0 0 20px; }
.rp-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--rp-muted);
}
.rp-breadcrumb__item { display: inline-flex; align-items: center; }
.rp-breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: var(--rp-muted);
}
.rp-breadcrumb__item a { color: var(--rp-blue); text-decoration: none; }
.rp-breadcrumb__item a:hover { text-decoration: underline; }
.rp-breadcrumb__item span[aria-current] { color: var(--rp-text); font-weight: 500; }
@media (max-width: 600px) {
  .rp-breadcrumb { margin-bottom: 14px; }
  .rp-breadcrumb__list { font-size: .8rem; }
}

/* ── Cartes accessoires (carrousel produits complémentaires) ── */
.rp-acc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--rp-border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}
.rp-acc-card__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f7f7f8;
}
.rp-acc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.rp-acc-card__name {
  display: block;
  padding: 12px 12px 4px;
  color: var(--rp-text);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.rp-acc-card__name:hover { color: var(--rp-blue); }
.rp-acc-card__price {
  padding: 0 12px 14px;
  color: var(--rp-blue);
  font-weight: 700;
  font-size: 1rem;
}

/* ── Pleine largeur ── */
body#product #wrapper,
body#product #content-wrapper,
body#product .product-container,
body#product .tabs {
  width: 100% !important;
  max-width: 100% !important;
}
body#product #content-wrapper { flex: 0 0 100% !important; max-width: 100% !important; }
body#product #left-column, body#product #right-column { display: none !important; }
body#product .container,
body#product main > .container,
body#product #main > .container {
  width: 95% !important;
  max-width: 2400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ── Layout 40/60 ── */
.rp-wrap {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 84px;
  align-items: start;
  margin-bottom: 40px;
  width: 100%;
}
@media (max-width: 1400px) {
  .rp-wrap {
    grid-template-columns: 38% 1fr;
    gap: 66px;
  }
}
@media (max-width: 1200px) {
  .rp-wrap {
    grid-template-columns: 36% 1fr;
    gap: 54px;
  }
}
@media (max-width: 991px) {
  .rp-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
@media (max-width: 991px) { .rp-wrap { grid-template-columns: 1fr; gap: 24px; } }

/* ── Galerie sticky ── */
.rp-gallery { position: sticky; top: 140px; align-self: start; }
.rp-gallery .product-cover { border-radius: 12px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.rp-gallery .product-cover img { width: 100% !important; height: auto !important; display: block; object-fit: contain; }
.rp-gallery .product-thumbnails { margin-top: 12px; }

/* ── Titre ── */
.rp-info__title {
  font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em;
  margin: 0 0 36px; color: var(--rp-text); line-height: 1.2; text-transform: none;
}

/* ── Prix haut — même style que prix bas ── */
.rp-top-price { margin: 0 0 18px; }
.rp-top-price .product-price h2,
.rp-top-price .current-price-value,
.rp-top-price span.price {
  font-size: 1.75rem !important; font-weight: 700 !important; color: var(--rp-blue) !important;
}
.rp-top-price .tax-shipping-delivery-label,
.rp-top-price .delivery-information { display: none !important; }

/* ── Description courte ── */
.rp-info__desc {
  font-size: .9rem; line-height: 1.65; color: #374151;
  margin-bottom: 12px;
}

/* ── Description longue (sous la courte) ── */
.rp-info__longdesc {
  font-size: .9rem; line-height: 1.7; color: #374151;
  margin-bottom: 24px; padding-bottom: 0; border-bottom: none;
}
/* Trait sous la description : seulement s'il y a des champs de déclinaison en dessous */
.rp-info:has(.product-variants-item) .rp-info__longdesc {
  padding-bottom: 20px; border-bottom: 1px solid var(--rp-border);
}
.rp-info__longdesc p { margin: 0 0 10px; }
.rp-info__longdesc > :last-child { margin-bottom: 0; }
.rp-info__longdesc ul, .rp-info__longdesc ol { margin: 0 0 10px; padding-left: 20px; }

/* ══════════════════════════════════
   VARIANTES NATIVES PS — restyled en lignes
   ══════════════════════════════════ */

/* Conteneur groupe */
.rp-info .product-variants-item {
  margin-bottom: 16px;
}

/* Label du groupe */
.rp-info .product-variants-item > label,
.rp-info .product-variants-item .control-label {
  display: block !important;
  font-size: .78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  color: var(--rp-muted) !important;
  margin-bottom: 8px !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

/* Options radio → lignes cliquables */
.rp-info .product-variants-item ul,
.rp-info .product-variants-item .clearfix {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.rp-info .product-variants-item li {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Label de chaque option */
.rp-info .product-variants-item label:not(.control-label),
.rp-info .product-variants-item .input-container label {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  padding: 12px 16px !important;
  border: 1.5px solid var(--rp-border) !important;
  border-radius: var(--rp-radius) !important;
  cursor: pointer !important;
  background: #fff !important;
  transition: border-color .15s, background .15s !important;
  font-size: .92rem !important;
  font-weight: 500 !important;
  color: var(--rp-text) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  outline: none !important;
}

.rp-info .product-variants-item label:not(.control-label):hover {
  border-color: var(--rp-blue) !important;
  background: var(--rp-active) !important;
}

/* Option sélectionnée — via l'input checked */
.rp-info .product-variants-item input:checked + span,
.rp-info .product-variants-item input[type="radio"]:checked ~ span { color: var(--rp-blue) !important; }

/* Hack : styler le label parent quand input est checked */
.rp-info .product-variants-item .rp-selected {
  border-color: var(--rp-blue) !important;
  background: var(--rp-active) !important;
  box-shadow: 0 0 0 1px var(--rp-blue) !important;
}

/* Masquer les inputs radio/checkbox SANS cadre noir */
.rp-info .product-variants-item input[type="radio"],
.rp-info .product-variants-item input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Dropdown select natif PS — avec flèche personnalisée */
.rp-info .product-variants-item select {
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 42px 0 16px !important;        /* espace à droite pour la flèche */

  border: 1.5px solid var(--rp-border) !important;
  border-radius: var(--rp-radius) !important;

  font-size: .95rem !important;
  line-height: 48px !important;
  box-sizing: border-box !important;

  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 14px 14px !important;

  cursor: pointer !important;

  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;          /* masque la flèche native Firefox */
}
.rp-info .product-variants-item select:focus { border-color: var(--rp-blue) !important; }

/* ── Bloc prix + quantité + bouton (sous le tableau) ── */
.rp-cart-block {
  margin-top: 20px;
  padding-top: 0;
  border-top: none;
}
/* Trait au-dessus du panier : seulement s'il y a des champs de déclinaison au-dessus */
.rp-info form:has(.product-variants-item) .rp-cart-block {
  padding-top: 16px;
  border-top: 1px solid var(--rp-border);
}

/* (ancien bloc quantité + bouton fusionné ici) */

/* Prix bas — grand, bleu */
.rp-cart-block .product-price h2,
.rp-cart-block .current-price-value,
.rp-cart-block span.price {
  font-size: 2.5rem !important; font-weight: 700 !important; color: var(--rp-blue) !important;
}
.rp-cart-block .delivery-information { display: none !important; }
/* Label taxe affiché à côté du prix */
.rp-cart-block .product-prices {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 0 10px !important;
  margin-bottom: 0;   /* écart vers le bouton porté par .product-quantity (uniforme) */
}
.rp-cart-block .tax-shipping-delivery-label {
  display: inline-block !important;
  font-size: .85rem !important;
  font-weight: 500 !important;
  color: var(--rp-muted) !important;
  margin: 0 !important;
}

/* ── Quantité (tarif dégressif) + bouton sur la même ligne, hauteur fixe ── */
.rp-cart-block .product-quantity {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  margin-top: var(--rp-cta-gap);
}
.rp-cart-block .product-quantity .qty { flex: 0 0 auto; margin: 0 !important; }
.rp-cart-block .product-quantity .add { flex: 0 0 auto; margin: 0 !important; }
.rp-cart-block .product-add-to-cart .control-label,
.rp-cart-block label[for*="quantity"] { display: none !important; }

/* On neutralise l'habillage du widget touchspin (rendu instable) … */
.rp-cart-block .product-quantity .input-group,
.rp-cart-block .product-quantity .bootstrap-touchspin,
.rp-cart-block .product-quantity .js-touchspin {
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}
/* … et on masque ses flèches +/- */
.rp-cart-block .product-quantity .input-group-btn,
.rp-cart-block .product-quantity .input-group-btn-vertical,
.rp-cart-block .product-quantity .bootstrap-touchspin-up,
.rp-cart-block .product-quantity .bootstrap-touchspin-down {
  display: none !important;
}

/* Champ quantité simple et net */
.rp-cart-block .product-quantity input[name="qty"],
.rp-cart-block .product-quantity input.qty,
.rp-cart-block .product-quantity .qty input {
  width: 84px !important;
  height: 56px !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 1.5px solid var(--rp-border) !important;
  border-radius: var(--rp-radius) !important;
  text-align: center !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  background: #fff !important;
}
.rp-cart-block .product-quantity input[name="qty"]:focus,
.rp-cart-block .product-quantity .qty input:focus { border-color: var(--rp-blue) !important; outline: none !important; }

/* Liste déroulante des paliers + champ libre */
.rp-cart-block .product-quantity .rp-qty-control {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
}
.rp-cart-block .product-quantity .rp-qty-select {
  height: 56px;
  min-width: 122px;
  padding: 0 40px 0 14px;
  border: 1.5px solid var(--rp-border);
  border-radius: var(--rp-radius);
  font-size: 1rem;
  font-weight: 600;
  color: var(--rp-text);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
.rp-cart-block .product-quantity .rp-qty-select:focus { border-color: var(--rp-blue); outline: none; }
.rp-cart-block .product-quantity .rp-qty-custom {
  width: 84px;
  height: 56px;
  text-align: center;
  border: 1.5px solid var(--rp-border);
  border-radius: var(--rp-radius);
  font-size: 1rem;
  font-weight: 600;
  box-shadow: none;
}
.rp-cart-block .product-quantity .rp-qty-custom:focus { border-color: var(--rp-blue); outline: none; }

/* ── Bouton panier — identique aux cartes de visite ── */
.rp-cart-block .product-add-to-cart,
.rp-cart-block .btn-primary-outline { width: 100% !important; display: block !important; }

.rp-cart-block .add-to-cart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: auto !important;
  max-width: 100% !important;

  height: 56px !important;
  padding: 0 80px !important;

  background: var(--rp-blue) !important;
  color: #fff !important;

  border: none !important;
  border-radius: 10px !important;

  font-size: 1.1rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;

  cursor: pointer !important;
  box-shadow: none !important;
  transition: all .2s ease !important;

  margin-top: 18px !important;
  outline: none !important;
}
.rp-cart-block .add-to-cart:hover { background: var(--rp-blue-h) !important; }
/* Alignement : quand le bouton est sur la même rangée que la quantité,
   la marge haute (utile seulement si le bouton est seul sur sa ligne)
   décalerait le bouton vers le bas → on la neutralise pour que
   bouton, champ quantité et liste « Autre quantité… » restent centrés. */
.rp-cart-block .product-quantity .add-to-cart { margin-top: 0 !important; }
/* Petits écrans : bouton pleine largeur, padding réduit */
@media (max-width: 600px) {
  .rp-cart-block .add-to-cart { width: 100% !important; padding: 0 24px !important; }
}

/* ══════════════════════════════════
   Tableau des remises dégressives (natif PS)
   ══════════════════════════════════ */
/* Aucun séparateur ni espace si le tableau de remises est vide/absent
   (PrestaShop rend parfois le conteneur même sans paliers) */
.rp-info .product-discounts {
  margin: 0;
  padding: 0;
  border: none;
}
/* Séparateurs (haut + bas) UNIQUEMENT quand le tableau contient vraiment des paliers */
.rp-info .product-discounts:has(.table-product-discounts tbody tr) {
  margin: 24px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--rp-border);      /* séparateur au-dessus du tableau */
  border-bottom: 1px solid var(--rp-border);   /* séparateur sous le tableau */
}
.rp-info .product-discounts .product-discounts-title,
.rp-info .product-discounts-title {
  font-size: .78rem !important; font-weight: 700 !important;
  text-transform: uppercase !important; letter-spacing: .08em !important;
  color: var(--rp-muted) !important; margin: 0 0 10px !important;
}

.rp-info .table-product-discounts {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--rp-border) !important;
  border-radius: var(--rp-radius) !important;
  overflow: hidden;
  font-size: .9rem;
  margin: 0;
}
.rp-info .table-product-discounts thead th {
  background: #f8fafc !important;
  color: var(--rp-text) !important;
  font-weight: 700 !important;
  font-size: .78rem !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  padding: 12px 14px !important;
  text-align: center !important;
  border: none !important;
  border-bottom: 1px solid var(--rp-border) !important;
}
.rp-info .table-product-discounts tbody td {
  padding: 11px 14px !important;
  text-align: center !important;
  border: none !important;
  border-bottom: 1px solid var(--rp-border) !important;
  color: var(--rp-text) !important;
  background: #fff !important;
}
.rp-info .table-product-discounts tbody tr:last-child td { border-bottom: none !important; }
.rp-info .table-product-discounts tbody tr:hover td { background: var(--rp-active) !important; }
/* colonne « Vous économisez » en bleu */
.rp-info .table-product-discounts tbody td:last-child { color: var(--rp-blue) !important; font-weight: 700 !important; }

/* ══════════════════════════════════
   Bloc d'infos sous la description : devis (mpq) au-dessus, bandeaux (.ets_pn_block) en dessous
   ══════════════════════════════════ */
.js-product-additional-info {
  display: flex;
  flex-direction: column;
  margin: 18px 0 4px;
}
.js-product-additional-info .ets_pn_block {
  order: 1;                      /* bandeaux sous le bouton devis */
  border-radius: var(--rp-radius);
  margin: 0 0 10px;
  padding: 14px 16px;
  line-height: 1.5;
  font-size: .9rem;
}
.js-product-additional-info .ets_pn_block:last-child { margin-bottom: 0; }
.js-product-additional-info .ets_pn_block a { font-weight: 700; }

/* Bouton « Demander un devis » (module mpq) — remonté au-dessus des bandeaux, bleu plein */
.js-product-additional-info .mpq-wrap {
  order: -1;                     /* au-dessus des bandeaux */
  margin: 0 0 12px;
}
.js-product-additional-info .mpq-open,
.mpq-wrap .mpq-open {
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: 100% !important;
  height: 56px !important;
  padding: 0 80px !important;
  background: var(--rp-blue) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all .2s ease !important;
  outline: none !important;
}
.js-product-additional-info .mpq-open:hover,
.mpq-wrap .mpq-open:hover {
  background: var(--rp-blue-h) !important;
  color: #fff !important;
}
/* Petits écrans : identique au panier — pleine largeur, padding réduit */
@media (max-width: 600px) {
  .js-product-additional-info .mpq-open,
  .mpq-wrap .mpq-open { width: 100% !important; padding: 0 24px !important; }
}

/* ── Badge livraison ── */
.rp-delivery {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0f9ff; color: #0369a1;
  font-size: .82rem; font-weight: 600;
  padding: 7px 14px; border-radius: 20px; margin: 22px 0 16px;
}

/* ── Notices ── */
.rp-notice { padding: 12px 16px; border-radius: var(--rp-radius); font-size: .83rem; line-height: 1.55; margin-bottom: 18px; }
.rp-notice a { font-weight: 700; color: inherit; text-decoration: underline; }
.rp-notice--red { background:#fff5f5; border-left:4px solid #fc8181; color:#c53030; }
.rp-notice--orange { background:#fffaf0; border-left:4px solid #f6ad55; color:#c05621; }
.rp-notice--green { background:#f0fff4; border-left:4px solid #68d391; color:#276749; }

/* Alerte fichiers — mise en avant */
.rp-notice--alert {
  border-left-width: 5px !important;
  animation: rp-alert-pulse 2.4s ease-in-out infinite;
}
.rp-notice--alert .rp-notice__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 6px;
}
.rp-notice--alert .rp-notice__head svg { flex: 0 0 auto; margin-top: 1px; }
.rp-notice--alert .rp-notice__head u { text-decoration-thickness: 2px; }

@keyframes rp-alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246,173,85,.5); }
  50%      { box-shadow: 0 0 0 5px rgba(246,173,85,0); }
}
@media (prefers-reduced-motion: reduce) {
  .rp-notice--alert { animation: none; }   /* respecte les réglages d'accessibilité */
}

/* ── Produits associés ── */
.rp-accessories { margin: 30px 0 20px; padding: 20px 0; border-top: 1px solid var(--rp-border); }
.rp-accessories__title { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--rp-muted); margin-bottom: 12px; }
.rp-carousel { overflow: hidden; }
.rp-carousel__track { display: flex; transition: transform .4s ease; width: 100%; }
.rp-carousel__item { flex: 0 0 33.333%; min-width: 33.333%; padding: 0 6px; box-sizing: border-box; }
@media (max-width: 767px) { .rp-carousel__item { flex: 0 0 100%; min-width: 100%; } }
.rp-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.rp-carousel__dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: #cbd5e1; cursor: pointer; padding: 0; transition: background .2s; }
.rp-carousel__dot.is-active { background: var(--rp-blue); }

/* ── Gabarits + devis ── */
.rp-bottom-row { margin-top: 20px; margin-bottom: 12px; }
.rp-attachments { background: #f8fafc; border: 1px solid var(--rp-border); border-radius: var(--rp-radius); padding: 12px 16px; margin-bottom: 10px; }
.rp-attachments__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rp-text); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.rp-attachments__links { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-attachments__link { font-size: .82rem; color: var(--rp-blue); text-decoration: none; padding: 4px 10px; background: #fff; border: 1px solid #bfdbfe; border-radius: 4px; transition: background .15s; }
.rp-attachments__link:hover { background: var(--rp-active); }
.rp-attachments__link span { color: var(--rp-muted); font-size: .78rem; }
.rp-devis { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: var(--rp-muted); margin-top: 22px; margin-bottom: 12px; }
.rp-devis__btn { display: inline-block; background: var(--rp-blue); color: #fff !important; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 7px 16px; border-radius: var(--rp-radius); text-decoration: none !important; white-space: nowrap; transition: background .15s; }
.rp-devis__btn:hover { background: var(--rp-blue-h); }

/* ── Tabs ── */
.rp-tabs {
  margin-top: 40px;
}

.rp-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* ← centrage des onglets */
  border-bottom: 2px solid var(--rp-border);
  margin-bottom: 24px;
}

.rp-tabs__btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 12px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--rp-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.rp-tabs__btn:hover {
  color: var(--rp-blue);
}

.rp-tabs__btn.is-active {
  color: var(--rp-blue);
  border-bottom-color: var(--rp-blue);
}

.rp-tabs__panel {
  display: none;
  font-size: .9rem;
  line-height: 1.7;
  color: #374151;
}

.rp-tabs__panel.is-active {
  display: block;
}

/* ── Contenu de l'onglet : forcer l'affichage du tab-pane Bootstrap ── */
/* PrestaShop enveloppe le contenu dans .tab-pane.fade (opacity:0) ; on le rend visible */
.rp-tabs__panel .tab-pane,
.rp-tabs__panel #product-details {
  display: block !important;
  opacity: 1 !important;
}

/* Logo fabricant : éviter un affichage géant */
.rp-tabs__panel .product-manufacturer { margin-bottom: 16px; }
.rp-tabs__panel .product-manufacturer img,
.rp-tabs__panel .manufacturer-logo {
  max-width: 160px !important;
  height: auto !important;
}

/* Fiche technique / caractéristiques : lisibilité */
.rp-tabs__panel .data-sheet { width: 100%; margin: 0; }
.rp-tabs__panel .data-sheet dt,
.rp-tabs__panel .data-sheet .name { font-weight: 700; color: var(--rp-text); }
.rp-tabs__panel .data-sheet dd,
.rp-tabs__panel .data-sheet .value { color: #374151; margin: 0 0 8px; }

.rp-tab-file {
  margin-bottom: 12px;
}

.rp-tab-file a {
  font-weight: 600;
  color: var(--rp-blue);
}

.rp-tab-file p {
  margin: 4px 0 0;
  color: var(--rp-muted);
  font-size: .85rem;
}

/* ── Masquer "vous aimerez aussi" natif PS en bas ── */
.product-accessories, section.product-accessories { display: none !important; }


/* ─────────────────────────────
   Cross-selling (produits associés)
   ───────────────────────────── */

/* Conteneur global */
.featured-products {
  text-align: center;
  margin-top: 50px;
}

/* Titre */
.featured-products h2 {
  display: inline-block;
  margin: 0 auto 28px;
  padding: 0;
  font-size: .99rem;
  font-weight: 600;
  color: var(--rp-text);
  line-height: 1.3;
  border-bottom: none !important;
}

/* Liste produits centrée */
.featured-products .products {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

/* Carte produit */
.featured-products .product-miniature {
  float: none !important;
  display: inline-block;
  margin: 0 !important;
  text-align: center;
}

/* Image produit */
.featured-products .thumbnail-container {
  margin-bottom: 10px;
}

/* Nom produit */
.featured-products .product-title {
  text-align: center;
  font-size: .9rem;
  font-weight: 500;
  margin-top: 6px;
}

/* Lien du nom produit : sans trait */
.featured-products .product-title a {
  display: inline-block;
  padding-bottom: 0;
  border-bottom: none !important;
  text-decoration: none;
}

/* Prix */
.featured-products .product-price-and-shipping {
  text-align: center;
  margin-top: 6px;
  font-weight: 600;
}


/* ─────────────────────────────
   Galerie produit custom
   ───────────────────────────── */

.rp-gallery-main {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  align-items: start;
}

.rp-gallery-sidebar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.rp-gallery-thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-gallery-thumb {
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.rp-gallery-thumb.is-active {
  border-color: var(--rp-blue);
}

.rp-gallery-thumb img {
  display: block;
  width: 84px;
  height: auto;
}

/* Image principale + flèches */
.rp-gallery-cover {
  position: relative;
}

.rp-gallery-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

.rp-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255,255,255,.55);
  border: none;
  border-radius: 50%;
  color: var(--rp-muted);
  cursor: pointer;
  box-shadow: none;
  opacity: .45;
  transition: opacity .15s, background .15s, color .15s;
  z-index: 2;
}

.rp-gallery-nav svg { width: 16px; height: 16px; }

/* visibles franchement seulement au survol de l'image */
.rp-gallery-cover:hover .rp-gallery-nav { opacity: 1; }

.rp-gallery-nav:hover {
  background: rgba(255,255,255,.9);
  color: var(--rp-text);
}

.rp-gallery-nav--prev { left: 8px; }
.rp-gallery-nav--next { right: 8px; }

/* sur écrans tactiles (pas de survol), on les laisse un peu visibles */
@media (hover: none) {
  .rp-gallery-nav { opacity: .7; }
}

@media (max-width: 991px) {
  .rp-gallery-nav { width: 32px; height: 32px; }
}

.rp-gallery #pvc-wrapper,
.rp-gallery .pvc-carousel-wrapper,
.rp-gallery .pvc-wrapper {
  margin-top: 18px;
}

@media (max-width: 991px) {
  .rp-gallery-main {
    grid-template-columns: 1fr;
  }

  .rp-gallery-thumbs {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .rp-gallery-thumb img {
    width: 72px;
  }
}

.rp-gallery-videos {
  margin-top: 36px;
  margin-left: calc(84px + 18px);
  width: calc(100% - 84px - 18px);
}

.rp-gallery-videos .pvc-section-label {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.rp-gallery-videos .pvc-carousel {
  gap: 16px;
}

@media (max-width: 991px) {
  .rp-gallery-videos {
    margin-left: 0;
    width: 100%;
  }
}
/* ══════════════════════════════════════════════════════════════════
   MODE COMMUN — placement automatique selon les éléments présents
   Détection en pur CSS via :has() (aucun réglage manuel par type).
   ══════════════════════════════════════════════════════════════════ */

/* Le formulaire devient une colonne flex pour pouvoir réordonner ses blocs */
.rp-info form {
  display: flex;
  flex-direction: column;
}

/* Ordre par défaut : déclinaisons → dimensions → remises → PRIX → bandeaux/devis */
.rp-info .rp-cart-block { order: 2; }
.rp-info .js-product-additional-info { order: 3; }

/* Si un bouton « Demander un devis » est présent, on remonte le bloc devis/bandeaux
   AU-DESSUS du prix — sans déplacer le DOM (la popup du module continue de fonctionner). */
.rp-info form:has(.js-product-additional-info .mpq-open) .js-product-additional-info { order: 1; }

/* ── Produit au m² : uniquement si le bloc Dimensions est présent ─────── */
/* Le module affiche son propre prix dynamique (#ppbs-price) → on masque prix natif + quantité */
.rp-info form:has(#ppbs-widget) .rp-cart-block .product-prices { display: none !important; }
/* on masque le champ quantité mais PAS le bloc (qui contient le bouton « Ajouter au panier ») */
.rp-info form:has(#ppbs-widget) .rp-cart-block .product-quantity .qty,
.rp-info form:has(#ppbs-widget) .rp-cart-block .product-quantity .product-minimal-quantity { display: none !important; }
/* Le séparateur est porté par #ppbs-price : on neutralise celui du bloc panier */
.rp-info form:has(#ppbs-widget) .rp-cart-block {
  border-top: none !important; margin-top: 0 !important; padding-top: 0 !important;
}
.rp-info form:has(#ppbs-widget) .product-variants { margin-bottom: 0 !important; }
.rp-info form:has(#ppbs-widget) .product-variants-item:last-child { margin-bottom: 0 !important; }

/* ── Widget Dimensions (module Product Price By Size) — auto-masqué si absent ── */
.rp-info #ppbs-widget { margin: 48px 0 0 !important; }
#ppbs-widget h6 {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--rp-muted); margin: 0 0 10px;
}
#ppbs-widget .unit-selector { margin: 0 0 12px; }
#ppbs-widget .product-fields-wrapper {
  display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 14px !important;
}
@media (max-width: 480px) {
  #ppbs-widget .product-fields-wrapper { grid-template-columns: 1fr !important; }
}
#ppbs-widget .product-field-wrapper { margin: 0; }
#ppbs-widget .field-name {
  display: block !important; position: static !important;
  font-size: .82rem !important; font-weight: 600 !important; color: var(--rp-text) !important;
  margin: 0 0 6px !important; text-align: left !important;
}
#ppbs-widget .field-input-group {
  display: flex !important; align-items: stretch !important; position: relative !important;
  border: 1.5px solid var(--rp-border) !important; border-radius: var(--rp-radius) !important;
  overflow: hidden; background: #fff;
}
#ppbs-widget .field-input-group:focus-within { border-color: var(--rp-blue) !important; }
#ppbs-widget .field-input-group input,
#ppbs-widget input.product-field {
  flex: 1 1 auto !important; width: auto !important; border: none !important; outline: none !important;
  height: 46px !important; padding: 0 12px !important; font-size: .95rem !important;
  text-align: left !important; background: transparent !important; box-shadow: none !important;
}
#ppbs-widget .field-input-group input:focus,
#ppbs-widget input.product-field:focus { border: none !important; outline: none !important; }
#ppbs-widget .product-field-unit {
  position: static !important; display: flex !important; align-items: center !important;
  width: auto !important; height: auto !important; padding: 0 12px !important; border: none !important;
  border-left: 1px solid var(--rp-border) !important; background: #f8fafc !important;
  color: var(--rp-muted) !important; font-size: .85rem !important; line-height: normal !important;
  text-align: center !important;
}
#ppbs-widget .error { display: block; color: #c53030; font-size: .75rem; margin-top: 4px; }
#ppbs-widget #ppbs-price {
  border-top: 1px solid var(--rp-border) !important; padding-top: 20px !important; margin: 22px 0 0 !important;
  font-size: 2.5rem !important; font-weight: 700 !important; line-height: 1.15 !important;
  color: var(--rp-blue) !important; text-align: left !important;
}
#ppbs-widget #rp-m2-price,
.rp-info #rp-m2-price {
  display: block !important; font-size: .9rem !important; color: var(--rp-muted) !important;
  line-height: 1.3 !important; margin: 6px 0 0 !important;   /* écart vers le bouton géré par .product-quantity (uniforme) */
}
#ppbs-widget #ppbs-area-price { display: none !important; }
#ppbs-widget .ppbs-stock-warning { color: #c05621; font-size: .82rem; margin-top: 6px; }

/* ══════════════════════════════════════════════════════════════════
   AJUSTEMENTS CHAMPS — contour plus foncé + flèche plus marquée
   ══════════════════════════════════════════════════════════════════ */
:root { --rp-field-border: #9ca3af; }   /* gris nettement plus foncé que --rp-border */

/* Contour des champs (déclinaisons, quantité, dimensions) plus foncé */
.rp-info .product-variants-item select,
.rp-cart-block .product-quantity .rp-qty-select,
.rp-cart-block .product-quantity .rp-qty-custom,
.rp-cart-block .product-quantity input[name="qty"],
.rp-cart-block .product-quantity input.qty,
.rp-cart-block .product-quantity .qty input,
#ppbs-widget .field-input-group {
  border-color: var(--rp-field-border) !important;
}

/* Flèche des listes déroulantes — plus épaisse (3.4) et plus foncée */
.rp-info .product-variants-item select,
.rp-cart-block .product-quantity .rp-qty-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

/* Sécurité visuelle : masque toute copie en double du bloc Dimensions
   (le JS la retire du DOM ; ceci évite tout clignotement avant exécution) */
.js-product-additional-info #ppbs-widget { display: none !important; }

/* ── Séparateurs conditionnels + label taxe (suite) ── */
/* Neutralise un éventuel trait natif du thème entre déclinaisons et bloc suivant */
.rp-info .product-variants,
.rp-info .product-variants-item:last-child { border-bottom: none !important; }

/* Pas de séparateur accessoires si le carrousel est vide */
.rp-accessories { border-top: none; }
.rp-accessories:has(.rp-carousel__item) {
  border-top: 1px solid var(--rp-border);
}

/* Label taxe ajouté à côté du prix module (#ppbs-price) pour les produits au m² */
.rp-tax-label {
  font-size: .85rem !important;
  font-weight: 500 !important;
  color: var(--rp-muted) !important;
  align-self: baseline !important;
  white-space: nowrap !important;
}

/* ── Ligne « prix + mention de taxe » (produits au m²) ──
   Le séparateur est porté par la ligne (pleine largeur), le prix garde sa taille,
   et la mention de taxe reste à côté du prix (elle survit aux mises à jour du module). */
#rp-price-row {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 0 10px !important;
  border-top: 1px solid var(--rp-border) !important;
  padding-top: 20px !important;
  margin: 22px 0 0 !important;
}
#rp-price-row #ppbs-price {
  border-top: none !important;
  padding-top: 0 !important;
  margin: 0 !important;
}

/* ── Échange vidéos ⇄ produits complémentaires ── */
/* Vidéos déplacées dans la colonne de droite : annule l'alignement spécifique galerie */
.rp-info-videos {
  margin-top: 24px !important;
  margin-left: 0 !important;
  width: 100% !important;
}
/* Trait au-dessus du bloc vidéo, uniquement s'il contient réellement une vidéo */
.rp-info-videos:has(*) {
  border-top: 1px solid var(--rp-border);
  padding-top: 24px !important;
  margin-top: 28px !important;
}
/* Produits complémentaires sous la photo (colonne gauche)
   Un seul trait (en haut), plus d'air entre la photo et ce trait, pas de trait en bas */
.rp-accessories--under-gallery {
  margin: 48px 0 0 !important;
  padding: 28px 0 0 !important;
  border-top: 1px solid var(--rp-border) !important;
  border-bottom: none !important;
}

/* Évite un double trait : si le tableau de remises (rollup) est juste au-dessus,
   on retire le trait du bloc panier (le tableau a déjà sa bordure du bas) */
.rp-info form:has(.table-product-discounts tbody tr) .rp-cart-block {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 12px !important;
}