/* ===== VARIABLES ===== */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --border-color: #d2d2d7;
  --accent-color: #0071e3;
  --error-color: #ff3b30;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --transition: all 0.25s ease;
}

/* ===== RESET & BASE ===== */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3 {
  margin: 0.5em 0;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block; /* ou vertical-align: middle; */
  max-width: 100%;
  height: auto;
}
/* ===== FONTS ====== */
@font-face {
   font-family: 'Pacifico'; 
   src:
     local('Pacifico Regular'),
     url('assets/fonts/Pacifico-Regular.ttf') format('truetype');
}
.pacifico-font {
   font-size: 2em ;
   font-family:'Pacifico';
}

/* ===== HEADER ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border-color);
}
header .logo {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
header h1 {
  margin: 0;
}
header nav {
  display: flex;
  gap: 28px;
}
header nav a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
header nav a:hover,
header nav a.active {
  color: var(--text-primary);
}

/* ===== CART ICON ===== */
.cart-icon {
  position: relative;
  color: var(--text-primary);
  font-size: 1.25rem;
}
#cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--accent-color);
  color: white;
  font-size: 0.6875rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.hero h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 24px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.btn:hover {
  background: rgba(0, 113, 227, 0.08);
}
.btn.primary {
  background: var(--accent-color);
  color: white;
  border: none;
}
.btn.primary:hover {
  background: #0077f0;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color); /* ← cadre visible */
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

/* Effet au survol : renforce le cadre */
.product-card:hover {
  border-color: #c6c6cc; /* gris un peu plus foncé */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}
.product-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  margin-bottom: 16px;
}
.product-title {
  font-size: 1.25rem;
  margin: 12px 0 8px;
}
.product-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  min-height: 48px;
}
.product-price {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 12px 0;
}
.product-btn {
  margin-top: 12px;
}

/* ===== PANIER ===== */
#cart-container {
  padding: 40px 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.cart-item img {
  width: 80px;
  border-radius: 8px;
}
.cart-name {
  flex: 3;
  text-align: left;
  font-weight: 500;
}
.cart-price {
  flex: 1;
  text-align: center;
  font-weight: 600;
}
.cart-item button {
  background: var(--error-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.cart-item button:hover {
  background: #e5352a;
}

/* === Quantité === */
.qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.qty-btn:hover {
  background: #e9e9eb;
}
.qty-value {
  display: inline-block;
  width: 40px;
  text-align: center;
  font-weight: 600;
}

/* Color buttons */
.color-palette {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.color-swatch.selected {
  transform: scale(1.25);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.3);
}

/* Total et bouton centrés */
#cart-total {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 16px;
  text-align: center;
}
#checkout-btn {
  display: block;
  margin: 16px auto;
  padding: 14px 32px;
  font-size: 1.125rem;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 1em 0;
  color: var(--text-secondary);
  margin-top: 2em;
}
footer p {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  border-top: 1px solid var(--border-color);
}

/* ===== NOTIFICATIONS ===== */
#notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#notifications > div {
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-size: 0.9375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  animation: fadeInOut 3s forwards;
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}
#notifications .error { background: var(--error-color); }
#notifications .info { background: var(--accent-color); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    gap: 16px;
  }
  nav {
    gap: 16px;
  }
  .cart-item {
    flex-direction: column;
    text-align: center;
  }
  .cart-name, .cart-price {
    width: 100%;
  }
  .product-grid {
    grid-template-columns: 1fr;
    padding: 24px 16px;
  }
}
