/* Cartes produit (« Vous pourriez aimer », cœur de la galerie) : styles de la page catégorie,
   chargés depuis collection-favoris.css (voir product.liquid). Ne garder ici que les écarts propres
   au carrousel. */
/* Cartes "Vous pourriez aimer" : même rendu que la grille de la page catégorie.
   - Retrait intérieur : dans la grille il vient de ".row > *" (gouttière Bootstrap), absent ici.
   - Badges : la carte est étirée à la hauteur de la diapositive (main.css), donc placés par
     rapport à l'image et non au bas de la carte — même résultat que dans la grille (bord gauche
     de l'image, 5 px sous son bas). */
.home-section.home-reviews {
  margin-top: 0px;
}
/* Empreinte carbone : picto et valeur alignés, avec un espace entre les deux. */
.pp-carbon-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pp-carbon-badge img {
  flex-shrink: 0;
}
.pp-title {
  font-size: 26px;
  margin-bottom: 15px;
}
.product-swiper--suggestions .product-card {
  padding-inline: calc(var(--bs-gutter-x) * 0.5);
}
/* Le bouton « En savoir plus » dépasse de 15 px au-dessus de la carte au survol (comme dans la
   grille) : place réservée en haut du carrousel, qui masque ce qui déborde de son cadre. */
.product-swiper--suggestions {
  padding-top: 15px;
}
.product-swiper--suggestions .product-card > a.d-flex {
  position: relative;
}
.product-swiper--suggestions .badge-div {
  position: absolute;
  bottom: -5px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  pointer-events: none;
}

.border-product {
  border: 1px solid #eee;
  border-radius: 12px;
  &:hover {
    border: 1px solid var(--orange);
    box-shadow: 0px 5px 20px -3px rgba(0, 0, 0, 0.25);
  }
}

.pp-total-ht {
  text-transform: uppercase;
  color: #767676;
  font-weight: bold;
  font-size: 20px;
  span {
    color: #6c9562;
    font-size: 21px;
    margin-left: 80px;
  }
}

/* Galerie : image principale sur toute la largeur du container, vignettes en carrousel dessous */
.pp-gallery {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.pp-main-wrap {
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
  justify-content: center;
}
.pp-main-wrap .pp-main-img {
  width: 100%;
  height: auto;
}
.pp-thumbs-wrap {
  position: relative;
  width: 100%;
}
.pp-thumbs {
  flex-direction: row;
  margin-top: 0;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  min-width: 0;
}
.pp-thumbs .pp-thumb {
  flex: 0 0 calc((100% - 30px) / 4);
  width: auto;
  height: auto;
  aspect-ratio: 1 / 1;
  scroll-snap-align: start;
}
.pp-thumbs__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #333;
  font-size: 22px;
  box-shadow: none;
  transform: translateY(-50%);
  cursor: pointer;
}
.pp-thumbs__nav[hidden] {
  display: none;
}
.pp-thumbs__nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.pp-thumbs__nav--prev {
  left: -12px;
}
.pp-thumbs__nav--next {
  right: -12px;
}

.pp-atc-zone {
  .btn {
    font-size: 17px;
    border-radius: 30px;
    padding: 8px 25px;
    width: 100%;
    font-weight: bold;
  }
}

.ref {
  font-weight: bold;
  font-size: 15px;
  color: black;
  margin-bottom: 20px;
}

/* Colonne du milieu : détails produit repliés derrière « Voir plus de détails ». */
.pp-details {
  margin-top: 15px;
  summary {
    list-style: none;
    cursor: pointer;
    color: var(--orange);
    font-size: 15px;
    font-weight: 400;
    &::-webkit-details-marker {
      display: none;
    }
  }
  .fermer,
  &[open] .ouvrir {
    display: none;
  }
  &[open] .fermer {
    display: inline;
  }
  .pp-infos {
    margin-top: 10px;
    font-size: 14px;
    sub {
      line-height: 0;
    }
  }
}

.pp-price-row {
  span {
    text-transform: uppercase;
  }
  strong {
    background-color: #6b9560;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 15px;
    padding-left: 15px;
    font-weight: bold;
    color: #fff;
    text-align: center;
  }
}

.pp-unit-price-header {
  font-size: 14px;
  color: #333;
  margin-left: 12px;
}

.pp-tiers {
  margin-bottom: 1.25rem;
}
.pp-tiers .pp-block-title {
  width: 100%;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 500;
}
/* Tableau des prix par quantité : défile si trop de lignes ou trop étroit (le script remplace seulement les lignes du corps). */
.pp-tier-scroll {
  max-height: 240px;
  overflow: auto;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}
.pp-tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  td {
    padding: 6px 14px;
    border-bottom: 1px solid #f2f2f2;
    white-space: nowrap;
  }
  td:first-child {
    font-weight: 600;
    background: #fff;
  }
  td:last-child {
    text-align: right;
  }
  tr:last-child td {
    border-bottom: 0;
  }
}
.pp-custom-title {
  font-size: 15px;
}
.footer-pdt {
  background-color: rgba(65, 110, 125, 0.168627451);
  .pre-desc-title {
    font-size: 22px;
    margin-bottom: 0;
  }
  .title-description-pdt {
    font-size: 33px;
    font-weight: bold;
  }
  .container-padding {
    padding-left: 10%;
    padding-right: 10%;
  }
  a:hover {
    text-decoration: underline;
  }
}

.pp-block-title {
  font-size: 18px;
  width: 165px;
  flex-shrink: 0;
  margin-right: 5px;
  font-weight: bold;
}
.bloc-stock {
  font-size: 15px;
  font-weight: bold;
  color: var(--orange);
}
.bloc-stock.en-stock {
  color: rgb(0, 128, 0);
}
input,
select {
  border: 1px solid #ccc;
  border-radius: 20px;
}
.select--single-option {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
  pointer-events: none;
}

.label-variation {
  padding: 20px 0;
  border-top: 1px solid #e4e4e4;
  background-color: rgba(0, 0, 0, 0);
  color: #767676;
  font-weight: bold;
  font-size: 15px;
}

.label-livraison {
  color: #767676;
  font-weight: bold;
  font-size: 15px;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #333;
  vertical-align: top;
  border-color: #dee2e6;
  border-collapse: collapse;
}

.table > :not(caption) > * > * {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

.table > thead {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
}

.table > thead th {
  font-weight: 600;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(0, 0, 0, 0.03);
}

.table-bordered > :not(caption) > * {
  border-width: 1px 0;
}

.table-bordered > :not(caption) > * > * {
  border-width: 0 1px;
  border-color: #dee2e6;
}

/* Date de livraison estimée : l'infobulle s'ouvre au survol ou au focus de l'icône. */
.livraison {
  position: relative;
  padding: 10px 20px;
  border-radius: 15px;
  background-color: #f2f2f2;
  font-size: 14px;
  line-height: 1.3;
  .calendrier {
    margin-right: 10px;
  }
  > div {
    min-width: 0;
  }
  .info {
    padding: 0;
    margin-left: 5px;
    border: 0;
    background: none;
    line-height: 1;
    cursor: pointer;
  }
  .date-debut {
    margin-right: 5px;
    margin-left: 5px;
  }
  .date-fin {
    margin-left: 5px;
  }
  span {
    font-weight: 400;
  }
  .info-text {
    display: none;
    position: absolute;
    right: 0;
    top: 60px;
    width: 300px;
    max-width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    z-index: 1000;
  }
  .info:hover + .info-text,
  .info:focus-visible + .info-text {
    display: block;
  }
}

/* Techniques de marquage du produit (« Comment personnaliser ce produit ? »). */
.marquages {
  padding: 0 0 10px;
  margin-top: 30px;
  /* Le filet du haut a la largeur du conteneur. */
  > .container {
    padding-top: 50px;
    border-top: 1px solid #e5e5e5;
  }
  .entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
  }
  .gauche {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .barre {
    flex-shrink: 0;
    width: 4px;
    height: 36px;
    border-radius: 2px;
    background: var(--orange);
  }
  .titre {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
  }
  .sous-titre {
    margin: 0;
    font-size: 13px;
    color: #888;
  }
  .guide {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid var(--orange);
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
    white-space: nowrap;
    transition:
      background 0.2s,
      color 0.2s;
    &:hover {
      background: var(--orange);
      color: #fff;
    }
  }
  .carte {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    transition:
      border-color 0.18s,
      box-shadow 0.18s;
    &:hover {
      border-color: var(--orange);
      box-shadow: 0 0 0 2px rgba(240, 79, 35, 0.1);
    }
  }
  .haut {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px 11px;
    border-bottom: 1px solid #f2f2f2;
    svg {
      flex-shrink: 0;
      width: 42px;
      height: 42px;
    }
  }
  .nom {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
  }
  .accroche {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--orange);
  }
  .corps {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 11px 14px 13px;
  }
  .desc {
    flex: 1;
    margin: 0 0 11px;
    font-size: 15px;
    line-height: 1.65;
    color: #555;
  }
  .pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 9px;
    border-top: 1px solid #f2f2f2;
  }
  .pastille {
    flex-shrink: 0;
    padding: 2px 8px;
    border: 1px solid #f9c49a;
    border-radius: 20px;
    background: #fff4f0;
    font-size: 15px;
    color: #c2430a;
  }
  .plus {
    font-size: 15px;
    font-weight: 600;
    color: var(--orange);
    text-decoration: none;
    white-space: nowrap;
    &:hover {
      text-decoration: underline;
    }
  }
}

/* Colonnes étroites (tablette et petit ordinateur) : prix et bouton restent dans leur colonne. */
@media (max-width: 1199px) {
  .pp-block-title {
    width: auto;
    margin-right: 10px;
    text-align: left;
  }
  .pp-dim,
  .pp-qty {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .pp-total-ht {
    font-size: 16px;
    span {
      margin-left: 15px;
      font-size: 18px;
    }
  }
  .pp-atc-zone .btn {
    width: 100%;
    font-size: 15px;
  }
}

/* Encart prix : prix unitaire, nombre de pièces et coût total. */
.encart-prix {
  margin-top: 20px;
  padding: 15px 0;
  border-top: 1px solid #e4e4e4;
  p {
    margin: 0;
  }
  .text-hors-marq {
    font-size: 12px;
  }
  .affprix {
    font-size: 20px;
    color: var(--orange);
    font-weight: 500;
    margin-top: 10px;
  }
  .text-calc {
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    span {
      font-size: 20px;
      color: var(--orange);
      font-weight: 600;
      margin-top: 10px;
    }
  }
}

/* Champs et listes de la colonne des options (valeurs et textes d'aide) en gras. */
.pp-variants {
  input,
  select {
    font-size: 15px;
    font-weight: bold;
    color: #555;
  }
  ::placeholder {
    font-weight: bold;
  }
}

.pp-dim[hidden] {
  display: none;
}

/* Choix de la couleur : liste déroulante avec la pastille à gauche du nom. */
.pp-color-picker {
  position: relative;
  flex: 1;
  min-width: 0;
}
.pp-color-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 30px 6px 12px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.5'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  font-size: 15px;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
}
.pp-color-name {
  color: #555;
}
.pp-color-list {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  list-style: none;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    &:hover,
    &:focus,
    &[aria-selected="true"] {
      background: #f2f2f2;
      outline: none;
    }
  }
}
.pp-color-list[hidden] {
  display: none;
}
.pp-dot {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1px solid #ccc;
  border-radius: 50%;
}
.pp-dot--none {
  background: conic-gradient(
    #e63946,
    #f4a261,
    #e9c46a,
    #2a9d8f,
    #457b9d,
    #9b5de5,
    #e63946
  );
}

@media (min-width: 1200px) {
  .pp-qty {
    align-items: center;
  }
}

/* Badges de la photo principale de la fiche produit : plus grands que sur les cartes (23 px). */
.pp-main-wrap .badge-img {
  width: 45px;
  height: 25px;
}

/* Fenêtre « article ajouté à la sélection » : elle remplace la pastille verte de confirmation. */
.cart-toast[data-type="ok"] {
  display: none;
}
/* Classe « ajout-modal » (pas d'identifiant : le lint les refuse) : plus spécifique que les règles de la modale Bootstrap. */
.ajout-modal {
  .modal-title {
    font-size: 30px;
    font-weight: 700;
  }
  .ajout-nom {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
  }
  dt {
    font-weight: 700;
    font-size: 15px;
  }
  dd {
    margin-bottom: 8px;
    font-size: 15px;
  }
  .btn {
    width: 100%;
    padding: 15px;
    border-radius: 25px;
    text-transform: uppercase;
  }
  .btn-close {
    opacity: 1;
    width: 30px;
    height: 30px;
    font-size: 15px;
  }
  img {
    max-height: 160px;
    width: auto;
  }
  .pastille-couleur {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 1px solid #e3e3e3;
    border-radius: 50%;
    vertical-align: -2px;
  }
}

@media (max-width: 768px) {
  .ajout-modal .modal-title {
    font-size: 19px;
  }
}

@media (max-width: 500px) {
  .ajout-modal dt,
  .ajout-modal dd {
    font-size: 14px;
  }
}
