* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #f4f6f8;
  color: #222;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.top-bar {
  background: #1a3c5e; color: #fff; font-size: 13px; padding: 8px 0;
}
.top-bar .container {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.main-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; gap: 20px; flex-wrap: wrap;
}
.logo h1 { font-size: 22px; color: #1a3c5e; }
.logo h1 span { color: #f39c12; }
.logo p { font-size: 12px; color: #666; }
.search-bar {
  flex: 1; display: flex; max-width: 500px; min-width: 250px;
}
.search-bar input {
  flex: 1; padding: 10px 15px; border: 2px solid #ddd;
  border-radius: 25px 0 0 25px; outline: none;
}
.search-bar button {
  padding: 10px 20px; border: none; background: #1a3c5e;
  color: #fff; border-radius: 0 25px 25px 0; cursor: pointer;
}
.cart-btn {
  position: relative; font-size: 22px; color: #1a3c5e;
  text-decoration: none; padding: 8px 12px;
}
#cart-count {
  position: absolute; top: 0; right: 0;
  background: #e74c3c; color: #fff; font-size: 12px;
  border-radius: 50%; padding: 2px 7px; font-weight: bold;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, #1a3c5e, #2c5f8a);
  color: #fff; padding: 40px 30px; border-radius: 12px;
  margin: 25px 0; text-align: center;
}
.hero h2 { font-size: 28px; margin-bottom: 8px; }

/* LAYOUT */
.catalogue-layout {
  display: grid; grid-template-columns: 250px 1fr; gap: 25px;
  margin-bottom: 40px;
}
@media (max-width: 800px) {
  .catalogue-layout { grid-template-columns: 1fr; }
}

/* SIDEBAR */
.sidebar {
  background: #fff; padding: 20px; border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); height: fit-content;
}
.sidebar h3 { margin-bottom: 15px; color: #1a3c5e; font-size: 16px; }
.sidebar ul { list-style: none; }
.sidebar li { margin-bottom: 4px; }
.sidebar a {
  display: block; padding: 8px 12px; color: #333;
  text-decoration: none; border-radius: 6px; font-size: 14px;
  transition: all .2s;
}
.sidebar a:hover { background: #eef3f8; }
.sidebar a.active { background: #1a3c5e; color: #fff; }
.sidebar small { color: #999; font-size: 11px; }
.sidebar a.active small { color: #cce; }

/* PRODUITS */
.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 15px; flex-wrap: wrap; gap: 10px;
}
.toolbar select {
  padding: 8px 12px; border-radius: 8px; border: 1px solid #ddd;
  background: #fff; cursor: pointer;
}
.produits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.produit-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.produit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.produit-img {
  background: linear-gradient(135deg, #eef3f8, #d9e6f2);
  height: 130px; display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: #1a3c5e;
}
.produit-body { padding: 15px; flex: 1; display: flex; flex-direction: column; }
.produit-cat {
  font-size: 11px; color: #f39c12; font-weight: bold;
  text-transform: uppercase; letter-spacing: .5px;
}
.produit-body h3 { font-size: 15px; margin: 6px 0; color: #1a3c5e; }
.produit-body p { font-size: 13px; color: #666; flex: 1; }
.produit-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee;
}
.prix { font-size: 18px; font-weight: bold; color: #27ae60; }
.btn-add {
  background: #1a3c5e; color: #fff; border: none;
  padding: 8px 14px; border-radius: 20px; cursor: pointer;
  font-size: 13px; transition: background .2s;
}
.btn-add:hover { background: #f39c12; }

.loading, .empty {
  grid-column: 1/-1; text-align: center;
  padding: 40px; color: #999; font-size: 15px;
}

/* FOOTER */
.footer {
  background: #1a3c5e; color: #cce;
  padding: 25px 0; text-align: center;
  margin-top: 40px; font-size: 13px;
}
.footer p { margin: 4px 0; }

/* TOAST */
.toast {
  position: fixed; bottom: 30px; right: 30px;
  background: #27ae60; color: #fff;
  padding: 14px 22px; border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  opacity: 0; transform: translateY(20px);
  transition: all .3s; pointer-events: none;
  z-index: 9999; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateY(0); }
/* ============================================
   AJOUTS : Top bar, Header actions, Footer
   ============================================ */

/* Top bar layout */
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.top-left { display: flex; gap: 20px; flex-wrap: wrap; }
.top-left span { display: inline-flex; align-items: center; gap: 6px; }
.top-right { display: flex; gap: 15px; }
.top-right a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s;
}
.top-right a:hover { color: #f39c12; }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-icon-btn {
  color: #1a3c5e;
  font-size: 20px;
  padding: 8px 12px;
  text-decoration: none;
  transition: color .2s;
}
.header-icon-btn:hover { color: #f39c12; }

/* Hero badges */
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 14px;
}
.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-badges i { color: #f39c12; }

/* Footer enrichi */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 40px 20px 30px;
  text-align: left;
}
.footer-col h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 15px;
}
.footer-col h3 span { color: #f39c12; }
.footer-col h4 {
  color: #f39c12;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}
.footer-col p {
  font-size: 13px;
  line-height: 1.7;
  color: #b8cde0;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li {
  margin-bottom: 8px;
  font-size: 13px;
  color: #b8cde0;
}
.footer-col ul li i {
  color: #f39c12;
  margin-right: 8px;
  width: 16px;
}
.footer-col ul a {
  color: #b8cde0;
  text-decoration: none;
  transition: color .2s;
}
.footer-col ul a:hover { color: #f39c12; }

.footer-bottom {
  border-top: 1px solid #2c5f8a;
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: #8fb0cc;
}

/* Responsive */
@media (max-width: 768px) {
  .top-bar .container { flex-direction: column; align-items: flex-start; }
  .main-header { flex-direction: column; align-items: stretch; }
  .search-bar { max-width: 100%; }
  .header-actions { justify-content: center; }
  .hero-badges { flex-direction: column; align-items: center; gap: 10px; }
  .footer-grid { text-align: center; }
  .footer-col ul li i { display: inline-block; }
}
