/* L'Art de la Carrosserie – boutique, panier et commande */

/* ---------- message flash ---------- */
.flash-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 2000;
  background: var(--primary-color);
  color: #111111;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  transition: opacity .4s, transform .4s;
}
.flash-toast.is-hidden {
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
}

/* ---------- champs de formulaire ---------- */
.shop-input,
.shop-input:focus {
  background: var(--bg-dark-1);
  color: #ffffff;
  border: solid 1px rgba(255, 255, 255, .12);
}
.shop-input:focus {
  border-color: var(--primary-color);
  box-shadow: none;
}
.shop-input::placeholder {
  color: rgba(255, 255, 255, .4);
}
.shop-input option {
  background: var(--bg-dark-2);
}
.form-label {
  color: #ffffff;
  font-weight: 600;
}
.form-error {
  color: #ff8a80;
  font-size: 14px;
  margin-top: 4px;
}
.alert-box {
  border: solid 1px #ff8a80;
  background: rgba(255, 138, 128, .08);
  color: #ffd2cc;
  border-radius: 8px;
  padding: 15px 20px;
}
.quantity-input {
  width: 90px;
  text-align: center;
}
.de__pcard form button.btn-main,
form button.btn-main {
  border: none;
}
.de__pcard h3 a {
  color: inherit;
}

/* ---------- fiche produit ---------- */
.product-photo {
  background: #ffffff;
  border-radius: var(--rounded-1);
  padding: 40px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-photo.out-of-stock img {
  opacity: .5;
  filter: grayscale(1);
}
.stock-badge {
  font-size: 14px;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 30px;
}
.stock-badge.in-stock { background: rgba(76, 175, 80, .15); color: #8bd88f; }
.stock-badge.low-stock { background: rgba(255, 193, 7, .15); color: #ffd666; }
.stock-badge.no-stock { background: rgba(255, 82, 82, .15); color: #ff8a80; }

/* ---------- mini panier (panneau latéral) et récapitulatif ---------- */
.mini-cart-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mini-cart-line img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  padding: 4px;
  flex-shrink: 0;
}
.mini-cart-info {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.4;
  min-width: 0;
}
.mini-cart-info a {
  color: #ffffff;
  font-weight: 600;
}

/* ---------- page panier ---------- */
.cart-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: solid 1px rgba(255, 255, 255, .08);
}
.cart-row-photo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px;
}
.cart-row-total {
  font-weight: bold;
  color: #ffffff;
  min-width: 90px;
  text-align: right;
}
.cart-row-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, .5);
  font-size: 18px;
}
.cart-row-remove:hover {
  color: #ff8a80;
}
@media (max-width: 767px) {
  .cart-row {
    grid-template-columns: 64px 1fr auto;
  }
  .cart-row-photo img {
    width: 64px;
    height: 64px;
  }
  .cart-row-total {
    grid-column: 2;
    text-align: left;
  }
}

/* ---------- commande ---------- */
.fulfilment-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: solid 1px rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.fulfilment-option:has(input:checked) {
  border-color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), .06);
}
.fulfilment-option input {
  margin-top: 5px;
  accent-color: var(--primary-color);
}
.checkout-summary {
  position: sticky;
  top: 120px;
}
.order-table td {
  background: transparent;
  color: inherit;
  padding: 8px 4px;
}

/* ---------- accueil : catégories de la boutique ---------- */
.category-tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg-dark-1);
  border: solid 1px rgba(255, 255, 255, .08);
  border-radius: var(--rounded-1);
  color: #ffffff;
  transition: border-color .3s, transform .3s;
}
.category-tile:hover {
  border-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-3px);
}
.category-tile-name {
  font-weight: bold;
  font-size: 18px;
}
.category-tile-count {
  color: var(--primary-color);
  font-size: 14px;
}

/* ---------- blog ---------- */
.date-badge,
.date-badge h4 {
  color: #111111;
}

/* ---------- pagination ---------- */
.pagination .page-link {
  background: var(--bg-dark-2);
  border-color: rgba(255, 255, 255, .1);
  color: #ffffff;
}
.pagination .page-item.active .page-link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #111111;
}
.pagination .page-item.disabled .page-link {
  background: var(--bg-dark-1);
  color: rgba(255, 255, 255, .3);
}

/* ---------- animation « ajouté au panier » ---------- */
/* orbe dorée qui transporte la miniature du produit */
.cart-orb {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #ffffff;
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
  border: 3px solid #F6DD8E;
  box-shadow:
    0 0 0 3px var(--primary-color),
    0 0 18px 6px rgba(var(--primary-color-rgb), .75),
    0 0 45px 14px rgba(var(--primary-color-rgb), .35);
  pointer-events: none;
  will-change: transform;
}

/* étincelles : traînée pendant le vol et explosion à l'arrivée */
.cart-spark {
  position: fixed;
  z-index: 2999;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7d6 0%, #F6DD8E 40%, var(--primary-color) 75%, transparent 100%);
  pointer-events: none;
}
.cart-spark.trail {
  animation: spark-trail .6s ease-out forwards;
}
.cart-spark.burst {
  width: 7px;
  height: 7px;
  animation: spark-burst .95s cubic-bezier(.2, .8, .3, 1) forwards;
}
@keyframes spark-trail {
  from { transform: translate(0, 0) scale(1); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
@keyframes spark-burst {
  0% { transform: translate(0, 0) scale(1.4); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* « +1 » qui s'envole au-dessus du panier */
.cart-plus-one {
  position: fixed;
  z-index: 3001;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 20px;
  color: #F6DD8E;
  text-shadow: 0 0 10px rgba(var(--primary-color-rgb), .9);
  pointer-events: none;
  animation: plus-one 1.3s ease-out forwards;
}
@keyframes plus-one {
  0% { transform: translate(-50%, -50%) scale(.5); opacity: 0; }
  25% { transform: translate(-50%, -110%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -260%) scale(1); opacity: 0; }
}

/* onde sur le bouton « Ajouter au panier » */
form[data-add-to-cart] .btn-main {
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  pointer-events: none;
  animation: btn-ripple .6s ease-out forwards;
}
@keyframes btn-ripple {
  from { transform: scale(0); opacity: .9; }
  to { transform: scale(14); opacity: 0; }
}
#btn-cart.cart-bump {
  animation: cart-bump .6s ease;
}
#btn-cart.cart-bump .d-counter {
  animation: counter-pop .6s ease;
}
@keyframes cart-bump {
  0%, 100% { transform: scale(1) rotate(0); }
  30% { transform: scale(1.3) rotate(-10deg); }
  60% { transform: scale(.95) rotate(6deg); }
}
@keyframes counter-pop {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.6); }
}
.flash-toast.is-error {
  background: #ff8a80;
}

/* ---------- accueil : textes du hero en or ---------- */
.hero-gold,
h1.hero-gold {
  color: #D4A63A !important;
}

/* ---------- mobile : grilles en carrousel à faire glisser ---------- */
@media (max-width: 767px) {
  .mobile-swipe {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .mobile-swipe::-webkit-scrollbar {
    display: none;
  }
  .mobile-swipe > [class*="col-"] {
    flex: 0 0 82%;
    max-width: 82%;
    scroll-snap-align: center;
  }
}

/* ---------- accueil : contenu du hero plus bas ---------- */
.hero-content {
  bottom: -6px;
}

/* ---------- barre « livraison gratuite » ---------- */
.free-delivery {
  font-size: 14px;
}
.free-delivery-text {
  margin-bottom: 8px;
  color: #ffffff;
}
.free-delivery-track {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.free-delivery-bar {
  height: 100%;
  width: var(--progress);
  border-radius: 8px;
  background:
    linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%) 0 0 / 200% 100%,
    linear-gradient(90deg, #9C7424, var(--primary-color), #F6DD8E);
  animation:
    free-delivery-fill 1.2s cubic-bezier(.2, .8, .3, 1) both,
    free-delivery-shine 2.2s linear 1.2s infinite;
}
@keyframes free-delivery-fill {
  from { width: 0; }
  to { width: var(--progress); }
}
@keyframes free-delivery-shine {
  from { background-position: 200% 0, 0 0; }
  to { background-position: -100% 0, 0 0; }
}

/* ---------- bannière des pages : filtre pour bien lire le titre ---------- */
.page-banner .page-banner-filter {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .1) 50%, rgba(11, 11, 11, .7) 100%);
  pointer-events: none;
}
.page-banner h1,
.page-banner .crumb {
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}

/* ---------- filtre sur toutes les images parallax (jarallax) de toutes les pages ---------- */
.jarallax > .jarallax-img,
[id^="jarallax-container-"] > img,
[id^="jarallax-container-"] > div {
  filter: brightness(.55) saturate(.85) blur(2px);
}

/* le hero de l'accueil garde son image d'origine, sans filtre */
.no-jarallax-filter > .jarallax-img,
.no-jarallax-filter [id^="jarallax-container-"] > img,
.no-jarallax-filter [id^="jarallax-container-"] > div {
  filter: none;
}
