* { box-sizing: border-box; margin: 0; padding: 0; }

.ui-icon { display: inline-flex; vertical-align: middle; }
.ui-icon svg { width: 18px; height: 18px; vertical-align: middle; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f4f4f5;
  color: #222;
}

.top-bar {
  background: #1c1c1e;
  color: #ddd;
  font-size: 0.8rem;
}
.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  justify-content: space-between;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid #e2e2e4;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
  color: #111;
  white-space: nowrap;
}
.logo span { color: #b3161a; }

.search-bar {
  flex: 1;
  display: flex;
  max-width: 500px;
}
.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
}
.search-bar button {
  padding: 0 16px;
  background: #1c1c1e;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.header-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.icon-btn {
  background: #f0f0f2;
  border: 1px solid #ddd;
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}
.cart-btn {
  background: #b3161a;
  color: #fff;
  border-color: #b3161a;
  font-weight: 600;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  border-top: 1px solid #eee;
}
.nav a {
  color: #333;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.nav a:hover { color: #b3161a; }
.nav a.active-nav { color: #b3161a; text-decoration: underline; }
.no-results { grid-column: 1 / -1; color: #777; text-align: center; padding: 30px 0; }

.page-banner p { color: #ccc; }

.friends-banner {
  max-width: 500px;
  margin: 0 auto 30px;
  text-align: center;
}
.friends-banner svg { width: 100%; height: auto; }
.friends-caption { color: #777; font-size: 0.85rem; margin-top: 8px; font-style: italic; }
.page-banner .tagline { color: #fff; font-weight: 700; font-style: italic; margin-top: 10px; font-size: 1rem; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e2e2e4;
  border-radius: 8px;
  padding: 30px 20px;
  text-decoration: none;
  color: #111;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.15s;
}
.category-tile:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.tile-icon-svg svg { width: 70px; height: 70px; }
.tile-name { font-weight: 700; font-size: 1.05rem; }
.tile-count { color: #999; font-size: 0.82rem; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
}
.section-title:first-of-type { margin-top: 0; }
.see-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: #b3161a;
  text-decoration: none;
  border: none;
  padding-left: 0;
}
.see-all:hover { text-decoration: underline; }

.hero { background: #fff; }
.hero-banner {
  background: linear-gradient(135deg, #1c1c1e, #3a3a3d);
  color: #fff;
  text-align: center;
  padding: 50px 20px;
}
.hero-banner h1 { font-size: 2rem; margin-bottom: 10px; }
.hero-banner p { color: #ccc; font-size: 0.9rem; }

.brand-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 10px;
}
.brand-btn {
  background: none;
  border: none;
  color: #999;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
}
.brand-btn:hover { color: #b3161a; }

.catalog {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px 40px;
}
.section-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  border-left: 4px solid #b3161a;
  padding-left: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.product {
  position: relative;
  background: #fff;
  border: 1px solid #e2e2e4;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.15s;
}
.product:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #178a2f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
}
.product-link { display: block; text-decoration: none; color: inherit; }
.product-img { font-size: 3rem; margin-bottom: 10px; }
.product-img svg { width: 90px; height: 90px; }
.product h3 { font-size: 0.95rem; margin-bottom: 8px; color: #111; }
.product .desc { color: #777; font-size: 0.82rem; margin-bottom: 10px; min-height: 60px; text-align: left; }
.product .rating { color: #e8a13c; font-size: 0.8rem; margin-bottom: 8px; }
.product .rating span { color: #999; }
.product .price { font-weight: 700; color: #b3161a; margin-bottom: 12px; font-size: 1.05rem; }
.add-btn {
  width: 100%;
  padding: 10px;
  background: #1c1c1e;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}
.add-btn:hover { background: #b3161a; }

.site-footer {
  background: #1c1c1e;
  color: #ccc;
  padding: 40px 20px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 0.9rem; }
.footer-col a { display: block; color: #aaa; text-decoration: none; font-size: 0.82rem; margin-bottom: 8px; }
.footer-col a:hover { color: #fff; }
.footer-text { color: #aaa; font-size: 0.82rem; margin-bottom: 8px; line-height: 1.5; }

/* Overlays */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.overlay.active { display: flex; }

.drawer {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 340px;
  background: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  color: #222;
}
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer-header h2 { font-size: 1.1rem; }
.drawer-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eee; font-size: 0.85rem; }
.cart-item-icon { width: 40px; height: 40px; flex: 0 0 40px; background: #f4f4f5; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-item-icon svg { width: 32px; height: 32px; }
.cart-item-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { display: block; margin-bottom: 4px; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 22px; height: 22px;
  border: 1px solid #ddd;
  background: #f4f4f5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.qty-btn:hover { background: #e2e2e4; }
.qty-val { font-weight: 600; min-width: 14px; text-align: center; }
.cart-item-price { font-weight: 600; white-space: nowrap; }
.promo-row { display: flex; gap: 8px; margin-top: 12px; }
.promo-row input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-transform: uppercase;
}
.promo-row button {
  padding: 0 14px;
  background: #1c1c1e;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}
.promo-msg { font-size: 0.8rem; margin-top: 6px; min-height: 16px; }
.promo-msg.ok { color: #178a2f; }
.promo-msg.error { color: #b3161a; }
.cart-total { font-weight: 700; padding: 16px 0; border-top: 1px solid #eee; }
.cart-total .old-total { text-decoration: line-through; color: #999; font-weight: 400; margin-right: 8px; font-size: 0.85em; }
.checkout-btn {
  background: #b3161a;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

.modal {
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  color: #222;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal h2 { margin-bottom: 8px; font-size: 1.15rem; }
.modal-sub { color: #777; font-size: 0.85rem; margin-bottom: 18px; }
.modal input {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  background: #f4f4f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #222;
}
.modal-btn {
  width: 100%;
  padding: 14px;
  background: #b3161a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
}
.modal-btn.confirm { background: #178a2f; }
.modal-skip {
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  margin-top: 8px;
  font-size: 0.8rem;
  text-decoration: underline;
}

.product-page {
  max-width: 900px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid #e2e2e4;
  border-radius: 8px;
  padding: 40px;
  text-align: left;
}
.detail-top {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.gallery { flex: 0 0 320px; }
.detail-img, .bg-photo {
  width: 320px;
  height: 320px;
  border-radius: 8px;
  background: #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-photo { border-radius: 50%; }
.detail-img svg, .bg-photo svg { width: 260px; height: 260px; }
.detail-img img, .bg-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumb {
  width: 64px; height: 64px;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #f4f4f5;
  display: flex; align-items: center; justify-content: center;
}
.thumb.active { border-color: #b3161a; }
.thumb svg, .thumb img { width: 80%; height: 80%; object-fit: cover; }
.detail-info { flex: 1; }
.detail-info h2 { font-size: 1.3rem; margin-bottom: 8px; }
.detail-info .desc { text-align: left; color: #555; font-size: 0.9rem; margin: 10px 0; min-height: 0; }
.detail-info .price { font-size: 1.4rem; }
.detail-info .add-btn { width: auto; padding: 12px 24px; }
.detail-h3 { font-size: 1rem; margin: 18px 0 10px; border-left: 4px solid #b3161a; padding-left: 10px; }
.detail-specs { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 10px; }
.detail-specs td { padding: 8px 10px; border-bottom: 1px solid #eee; }
.detail-specs td:first-child { color: #777; width: 45%; }
.detail-specs td:last-child { font-weight: 600; }
.review { border-bottom: 1px solid #eee; padding: 12px 0; font-size: 0.88rem; }
.review-head { margin-bottom: 4px; }
.review-stars { color: #e8a13c; margin: 0 8px; }
.review-date { color: #999; font-size: 0.8rem; }

.bg-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e2e4;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}
.bg-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.bg-link { display: block; text-decoration: none; color: inherit; }
.bg-avatar { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; margin: 0 auto 10px; background: #eee; display: flex; align-items: center; justify-content: center; }
.bg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bg-avatar svg { width: 60px; height: 60px; }
.bg-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
.bg-stats { margin: 10px 0; text-align: left; }
.bg-stat-row { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; margin-bottom: 4px; }
.bg-stat-row span:first-child { width: 60px; color: #777; }
.bg-stat-bar { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.bg-stat-fill { height: 100%; background: #b3161a; }

.social-btn {
  display: inline-block;
  margin-top: 10px;
  margin-left: 10px;
  padding: 12px 20px;
  background: #f0f0f2;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #222;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
}
.social-btn:hover { background: #e2e2e4; }

.wheel-outer { position: relative; width: 240px; height: 240px; margin: 10px auto 20px; }
.wheel-pointer {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 24px solid #e8a13c;
  z-index: 5;
}
.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid #1c1c1e;
  transition: transform 4.2s cubic-bezier(0.12, 0.67, 0.1, 0.99);
}
.wheel-labels { position: absolute; inset: 0; pointer-events: none; }
.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90px;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.wheel-result { font-weight: 700; margin: 10px 0; min-height: 20px; color: #178a2f; }

.petition-btn { background: #1a5276; margin-bottom: 10px; }
.petition-btn:hover { background: #21618c; }

.reveal-overlay { background: #000; }
.reveal {
  max-width: 640px;
  text-align: center;
  padding: 20px;
}
.reveal h1 {
  font-size: 3rem;
  color: #b3161a;
  margin-bottom: 20px;
}
.reveal-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #eee;
  margin-bottom: 30px;
}

/* ================= MOBILE / RESPONSIVE ================= */
@media (max-width: 768px) {
  .top-bar-inner { padding: 6px 12px; font-size: 0.72rem; gap: 8px; }

  .header-inner {
    flex-wrap: wrap;
    padding: 12px;
    gap: 12px;
    row-gap: 10px;
  }
  .logo { font-size: 1.15rem; order: 1; }
  .header-actions { order: 2; margin-left: auto; gap: 8px; }
  .search-bar { order: 3; flex: 1 1 100%; max-width: none; }
  .icon-btn { padding: 8px 10px; font-size: 0.82rem; }

  /* Nav en bande scrollable horizontale */
  .nav {
    padding: 8px 12px;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav a { white-space: nowrap; }

  .hero-banner { padding: 32px 16px; }
  .hero-banner h1 { font-size: 1.5rem; }

  .catalog { margin: 20px auto; padding: 0 12px 30px; }
  .section-title { font-size: 1.1rem; margin-top: 28px; }

  /* 2 colonnes sur mobile */
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-tile { padding: 20px 12px; }
  .tile-icon-svg svg { width: 54px; height: 54px; }
  .tile-name { font-size: 0.92rem; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product { padding: 12px; }
  .product-img svg { width: 70px; height: 70px; }
  .product h3 { font-size: 0.85rem; }
  .product .desc { font-size: 0.75rem; min-height: 0; margin-bottom: 8px; }
  .product .price { font-size: 0.95rem; }
  .add-btn { font-size: 0.78rem; padding: 9px; }

  /* Fiche produit : image au-dessus, tout en pleine largeur */
  .product-page { margin: 16px 12px; padding: 20px; }
  .detail-top { flex-direction: column; gap: 16px; }
  .gallery { flex: 1 1 auto; width: 100%; }
  .detail-img, .bg-photo {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
  }
  .detail-img svg, .bg-photo svg { width: 70%; height: auto; }
  .detail-info { width: 100%; }
  .detail-info h2 { font-size: 1.15rem; }
  .social-btn { margin-left: 0; margin-top: 8px; }

  /* Panier : plein écran */
  .drawer { width: 100%; padding: 18px; }

  .modal { padding: 22px; }

  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .reveal { padding: 16px; }
  .reveal h1 { font-size: 2.2rem; }
  .reveal-text { font-size: 0.95rem; }
}

@media (max-width: 340px) {
  .tile-grid, .grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
