/*
 * Agriprotec - comparateur de produits (2026-10-27, lot D de S2/S3).
 * Règles écrites pour Agriprotec (aucune ligne reprise du module payant cdproductcomparisonplus) ; valeurs relevées sur la
 * référence (styles calculés, outils\s2\lot-d\lot-d-styles.py) pour un rendu identique au pixel. Chargée par le module
 * agriprotec_comparateur AVANT custom.css (priorité par défaut de PrestaShop, 50, comme l'ancienne feuille) : custom.css garde la main (couleur verte
 * des boutons, bandeau de la page /compare, boutons toujours visibles).
 * Plan : 1. icônes ; 2. bouton « ajouter / retirer » ; 3. barre fixe et panneaux ; 4. page /compare ; 5. impression ;
 *        6. liste de suggestions de la recherche.
 */

/* ---------- 1. icônes (symboles SVG #cdpcp-icon-…) ---------- */
[class^="cdpcp-icon-"],
[class*=" cdpcp-icon-"] {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0;
  pointer-events: none;
}
.btn [class^="cdpcp-icon-"],
.btn [class*=" cdpcp-icon-"] {
  margin-top: -0.2em;
  margin-right: 0.2em;
  vertical-align: middle;
}

/* ---------- 2. bouton « Ajouter à la comparaison » ---------- */
.cdpcp-compare-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
  margin: 0 auto !important;
}
.cdpcp-compare-btn--above-list { margin-bottom: 0.5rem !important; }
.cdpcp-compare-btn--below-list { margin-bottom: 1.5rem !important; }
/* produit hors liste blanche : caché ici, mais custom.css du thème le remet visible (comme sur la référence) */
.cdpcp-compare-btn--blacklisted { visibility: hidden !important; }
/* fiche produit */
.product-additional-info .cdpcp-compare-btn,
.product-information .cdpcp-compare-btn {
  display: block;
  float: none;
  width: auto;
  margin: 1.5rem 0 0.5rem !important;
}
/* un seul couple icône + texte visible selon l'état */
.cdpcp-compare-btn__icon,
.cdpcp-compare-btn__text,
.cdpcp-compare-btn--loading .cdpcp-compare-btn__icon--add,
.cdpcp-compare-btn--loading .cdpcp-compare-btn__icon--remove {
  display: none;
}
.cdpcp-compare-btn--add .cdpcp-compare-btn__icon--add,
.cdpcp-compare-btn--add .cdpcp-compare-btn__text--add,
.cdpcp-compare-btn--remove .cdpcp-compare-btn__icon--remove,
.cdpcp-compare-btn--remove .cdpcp-compare-btn__text--remove,
.cdpcp-compare-btn--loading .cdpcp-compare-btn__icon--loading {
  display: inline-block;
}
.cdpcp-compare-btn--loading .cdpcp-compare-btn__icon {
  animation: agri-comparateur-tourne 2s linear infinite;
}
@keyframes agri-comparateur-tourne {
  from { transform: rotate(0deg); }
  to { transform: rotate(359deg); }
}
.cdpcp-compare-now { margin: 1rem 0; }

/* ---------- 3. barre fixe (bas à droite), panneaux, voile ---------- */
#cdpcp-fake-miniatures,
.cdpcp {
  display: none;
}
.cdpcp {
  position: fixed;
  bottom: 0;
  z-index: 9996;
  width: auto;
  max-width: 100%;
  height: 81px;
  opacity: 0;
  direction: ltr !important;
}
.cdpcp * { box-sizing: border-box; }
.cdpcp-show-sticky-footer .cdpcp { display: block; }
.cdpcp--bottom_right { right: 0; }
.cdpcp--bottom_left { left: 0; }

.cdpcp__items-wrapper {
  width: calc(100% - 46px);
  padding: 10px 7.5px 10px 15px;
  border-top: 1px solid transparent;
  white-space: nowrap;
  vertical-align: top;
}
.cdpcp--bottom_right .cdpcp__items-wrapper {
  float: left;
  border-left: 1px solid transparent;
  border-top-left-radius: 4px;
}
.cdpcp--bottom_left .cdpcp__items-wrapper {
  float: right;
  border-right: 1px solid transparent;
  border-top-right-radius: 4px;
}
.cdpcp__items {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
}
@media (min-width: 480px) {
  .cdpcp__items { width: 100%; }
}
.cdpcp--bottom_right .cdpcp__items { flex-direction: row-reverse; }
.cdpcp--bottom_left .cdpcp__items { flex-direction: row; }
.cdpcp__item {
  display: inline-block;
  width: 60px;
  height: 60px;
  margin-right: 7.5px;
  vertical-align: middle;
}
.cdpcp-item__image,
.cdpcp-slideout__image {
  overflow: hidden;
  border-radius: 4px;
}
.cdpcp-item__image {
  float: right;
  max-width: 100%;
  cursor: pointer;
}
.cdpcp-item__image:hover { opacity: 0.7; }

/* bouton « ⠇ » (options) et nombre de produits (barre repliée) */
.cdpcp__menu {
  position: relative;
  float: left;
  width: 46px;
  height: 100%;
  border-top: 1px solid transparent;
  transition: border-radius 0.3s;
}
.cdpcp--bottom_right .cdpcp__menu { border-left: 1px solid transparent; }
.cdpcp--bottom_left .cdpcp__menu { border-right: 1px solid transparent; }
.cdpcp-menu__button {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.cdpcp-menu__button:hover { opacity: 0.8; }
.cdpcp-menu__button:active { opacity: 0.6; }
.cdpcp-menu-icon,
.cdpcp-menu-number {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 38px;
  margin: -19px 0 0 -10px;
  font-family: Arial, sans-serif;
  font-size: 40px;
  line-height: 1;
  transition: opacity 0.3s;
}
.cdpcp .cdpcp-menu-number { display: none; }
.cdpcp--collapsed .cdpcp-menu-number { display: block; }
.cdpcp--collapsed .cdpcp-menu-icon,
.cdpcp--collapsed .cdpcp__items-wrapper {
  display: none;
}
.cdpcp--collapsed .cdpcp__menu { border-top-left-radius: 4px; }

/* voile sombre derrière un panneau ouvert */
.cdpcp__backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9997;
  display: none;
  background: rgba(0, 0, 0, 0.6);
}
/* panneaux (produit, options) : bas de l'écran */
.cdpcp__slideout {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9998;
  display: none;
  padding: 15px;
  border-top: 1px solid transparent;
}
.cdpcp__item--active .cdpcp__slideout,
.cdpcp__menu--active .cdpcp__slideout {
  display: block;
}
.cdpcp-slideout__close {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  overflow: visible;
  padding: 10px;
  border: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  font: normal 28px/21px Arial, Baskerville, monospace;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  user-select: none;
}
.cdpcp-slideout__inner {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
}
.cdpcp-slideout__title {
  display: block;
  clear: both;
  margin-bottom: 7.5px;
  padding-bottom: 7.5px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: normal;
}
@media (min-width: 480px) {
  .cdpcp-slideout__title { font-size: 29px; }
}
.cdpcp-slideout__image {
  display: block;
  max-width: 100%;
  height: 200px;
  margin: 0 auto 15px;
}
.cdpcp-slideout__buttons::before,
.cdpcp-slideout__buttons::after {
  content: " ";
  display: table;
}
.cdpcp-slideout__buttons::after { clear: both; }
.cdpcp-slideout__button {
  display: block;
  width: 100%;
  padding: 15px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: opacity 0.3s;
}
.cdpcp-slideout__button:hover,
.cdpcp-slideout__button:focus,
.cdpcp-slideout__button:active {
  text-decoration: none !important;
}
.cdpcp-slideout__button:focus,
.cdpcp-slideout__button:active {
  outline: 0;
}
.cdpcp-slideout__button:hover { opacity: 0.8; }
.cdpcp-slideout__button:focus { opacity: 0.7; }
.cdpcp-slideout__button:active { opacity: 0.6; }
.cdpcp-slideout__button + .cdpcp-slideout__button { margin-top: 7.5px; }

/* ---------- 4. page /compare ---------- */
.cdpcp-compare-modal__dialog {
  width: 1200px;
  max-width: 95%;
}
.cdpcp-compare-modal__dialog .modal-body { padding: 25px; }
.cdpcp-share-modal__dialog {
  width: 430px;
  max-width: 95%;
}
.cdpcp-social-block {
  width: 150px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
}
.cdpcp-social-block:hover { background: rgba(0, 0, 0, 0.1); }
.cdpcp-highlight-btn .highlight-btn__icon--active,
.cdpcp-highlight-btn.active .highlight-btn__icon--inactive {
  display: none;
}
.cdpcp-highlight-btn.active .highlight-btn__icon--active { display: inline-block; }
.cdpcp-table-card { margin-top: 2rem; }
.cdpcp-table-actions {
  float: right;
  margin-bottom: 10px;
}
.cdpcp-table-actions__btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}
.cdpcp-table-actions__btn + .cdpcp-table-actions__btn { margin-left: 5px; }
.cdpcp-table-wrapper {
  padding: 1px;
  transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
}
.cdpcp-table {
  table-layout: fixed;
  page-break-inside: auto;
}
.cdpcp-table thead { display: table-header-group; }
.cdpcp-table__header-cell--empty,
.cdpcp-table__feature-cell--name {
  overflow: hidden;
  width: 10rem;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  .cdpcp-table__header-cell--empty,
  .cdpcp-table__feature-cell--name {
    display: none !important;
  }
}
.cdpcp-table__header-cell--product {
  position: relative;
  width: 200px;
  text-align: center;
}
.cdpcp-table__header-cell.cdpcp-table__header-cell--product { vertical-align: top; }
.cdpcp-table__cell--current-product { background: rgba(255, 235, 59, 0.05); }
.cdpcp-table__product-inner { position: relative; }
.cdpcp-table__cell-mobile-header {
  display: block;
  font-weight: 700;
}
@media (min-width: 768px) {
  .cdpcp-table__cell-mobile-header { display: none; }
}
.cdpcp-table__delete {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}
.cdpcp-table__product-link { display: block; }
.cdpcp-table__product-link:hover { opacity: 0.8; }
.cdpcp-table__product-link:active { opacity: 0.6; }
.cdpcp-table__img {
  max-width: 100%;
  border-radius: 4px;
}
.cdpcp-table__name,
.cdpcp-table__desc,
.cdpcp-table__add-cart,
.cdpcp-table__quickview {
  margin: 0.5rem 0 0;
}
.cdpcp-table__add-cart {
  display: inline-block;
  margin-right: auto;
  margin-left: auto;
}
.cdpcp-table__name { text-align: center; }
.cdpcp-table__desc > :last-child { margin-bottom: 0; }
.cdpcp-table__feature-row {
  outline: 1px solid transparent;
  transition: outline 0.3s;
  page-break-inside: avoid;
  page-break-after: auto;
}
.cdpcp-table__feature-cell { text-align: center; }
.cdpcp-table__feature-cell--name { text-align: left; }
.cdpcp-print-logo {
  max-width: 200px;
  max-height: 200px;
}

/* ---------- 5. impression du tableau ---------- */
@media only print {
  .cdpcp-saved-comparison-msg,
  .cdpcp-table__delete {
    display: none;
  }
  .cdpcp-table-wrapper { overflow: hidden !important; }
  .cdpcp-table-actions,
  .cdpcp-table__add-cart,
  .cdpcp-table__quickview,
  .cdpcp-table__variants {
    display: none !important;
  }
  .cdpcp-table__header-cell--product { width: auto; }
}

/* ---------- 6. recherche : liste de suggestions (jQuery UI) ----------
 * Le lot D possède aussi la recherche (themes/agriprotec/assets/js/recherche.js, chargé par ce module). Seule différence
 * mesurée entre la liste de jQuery UI de PrestaShop 8.1.7 et celle de 9.2 : le contour de la liste (« outline: 0 » en 8.1.7,
 * invisible dans les deux cas) ; repris ici pour des styles identiques. */
.ui-autocomplete.ui-menu { outline: 0; }
