/**
 * HOREL — panier latéral (26/11/2026), voir assets/js/horel-panier.js.
 * Inspiré de Balzac (choix d'Aurel, 26/11) : panneau plus large (560 px), lignes resserrées sans
 * séparateur, croix pour retirer, un seul montant, « Commander » noir et « Voir le panier » blanc,
 * réassurance qui défile dessous. En-tête comme le panneau « Filtrer » : 60 px, titre 11 px en
 * capitales, voile rgba(18,18,18,.3). Textes : marque 14/600, nom 14, détails 12 gris, prix 14.
 */

.hp {
  position: fixed;
  inset: 0;
  z-index: 1100;
  color: #121212;
  font-size: 14px;
  line-height: 21px;
}

.hp[hidden] {
  display: none;
}

.hp-voile {
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 18, .3);
  opacity: 0;
  transition: opacity .3s;
}

.hp-panneau {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 560px;
  max-width: 100%;
  background: #fff;
  border-left: .5px solid #121212;
  text-align: left;
  transform: translateX(100%);
  transition: transform .3s;
}

.hp.hp-ouvert .hp-voile {
  opacity: 1;
}

.hp.hp-ouvert .hp-panneau {
  transform: none;
}

.hp-entete {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  height: 60px;
  padding: 0 24px;
  border-bottom: .5px solid #121212;
}

.hp h2 {
  margin: 0;
  padding: 0;
  color: #121212;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 1.5px;
  text-align: left;
  text-transform: uppercase;
}

.hp-fermer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0 -16px 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #121212;
  cursor: pointer;
}

.hp-fermer:focus:not(:focus-visible) {
  outline: 0;
}

.hp-fermer svg {
  display: block;
  width: 14px;
  height: 14px;
}

.hp-fermer svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.hp-corps {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 24px;
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.hp-attente {
  margin: 24px 0;
  color: #5c5c5c;
}

/* ---------- Lignes ---------- */

.hp-lignes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hp-ligne {
  display: flex;
  gap: 16px;
  padding: 24px 0 0;
  transition: opacity .2s;
}

.hp-ligne:last-child {
  padding-bottom: 24px;
}

.hp-ligne.hp-en-cours {
  opacity: .4;
  pointer-events: none;
}

.hp-photo {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  background: #fff;
}

.hp-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hp-infos {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.hp-haut {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.hp-nom,
.hp-nom:hover,
.hp-nom:focus {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: #121212;
  text-decoration: none;
}

.hp-marque {
  font-weight: 600;
}

.hp-modele {
  overflow-wrap: anywhere;
}

.hp-prix {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.hp-barre {
  color: #5c5c5c;
  font-size: 12px;
  line-height: 18px;
}

.hp-attr {
  display: block;
  margin: 4px 0 0;
  color: #5c5c5c;
  font-size: 12px;
  line-height: 18px;
}

.hp-bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: auto 0 0;
  padding: 12px 0 0;
}

.hp-qte {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border: .5px solid #121212;
}

.hp-qte button {
  width: 32px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #121212;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.hp-qte button[disabled] {
  color: #c4c4c4;
  cursor: default;
}

.hp-qte span {
  min-width: 24px;
  font-size: 13px;
  text-align: center;
}

.hp-retirer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 -10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #121212;
  cursor: pointer;
}

.hp-retirer svg {
  display: block;
  width: 11px;
  height: 11px;
}

.hp-retirer svg * {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.hp-erreur {
  margin: 8px 0 0;
  color: #b00020;
  font-size: 12px;
  line-height: 18px;
}

/* ---------- Panier vide ---------- */

.hp-vide {
  padding: 48px 0;
  text-align: center;
}

.hp-vide p {
  margin: 0 0 24px;
}

/* ---------- Pied : montants et boutons ---------- */

.hp-pied {
  flex: 0 0 auto;
  padding: 16px 24px 24px;
  border-top: .5px solid #121212;
  background: #fff;
}

.hp-pied[hidden] {
  display: none;
}

.hp-montant {
  display: flex;
  justify-content: space-between;
  margin: 0 0 16px;
  font-weight: 600;
}

.hp-bouton,
.hp-bouton:hover,
.hp-bouton:focus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: .5px solid #121212;
  background: #121212;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.hp-bouton--clair,
.hp-bouton--clair:hover,
.hp-bouton--clair:focus {
  background: #fff;
  color: #121212;
}

.hp-pied .hp-bouton + .hp-bouton {
  margin-top: 8px;
}

/* Réassurance qui défile (une ligne de 18 px visible, la piste monte : horel-panier.js) */
.hp-defil {
  height: 18px;
  margin: 16px 0 0;
  overflow: hidden;
  color: #5c5c5c;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.hp-defil-piste span {
  display: block;
  height: 18px;
  white-space: nowrap;
}

html.hp-panier-ouvert {
  overflow: hidden;
}

html.hp-panier-ouvert body {
  padding-right: var(--hp-barre-defilement, 0);
}

/* ---------- Mobile : plein écran ---------- */

@media (max-width: 767px) {
  .hp-panneau {
    width: 100%;
    border-left: 0;
  }

  .hp-entete,
  .hp-corps,
  .hp-pied {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hp-photo {
    flex-basis: 80px;
    width: 80px;
    height: 80px;
  }
}

.hp-panneau:focus {
  outline: 0;
}
