/* ════════════════════════════════════════════════════
   TafTaf Market — Feuille de style globale
   ════════════════════════════════════════════════════ */

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

/* ── Variables ── */
:root {
  /* Héritage ancien */
  --primary:      #F59E0B;
  --primary-dark: #B45309;
  --success:      #10B981;
  --danger:       #F43F5E;

  /* Palette design system */
  --amber:        #F59E0B;
  --amber-dark:   #B45309;
  --emerald:      #10B981;
  --rose:         #F43F5E;
  --violet:       #8B5CF6;

  /* Texte */
  --text:         #111827;
  --text-light:   #374151;
  --text-muted:   #9CA3AF;
  --text-sub:     #6B7280;
  --text-lighter: #D1D5DB;

  /* Surfaces */
  --bg:           #F9FAFB;
  --surface:      #F3F4F6;
  --white:        #FFFFFF;

  /* Bordures */
  --border:       #E5E7EB;
  --border-md:    #D1D5DB;
  --border-dark:  #9CA3AF;

  /* Ombres */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06);
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --shadow-md:    0 4px 24px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.13);
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a   { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Wrapper page ── */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════ */
.topbar {
  background: #111827;
  color: rgba(255,255,255,.85);
  font-size: 12px;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
}
.topbar-item { white-space: nowrap; }
.topbar-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .2s;
}
.topbar-close:hover { color: white; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  transition: box-shadow .2s;
}

/* ── Barre principale ── */
.nav-main {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 20px;
}

/* ── Hamburger (mobile) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background .2s;
}
.nav-hamburger:hover { background: var(--surface); }
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--amber);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.nav-logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
}
.nav-logo-text em {
  font-style: normal;
  color: var(--amber);
}

/* ── Recherche ── */
.nav-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.nav-search input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 48px 0 16px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  background: var(--surface);
  transition: border-color .2s, background .2s;
  color: var(--text);
}
.nav-search input:focus {
  border-color: var(--amber);
  background: #fff;
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: var(--amber);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background .2s;
}
.nav-search-btn:hover { background: var(--amber-dark); }
.nav-search-btn svg { width: 15px; height: 15px; stroke: white; }

/* ── Actions droite ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* Bouton icône (notif, favoris, panier) */
.nav-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background .2s;
}
.nav-icon-btn:hover { background: var(--surface); }
.nav-icon-btn svg { width: 20px; height: 20px; }

/* Badge rouge */
.nav-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: var(--danger);
  color: white;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Séparateur vertical */
.nav-divider {
  width: 1px;
  height: 26px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Bouton "shop" (Achat en ligne, Commandes, Mon Espace) */
.nav-shop-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 36px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav-shop-btn:hover { background: var(--surface); color: var(--amber-dark); }
.nav-shop-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Avatar utilisateur */
.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 700;
  border: 2px solid var(--border);
  overflow: hidden;
  transition: border-color .2s;
  flex-shrink: 0;
}
.nav-avatar:hover { border-color: var(--amber); }

/* Login */
.nav-login { display: flex; align-items: center; }
.nav-login-btn {
  padding: 0 16px;
  height: 36px;
  background: var(--amber);
  color: white;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  transition: background .2s;
  display: flex;
  align-items: center;
}
.nav-login-btn:hover { background: var(--amber-dark); }

/* ── Sous-barre catégories ── */
.nav-sub {
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.nav-sub-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-sub-inner::-webkit-scrollbar { display: none; }

/* Catégories pills */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-sub);
  transition: background .18s, color .18s;
  flex-shrink: 0;
}
.cat-pill:hover  { background: var(--surface); color: var(--text); }
.cat-pill.active { background: #FEF3C7; color: var(--amber-dark); }

/* Badge "live" */
.nav-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--emerald);
  background: #ECFDF5;
  flex-shrink: 0;
  transition: background .18s;
}
.nav-online-badge:hover { background: #D1FAE5; }
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  animation: livePulse 2s infinite;
  flex-shrink: 0;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}
.sub-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   MOBILE DRAWER
══════════════════════════════════════════ */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  opacity: 0;
  transition: opacity .25s;
}
.mob-overlay.open { display: block; opacity: 1; }

.mob-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #fff;
  z-index: 400;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.mob-drawer.open { transform: translateX(0); }

.mob-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1.5px solid var(--border);
}
.mob-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .2s, color .2s;
}
.mob-drawer-close:hover { background: var(--border); color: var(--text); }

.mob-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}
.mob-drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background .15s, color .15s;
}
.mob-drawer-link:hover { background: var(--surface); color: var(--amber-dark); }
.mob-drawer-sep {
  height: 1px;
  background: var(--border);
  margin: 8px 18px;
}

.mob-drawer-cta {
  display: block;
  margin: 14px 16px 20px;
  padding: 13px;
  background: var(--amber);
  color: white;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s;
}
.mob-drawer-cta:hover { background: var(--amber-dark); }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.footer {
  background: #111827;
  color: rgba(255,255,255,.75);
  padding: 48px 20px 24px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

/* Logo footer */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.footer-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--amber);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.footer-logo-name {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.footer-logo-name em { color: var(--amber); font-style: normal; }

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 14px;
  color: rgba(255,255,255,.6);
}
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-badge {
  padding: 4px 10px;
  background: rgba(255,255,255,.08);
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
}

/* Colonnes footer */
.footer-col-head {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li {
  margin-bottom: 9px;
  font-size: 13px;
}
.footer-col ul li a {
  color: rgba(255,255,255,.65);
  transition: color .18s;
}
.footer-col ul li a:hover { color: var(--amber); }

/* Bas de footer */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-copy { font-size: 12px; color: rgba(255,255,255,.45); }
.footer-socials { display: flex; gap: 8px; }
.social {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background .2s;
}
.social:hover { background: rgba(255,255,255,.16); }

/* ══════════════════════════════════════════
   BOUTONS COMMUNS
══════════════════════════════════════════ */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s, color .2s, transform .15s;
  cursor: pointer;
  border: none;
}
.btn-cta:active { transform: scale(.97); }
.btn-primary {
  background: var(--amber);
  color: white;
}
.btn-primary:hover { background: var(--amber-dark); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

/* ══════════════════════════════════════════
   UTILITAIRES
══════════════════════════════════════════ */
.hide-m { /* visible desktop, caché mobile */ }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-hamburger { display: flex; }
  .nav-search { max-width: none; flex: 1; }
  .nav-shop-btn { display: none; }
  .nav-divider  { display: none; }
  .nav-login    { display: none; }
  .hide-m       { display: none !important; }
  .nav-logo-text { font-size: 17px; }
  .nav-main { height: 56px; }
  .nav-sub-inner { height: 38px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .topbar-item:not(:first-child) { display: none; }
}

@media (max-width: 560px) {
  .nav-search input { font-size: 13px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .wrap { padding: 0 14px; }
}
