/* ==========================================================================
   MIDL - Le Drive Minecraft Hard-Discount (https://midl.click)
   Styles personnalisés & animations (Thème Dark Slate / Midnight Navy)
   ========================================================================== */

/* Variables de charte graphique MIDL */
:root {
  --midl-blue: #0050AA;
  --midl-blue-hover: #003e85;
  --midl-blue-light: #1a6ed4;
  --midl-yellow: #FFF000;
  --midl-yellow-dark: #e6d800;
  --midl-red: #E2001A;
  --midl-red-dark: #b80015;
  
  --dark-bg: #0B1120;
  --dark-card: #1E293B;
  --dark-card-hover: #26354A;
  --dark-border: #334155;
  --dark-border-subtle: #1E293B;
}

/* Polices et rendu pixel art Minecraft */
.pixelated {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* Scrollbar personnalisée sombre */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0B1120;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0050AA;
}

/* Badge Choc / Promo Starburst */
.badge-choc {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--midl-red);
  color: #FFFFFF;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(226, 0, 26, 0.4);
  transform: rotate(-3deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-choc:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 6px 16px rgba(226, 0, 26, 0.6);
}

/* Étiquette de prix façon supermarché MIDL */
.price-tag-midl {
  background: var(--midl-yellow);
  color: #000000;
  border-radius: 6px;
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.price-tag-midl .price-main {
  font-family: 'Rubik', 'Montserrat', sans-serif;
  font-weight: 900;
  line-height: 1;
  color: #000000;
}

.price-tag-midl .price-currency {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #1a1a1a;
}

.price-old-slashed {
  text-decoration: line-through;
  text-decoration-color: var(--midl-red);
  text-decoration-thickness: 2.5px;
  color: #64748B;
  font-weight: 700;
}

/* Animation douce pour les cartes produits */
.product-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 80, 170, 0.4);
  border-color: #3b82f6;
}

.product-card:hover .item-image {
  transform: scale(1.12) rotate(3deg);
}

.item-image {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Glow d'accentuation MIDL */
.glow-blue {
  box-shadow: 0 0 25px -5px rgba(0, 80, 170, 0.5);
}

.glow-yellow {
  box-shadow: 0 0 25px -5px rgba(255, 240, 0, 0.4);
}

/* Ruban Promo façon prospectus */
.ribbon-prospectus {
  position: absolute;
  top: 12px;
  right: -8px;
  background: var(--midl-red);
  color: #FFFFFF;
  padding: 4px 12px;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px 0 0 4px;
  box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.3);
}

.ribbon-prospectus::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  border-top: 6px solid var(--midl-red-dark);
  border-right: 8px solid transparent;
}

/* Barre de défilement ticker continu */
@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
}

.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 35s linear infinite;
}

.ticker-wrap:hover .ticker-move {
  animation-play-state: paused;
}

/* Cart badge bounce */
@keyframes cart-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.badge-bump {
  animation: cart-pop 0.3s ease-out;
}

/* Backdrop blur support */
.glass-nav {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Modal animation */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Drawer Panier */
.drawer-cart {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-cart.active {
  transform: translateX(0);
}

/* Notification Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}
