/* ===============================
   RESET & BASE
=============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", Arial, sans-serif;
  color: #222;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===============================
   HEADER
=============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  background: #fff;
  border-bottom: 1px solid #e2e2e2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* LOGO */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  height: 40px;
  width: auto;
  margin-right: 0.6rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  color: #111;
}

/* ===============================
   NAVIGATION
=============================== */
.nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  justify-content: center;
  align-items: center;
}

.nav-menu a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #0073e6;
}

/* ===============================
   ICONES DROITE
=============================== */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: #444;
  transition: color 0.2s ease, transform 0.1s ease;
}

.icon-btn:hover {
  color: #0073e6;
  transform: scale(1.1);
}

/* === Compteur panier (badge) === */
#btn-cart {
  position: relative;
}

.cart-count {
  display: none;
  position: absolute;
  right: -6px;
  top: -6px;
  background: #0073e6;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  line-height: 1;
}

/* ===============================
   BURGER (mobile)
=============================== */
.burger {
  display: none;
  font-size: 1.4rem;
}

@media (max-width: 850px) {
  .nav {
    position: static;
    transform: none;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    right: 2rem;
    top: 100%;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.open {
    display: flex;
  }

  .burger {
    display: inline-block;
  }
}

/* ===============================
   MAIN CONTENT
=============================== */
.main-content {
  flex: 1;
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #111;
}

.hero p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.btn-primary {
  background: #111;
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: #0073e6;
  transform: scale(1.02);
}

section {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* === BOUTIQUE GRID === */
.boutique-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.produit {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.produit:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.produit img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.produit h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.produit .prix {
  font-weight: 600;
  margin-bottom: 1rem;
}

@media (max-width: 850px) {
  .boutique-grid {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   POPUPS GÉNÉRIQUES
=============================== */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10;
  backdrop-filter: blur(2px);
}

.popup {
  display: none;
  position: absolute;
  right: 2rem;
  top: 70px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  width: 320px;
  z-index: 11;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.popup h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ===============================
   POPUP PANIER — NOUVEAU DESIGN
=============================== */
#popup-cart {
  max-height: 75vh;
  overflow-y: auto;
}

#popup-cart .popup-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid #eee;
}

.cart-line:last-child {
  border-bottom: none;
}

.remove-item {
  background: #f6f6f6;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #444;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.remove-item:hover {
  background: #eee;
}

.cart-line-main {
  flex: 1;
  margin-left: 0.75rem;
}

.cart-line-main .title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.cart-line-main .sub {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.qty {
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #333;
  width: 26px;
  height: 26px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qty:hover {
  background: #f0f0f0;
}

.cart-qty {
  width: 50px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  height: 26px;
  font-size: 0.9rem;
}

.line-total {
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  font-size: 0.95rem;
  margin-left: 0.5rem;
}

.cart-footer {
  border-top: 1px solid #ddd;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.btn-secondary,
.btn-primary {
  flex: 1;
  text-align: center;
  border-radius: 6px;
  padding: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary {
  background: #f3f3f3;
  border: 1px solid #ccc;
  color: #333;
}

.btn-secondary:hover {
  background: #e9e9e9;
}

.btn-primary {
  background: #111;
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: #0073e6;
}

/* ===============================
   FOOTER
=============================== */
.site-footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #e2e2e2;
  background: #fff;
}