@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  src: url(/library/font/inter.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Variables CSS */
:root {
  --bg: #f7f7fb;
  --card: #ffffff;
  --accent: #d1d5db;
  --muted: #6b7280;
  --glass: rgba(255, 255, 255, 0.6);
  --border-color: #e6e9ef;
  --text-dark: #111;
  --shadow-sm: 0 6px 20px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.12);
  --shadow-xl: -30px 0 60px rgba(16, 24, 40, 0.08);
}

/* Reset & Base */
* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  background: linear-gradient(180deg, #f7f7fb 0%, #eef2f7 100%);
  color: var(--text-dark);
  line-height: 1.5;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 26px;
  margin-bottom: 12px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 18px;
}

.out-stock-msg {
  color: red;
  font-size: .75rem;
  padding-left: 3rem;
}
/* Boutons */
button,
.btn {
  background: var(--accent);
  color: #111;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 14px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

button:active,
.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid rgba(209, 213, 219, 0.5);
}

.btn.secondary:hover {
  background: rgba(209, 213, 219, 0.1);
}

.btn-pay {
  padding: 16px 20px;
  font-size: 20px;
  float: right;
}

/* Inputs */
input,
select {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
}

.search {
  flex: 1;
  padding: 18px;
  font-size: 17px;
  min-width: 300px;
}

/* Utilitaires */
.muted {
  color: var(--muted);
  font-size: 13px;
}

.hide {
    display: none;
}

.container {
  max-width: 1100px;
  margin: 24px auto 28px;
  padding: 0 20px;
}

.pointer {
  cursor: pointer;
}

.o-hide {
  overflow:hidden;
}

.product {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.selected {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(176, 229, 200, 0.4);
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: transparent;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand .muted {
  font-size: 16px;
}

.logo {
  width: 120px;
  height: 120px;
  padding: 8px;
  background: var(--card);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.logo img {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Bannière promotionnelle */
.promo-banner {
  background: linear-gradient(135deg, #f7f7fb 0%, #eef2f7 100%);
  color: #111;
  text-align: center;
  padding: 10px 0;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  letter-spacing: 0.3px;
  max-width: 1100px;
  margin: 20px auto;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.promo-text {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-left 15s linear infinite;
}

.small-promo {
  font-size: 0.75em;
  opacity: 0.8;
  font-weight: 400;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Bandeau livraison */
.bandeau-livraison {
  background: transparent;
  color: #111;
  text-align: center;
  padding: 14px 0;
  font-weight: 700;
  font-size: 15px;
  animation: slideIn 0.6s ease forwards, blink 2.5s ease-in-out infinite;
  z-index: 1000;
  letter-spacing: 0.3px;
}

@keyframes slideIn {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Cart Count Badge */
.cart-count {
  background: var(--accent);
  color: #111;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  margin-left: 8px;
  font-size: 12px;
}

/* Cart Floating */
.cart-floating {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: var(--card);
  padding: 12px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 999;
}

.cart-floating:hover {
  transform: scale(1.05);
}

/* Sidebar (Panier) */
.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 360px;
  background: linear-gradient(180deg, #fff, #fbfbfd);
  box-shadow: var(--shadow-xl);
  transform: translateX(110%);
  transition: transform 0.28s ease;
  padding: 20px;
  overflow: auto;
  z-index: 2000;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar h3 {
  margin-bottom: 16px;
}

.sidebar hr {
  margin: 12px 0;
  border: none;
  border-top: 1px solid #eef2f7;
}

/* Item Row (Panier) */
.item-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.item-row img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.item-row .item-details {
  flex: 1;
}

.item-row .item-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.qty {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.qty-display {
  min-width: 28px;
  text-align: center;
}

/* Cart Summary */
.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cart-total {
  font-weight: 800;
  font-size: 18px;
  width: 100%;
}

.promo-row {
  margin-bottom: 8px;
}

.promo-description {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.promo-active {
  font-size: 0.9em; font-weight: 600; color: #334155; margin-bottom: 4px;
}

.promo-type {
  font-size: 0.85em; color: #475569;
}

.promo-limited {
  font-size: 0.7em; color: #64748b; margin-top: 4px; opacity: 0.85;
}

.promo-apply {
  font-size: 0.8em; color: #475569; margin-top: 6px;
}

.promo-completed {
  font-size: 0.75em; color: #d97706; margin-top: 4px; font-weight: 600;
}

.reduction-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px;
}

.real-price {
  color: #999; font-size: 0.9em;
}

.real-price-currency {
  color: #999; text-decoration: line-through; font-size: 0.9em;
}

.economies {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}

.economie-title {
  color: #475569; font-size: 0.9em; font-weight: 600;
}

.economie-currency {
  color: #475569; font-weight: 600; font-size: 0.9em;
}

.promo-total {
  display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 2px solid #e2e8f0;
}

.promo-total-title {
  font-weight: 600; font-size: 1.1em;
}

.promo-total-currency {
  font-weight: 700; font-size: 1.3em; color: #111;
}

.total-row {
  display: flex; justify-content: space-between; align-items: center;
}

.total-row-title {
  font-weight: 600; font-size: 1.1em;
}

.total-row-currency {
  font-weight: 700; font-size: 1.3em;
}

.total-row-add {
  font-size: 0.85em; color: #666; margin-top: 8px; text-align: center;
}

.free-shipping {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}

.cart-actions {
  margin-top: 12px;
}

.cart-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

/* Footer */
footer {
  max-width: 1100px;
  margin: 28px auto;
  padding: 20px;
  color: #111;
  font-size: 12px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1000px) {
  .container {
    margin: 32px auto 20px;
  }
  
  header {
    padding: 14px 20px;
  }
}

@media (max-width: 680px) {
  .sidebar {
    width: 100%;
  }
  
  header {
    flex-direction: column;
    gap: 12px;
  }
  
  nav {
    width: 100%;
  }
  
  .search {
    width: 100%;
    min-width: auto;
  }

  .cart-count {
    display: block;
  }
}

.checkout-stock-warning {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 500;
}

/* ===================================
   IMAGE MODAL
   ================================== */

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal.active {
  display: flex;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 3001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 3002;
}

.modal-close:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 20px;
}

.modal-prev,
.modal-next {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: transform 0.2s ease, background 0.2s ease;
  pointer-events: all;
}

.modal-prev:hover,
.modal-next:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

@media (max-width: 680px) {
  .modal-content {
    max-width: 95vw;
  }
  
  .modal-close {
    width: 40px;
    height: 40px;
    font-size: 28px;
    top: 10px;
    right: 10px;
  }
  
  .modal-prev,
  .modal-next {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
  
  .modal-nav {
    padding: 0 10px;
  }
}

body.no-scroll {
  overflow: hidden;
}

.consent-layer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    background-color: rgba(1,1,1,.6);
    z-index: 1000;
}

.consent-layer h3 {
  margin-top: 1rem;
  text-align: center;
}

.consent-layer > div {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50vw;
    background-color: #fff;
    border-radius: 2rem;
    transform: translate(-50%,-50%);
    min-width: 300px;
}

.consent-layer p {
    margin: 0;
}

.consent-layer > div > div {
    padding: 0 2rem 2rem;
}

.consent-layer button {
    line-height: 1.5rem;
    width: 100%;
    min-height: 2.5rem;
    height: auto;
}