/* ==========================================================================
   V.E.T SHOP — css/style.css
   Design System: "The Kinetic Editorial"
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fb;
  color: #191c1e;
  min-height: max(884px, 100dvh);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS — Variables CSS (The Kinetic Editorial Palette)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary:                #a33900;
  --color-primary-container:      #cc4900;
  --color-primary-fixed:          #ffdbce;
  --color-primary-fixed-dim:      #ffb599;
  --color-inverse-primary:        #ffb599;
  --color-on-primary:             #ffffff;
  --color-on-primary-fixed:       #370e00;
  --color-on-primary-fixed-variant: #7f2b00;
  --color-on-primary-container:   #fffbff;

  /* Secondary / WhatsApp Green — Trust Signal */
  --color-secondary:              #006d2f;
  --color-secondary-container:    #5dfd8a;
  --color-secondary-fixed:        #66ff8e;
  --color-secondary-fixed-dim:    #3de273;
  --color-on-secondary:           #ffffff;
  --color-on-secondary-fixed:     #002109;
  --color-on-secondary-fixed-variant: #005322;
  --color-on-secondary-container: #007232;

  /* Tertiary */
  --color-tertiary:               #525d6c;
  --color-tertiary-container:     #6b7586;
  --color-tertiary-fixed:         #d9e3f6;
  --color-tertiary-fixed-dim:     #bdc7d9;
  --color-on-tertiary:            #ffffff;
  --color-on-tertiary-fixed:      #121c2a;
  --color-on-tertiary-fixed-variant: #3d4756;
  --color-on-tertiary-container:  #fdfcff;

  /* Surface System — Sheet Philosophy */
  --color-background:             #f8f9fb;
  --color-surface:                #f8f9fb;
  --color-surface-bright:         #f8f9fb;
  --color-surface-dim:            #d9dadc;
  --color-surface-variant:        #e1e2e4;
  --color-surface-tint:           #a73a00;
  --color-surface-container-lowest: #ffffff;
  --color-surface-container-low: #f3f4f6;
  --color-surface-container:     #edeef0;
  --color-surface-container-high: #e7e8ea;
  --color-surface-container-highest: #e1e2e4;
  --color-inverse-surface:        #2e3132;
  --color-inverse-on-surface:     #f0f1f3;

  /* On-Surface */
  --color-on-surface:             #191c1e;
  --color-on-surface-variant:     #5a4138;
  --color-on-background:          #191c1e;

  /* Error */
  --color-error:                  #ba1a1a;
  --color-error-container:        #ffdad6;
  --color-on-error:               #ffffff;
  --color-on-error-container:     #93000a;

  /* Outline */
  --color-outline:                #8e7166;
  --color-outline-variant:        #e2bfb2;

  /* Spacing — 8px grid, Power of 24 */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Shadows — Ambient (never grey, tinted on-surface) */
  --shadow-ambient: 0px 12px 24px rgba(25, 28, 30, 0.06);
  --shadow-primary: 0px 8px 16px rgba(163, 57, 0, 0.20);
  --shadow-success: 0px 12px 24px rgba(0, 109, 47, 0.20);
}

/* --------------------------------------------------------------------------
   3. MATERIAL SYMBOLS OUTLINED — Icon Font Settings
   -------------------------------------------------------------------------- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --------------------------------------------------------------------------
   4. UTILITIES PARTAGÉES
   -------------------------------------------------------------------------- */

/* Kinetic Gradient — Signature CTA (No flat fills rule) */
.kinetic-gradient {
  background: linear-gradient(135deg, #a33900 0%, #cc4900 100%);
}

/* No scrollbar — scrollable containers discrets */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Glass Backdrop — Navigation bars & overlays */
.glass-backdrop {
  background: rgba(248, 249, 251, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Antialiasing */
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   5. TOP APP BAR
   -------------------------------------------------------------------------- */
.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 24px;
  background: rgba(248, 249, 251, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.top-app-bar__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-app-bar__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.top-app-bar__menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #1e293b;
  padding: 4px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.top-app-bar__menu-btn:hover {
  background: rgba(25, 28, 30, 0.06);
}

.top-app-bar__tagline {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ea580c; /* orange-600 */
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   6. BOTTOM NAVIGATION CLIENT — Floating Dock (4 icônes)
   -------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 28rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-ambient);
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 16px;
}

.bottom-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: var(--radius-full);
  color: #94a3b8; /* slate-400 */
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  border: none;
  background: transparent;
  cursor: pointer;
}

.bottom-nav__item:hover {
  background: rgba(25, 28, 30, 0.05);
}

.bottom-nav__item--active {
  background: #ea580c; /* orange-600 */
  color: #ffffff;
  width: 48px;
  height: 48px;
  padding: 0;
  box-shadow: 0px 4px 12px rgba(234, 88, 12, 0.35);
  transform: scale(0.92);
}

.bottom-nav__item--active:hover {
  background: #c2410c; /* orange-700 */
}

/* État actif via :target CSS */
/* Défaut : Accueil actif */
.bottom-nav__item[href="#accueil"] { background: #ea580c; color: #ffffff; width: 48px; height: 48px; padding: 0; box-shadow: 0px 4px 12px rgba(234, 88, 12, 0.35); transform: scale(0.92); }
.bottom-nav__item[href="#recherche"],
.bottom-nav__item[href="#panier"],
.bottom-nav__item[href="#profil"] { background: transparent; color: #94a3b8; width: auto; height: auto; padding: 12px; box-shadow: none; transform: none; }

/* Quand #recherche est la cible */
:target ~ * .bottom-nav__item[href="#accueil"],
body:has(#recherche:target) .bottom-nav__item[href="#accueil"] { background: transparent; color: #94a3b8; width: auto; height: auto; padding: 12px; box-shadow: none; transform: none; }
body:has(#recherche:target) .bottom-nav__item[href="#recherche"] { background: #ea580c; color: #ffffff; width: 48px; height: 48px; padding: 0; box-shadow: 0px 4px 12px rgba(234, 88, 12, 0.35); transform: scale(0.92); }

/* Quand #panier est la cible */
body:has(#panier:target) .bottom-nav__item[href="#accueil"] { background: transparent; color: #94a3b8; width: auto; height: auto; padding: 12px; box-shadow: none; transform: none; }
body:has(#panier:target) .bottom-nav__item[href="#panier"] { background: #ea580c; color: #ffffff; width: 48px; height: 48px; padding: 0; box-shadow: 0px 4px 12px rgba(234, 88, 12, 0.35); transform: scale(0.92); }

/* Quand #profil est la cible */
body:has(#profil:target) .bottom-nav__item[href="#accueil"] { background: transparent; color: #94a3b8; width: auto; height: auto; padding: 12px; box-shadow: none; transform: none; }
body:has(#profil:target) .bottom-nav__item[href="#profil"] { background: #ea580c; color: #ffffff; width: 48px; height: 48px; padding: 0; box-shadow: 0px 4px 12px rgba(234, 88, 12, 0.35); transform: scale(0.92); }

/* --------------------------------------------------------------------------
   7. BOTTOM NAVIGATION VENDEUR — Admin Dock (3 icônes)
   -------------------------------------------------------------------------- */
.admin-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 24rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-ambient);
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 24px;
}

.admin-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-nav__item:hover {
  background: rgba(25, 28, 30, 0.05);
  color: #64748b;
}

.admin-nav__item--add {
  background: #ea580c;
  color: #ffffff;
  width: 56px;
  height: 56px;
  padding: 0;
  gap: 0;
  box-shadow: 0px 6px 16px rgba(234, 88, 12, 0.40);
  transform: scale(0.95);
  font-size: 0;
}

.admin-nav__item--add:hover {
  background: #c2410c;
  transform: scale(1);
}

.admin-nav__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   8. COMPOSANTS PARTAGÉS
   -------------------------------------------------------------------------- */

/* --- Side Drawer --- */
.side-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 75%;
  max-width: 22rem;
  background: #f8fafc;
  z-index: 50;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 0 20px 20px 0;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  padding: 24px;
}

.side-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.side-drawer__brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
}

.side-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.side-drawer__close:hover {
  background: #e2e8f0;
}

.side-drawer__nav-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #94a3b8;
  margin-bottom: 16px;
  padding: 0 12px;
}

.side-drawer__nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 12px;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: padding-left 0.3s, color 0.2s, background 0.2s;
}

.side-drawer__nav-link:hover {
  padding-left: 20px;
  color: #ea580c;
}

.side-drawer__nav-link.active {
  background: #fff7ed;
  color: #ea580c;
  font-weight: 700;
}

.side-drawer__nav-link .material-symbols-outlined {
  color: #94a3b8;
  transition: color 0.2s;
}

.side-drawer__nav-link:hover .material-symbols-outlined,
.side-drawer__nav-link.active .material-symbols-outlined {
  color: #ea580c;
}

.side-drawer__footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.side-drawer__vendor-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.25);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.side-drawer__vendor-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.35);
}

.side-drawer__vendor-btn:active {
  transform: scale(0.98);
}

/* --- Cards produits --- */
.product-card {
  display: flex;
  flex-direction: column;
}

.product-card__image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #edeef0;
  margin-bottom: 16px;
  aspect-ratio: 4/5;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.product-card__image-wrapper:hover .product-card__image {
  transform: scale(1.05);
}

.product-card__fav-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(8px);
  border: none;
  padding: 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.product-card__fav-btn:hover {
  transform: scale(1.1);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-card__badge--error {
  background: #ba1a1a;
  color: #ffffff;
}

.product-card__badge--primary {
  background: rgba(163, 57, 0, 0.1);
  color: #a33900;
}

.product-card__info {
  padding: 0 4px;
}

.product-card__name {
  font-weight: 700;
  font-size: 0.875rem;
  color: #191c1e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.product-card__price {
  font-weight: 700;
  color: #a33900;
  font-size: 0.875rem;
}

.product-card__price-suffix {
  font-size: 0.625rem;
  font-weight: 700;
  color: #94a3b8;
  margin-left: 2px;
}

.product-card__add-btn {
  width: 100%;
  background: #ea580c;
  color: #ffffff;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  margin-top: 8px;
}

.product-card__add-btn:hover {
  background: #c2410c;
}

.product-card__add-btn:active {
  transform: scale(0.96);
}

.product-card__add-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

/* --- Toast Notification --- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 90%;
  max-width: 28rem;
  background: var(--color-secondary);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: var(--shadow-success);
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 500;
  animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* --- Panier Bottom Sheet --- */
.panier-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 20;
}

.panier-sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.panier-sheet__handle {
  width: 48px;
  height: 5px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.panier-sheet__card {
  background: #f3f4f6;
  width: 100%;
  max-width: 42rem;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(25, 28, 30, 0.15);
  overflow: hidden;
  padding-bottom: 40px;
}

.panier-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(25, 28, 30, 0.05);
  background: #f3f4f6;
}

.panier-sheet__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #191c1e;
}

.panier-sheet__close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: #edeef0;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.panier-sheet__close-btn:hover {
  background: #e1e2e4;
}

.panier-sheet__content {
  max-height: 65vh;
  overflow-y: auto;
  padding: 16px 24px;
}

/* --- Article dans le panier --- */
.article-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
}

.article-item__image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #edeef0;
}

.article-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-item__category {
  font-size: 0.75rem;
  font-weight: 500;
  color: #5a4138;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.article-item__name {
  font-weight: 700;
  color: #191c1e;
}

.article-item__price {
  font-weight: 700;
  color: #a33900;
}

.article-item__qty {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #edeef0;
  padding: 4px;
  border-radius: var(--radius-full);
}

.article-item__qty-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  color: #191c1e;
  transition: background 0.2s;
}

.article-item__qty-btn:hover {
  background: #f1f5f9;
}

.article-item__qty-value {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 4px;
  color: #191c1e;
}

/* --- Formulaire panier --- */
.form-label {
  display: block;
}

.form-label__text {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #5a4138;
  margin-bottom: 6px;
  margin-left: 4px;
}

.form-input-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 16px;
  transition: border-color 0.2s;
}

.form-input-wrapper:focus-within {
  border-color: rgba(163, 57, 0, 0.25);
}

.form-input-wrapper .material-symbols-outlined {
  color: #5a4138;
  margin-right: 12px;
  font-size: 1.125rem;
}

.form-input-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  color: #191c1e;
  font-family: 'Inter', sans-serif;
}

.form-input-wrapper input::placeholder {
  color: #94a3b8;
}

.form-select-wrapper {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
}

.form-select-wrapper select {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.875rem;
  color: #191c1e;
  font-family: 'Inter', sans-serif;
  appearance: none;
  padding: 0;
}

/* --- Total Summary --- */
.total-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: rgba(225, 226, 228, 0.3);
  padding: 16px;
  border-radius: 12px;
}

.total-summary__label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #5a4138;
  margin-bottom: 4px;
}

.total-summary__amount {
  font-size: 1.875rem;
  font-weight: 900;
  color: #191c1e;
  letter-spacing: -0.02em;
}

.total-summary__delivery {
  font-size: 0.75rem;
  color: #006d2f;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- WhatsApp CTA Button --- */
.whatsapp-btn {
  width: 100%;
  background: #25D366;
  color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.20);
}

.whatsapp-btn:hover {
  background: #128C7E;
}

.whatsapp-btn:active {
  transform: scale(0.98);
}

/* --- Vue SPA (navigation :target) --- */
.view {
  display: none;
}

/* La vue accueil est visible par défaut (aucune ancre sélectionnée ou #accueil sélectionnée) */
.view#accueil {
  display: block;
}

/* Quand une cible est sélectionnée, masquer accueil et afficher la cible */
body:has(#recherche:target) .view#accueil,
body:has(#panier:target)   .view#accueil,
body:has(#profil:target)   .view#accueil {
  display: none;
}

#recherche:target,
#panier:target,
#profil:target {
  display: block;
}

/* --------------------------------------------------------------------------
   9. VUE ACCUEIL — Hero & Editorial
   -------------------------------------------------------------------------- */
.hero-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(25, 28, 30, 0.04);
}

.hero-card__image-wrapper {
  width: 100%;
  height: 256px;
  overflow: hidden;
}

.hero-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-card:hover .hero-card__image {
  transform: scale(1.04);
}

.hero-card__body {
  padding: 32px;
}

.secondary-banner {
  background: #006d2f;
  color: #ffffff;
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  overflow: hidden;
  margin-top: 48px;
}

.secondary-banner__ghost-icon {
  position: absolute;
  right: -40px;
  bottom: -40px;
  opacity: 0.08;
}

.secondary-banner__cta {
  background: #ffffff;
  color: #006d2f;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  width: fit-content;
}

.secondary-banner__cta:hover {
  background: #f1f5f9;
}

/* --------------------------------------------------------------------------
   10. VUE RECHERCHE
   -------------------------------------------------------------------------- */
.search-input-wrapper {
  position: relative;
}

.search-input-wrapper .material-symbols-outlined {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  transition: color 0.2s;
}

.search-input-wrapper:focus-within .material-symbols-outlined {
  color: #a33900;
}

.search-input {
  width: 100%;
  background: #f3f4f6;
  border: none;
  border-radius: 12px;
  padding: 20px 16px 20px 48px;
  color: #191c1e;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s;
}

.search-input:focus {
  box-shadow: 0 0 0 2px rgba(163, 57, 0, 0.2);
}

.search-input::placeholder {
  color: #94a3b8;
}

.category-pill {
  padding: 12px 24px;
  background: #ffffff;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  color: #191c1e;
}

.category-pill:hover {
  background: #a33900;
  color: #ffffff;
  transform: translateY(-1px);
}

.category-pill:active {
  transform: scale(0.97);
}

/* Bento grid recherche */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bento-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.bento-item--tall {
  aspect-ratio: 3/4;
}

.bento-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.bento-item:hover .bento-item__image {
  transform: scale(1.08);
}

.bento-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.bento-item__title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
}

.bento-item__subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   11. VUE PROFIL — Placeholder
   -------------------------------------------------------------------------- */
.profil-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 48px 24px;
}

.profil-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #a33900 0%, #cc4900 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-primary);
}

.profil-avatar .material-symbols-outlined {
  font-size: 3rem;
  color: #ffffff;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

/* --------------------------------------------------------------------------
   12. ADMIN — Formulaire Catalogue
   -------------------------------------------------------------------------- */
.admin-form-card {
  background: #f3f4f6;
  border-radius: 16px;
  padding: 4px;
}

.admin-form-inner {
  background: #ffffff;
  padding: 32px;
  border-radius: 12px;
}

.admin-upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(142, 113, 102, 0.25); /* outline_variant/25 */
  border-radius: 16px;
  padding: 40px;
  transition: background 0.3s;
  cursor: pointer;
}

.admin-upload-zone:hover {
  background: #f3f4f6;
}

.admin-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-upload-icon {
  width: 64px;
  height: 64px;
  background: #ffdbce;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  color: #a33900;
}

.admin-upload-icon .material-symbols-outlined {
  font-size: 2rem;
}

.admin-field-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #5a4138;
  margin-left: 4px;
  margin-bottom: 8px;
  display: block;
}

.admin-input {
  width: 100%;
  background: #f3f4f6;
  border: none;
  border-radius: 12px;
  padding: 16px;
  color: #191c1e;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.2s;
}

.admin-input:focus {
  box-shadow: 0 0 0 2px rgba(163, 57, 0, 0.2);
}

.admin-input::placeholder {
  color: rgba(90, 65, 56, 0.40);
}

.admin-toggle {
  display: flex;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 12px;
  height: 56px;
}

.admin-toggle__btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  background: transparent;
  color: rgba(90, 65, 56, 0.6);
}

.admin-toggle__btn--active {
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(25, 28, 30, 0.1);
  color: #191c1e;
  font-weight: 700;
}

.admin-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #a33900 0%, #cc4900 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 20px;
  border-radius: 12px;
  font-size: 1.125rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-submit-btn:hover {
  box-shadow: 0 12px 24px rgba(163, 57, 0, 0.30);
  transform: translateY(-1px);
}

.admin-submit-btn:active {
  transform: scale(0.99);
}

.admin-stat-card {
  background: #f3f4f6;
  padding: 24px;
  border-radius: 16px;
}

.admin-stat-card .material-symbols-outlined {
  display: block;
  margin-bottom: 8px;
}

.admin-stat-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #191c1e;
  margin-bottom: 4px;
}

.admin-stat-card__value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #191c1e;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   13. RESPONSIVE & UTILITIES FINALES
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .hero-card__image-wrapper {
    height: 400px;
  }

  .hero-card .hero-card__layout {
    display: flex;
    flex-direction: row;
  }

  .hero-card__image-wrapper {
    width: 60%;
  }

  .hero-card__body {
    width: 40%;
    padding: 48px;
  }
}

/* Utility: pb-safe pour éviter que le contenu soit caché sous la bottom nav */
.pb-nav {
  padding-bottom: 96px;
}

/* ==========================================================================
   14. ÉTATS DYNAMIQUES JAVASCRIPT
   Toutes les classes ajoutées / retirées par script.js
   ========================================================================== */

/* ── Side Drawer : état par défaut = FERMÉ ──────────────────────────────── */
/* L'overlay est caché par défaut */
.side-drawer-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Le drawer glisse hors écran (gauche) par défaut */
.side-drawer {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── États ouverts (classes ajoutées par JS) ─────────────────────────────── */
.side-drawer-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer.is-open {
  transform: translateX(0);
}

/* ── Scroll lock : empêche le body de défiler quand le drawer est ouvert ── */
body.drawer-lock {
  overflow: hidden;
}

/* ── Bottom Nav : état actif contrôlé par JS (.active) ──────────────────── */
/*
   Le CSS :target est toujours actif comme fallback.
   Quand JS tourne, il ajoute/retire la classe .active.
   On neutralise la règle statique "accueil actif par défaut"
   si JavaScript est disponible (présence du script = body.js-ready).
*/
body.js-ready .bottom-nav__item[href="#accueil"] {
  background: transparent;
  color: #94a3b8;
  width: auto;
  height: auto;
  padding: 12px;
  box-shadow: none;
  transform: none;
}

.bottom-nav__item.active {
  background: #ea580c !important;
  color: #ffffff !important;
  width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  box-shadow: 0px 4px 12px rgba(234, 88, 12, 0.35) !important;
  transform: scale(0.92) !important;
}

/* ── Badge compteur panier ──────────────────────────────────────────────── */
.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  background: #a33900;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 0.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  pointer-events: none;
  line-height: 1;
}

/* L'item de nav doit être en position relative pour le badge */
#nav-panier {
  position: relative;
}

/* ── État vide du panier ─────────────────────────────────────────────────── */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
  color: #94a3b8;
}

/* ── Animation spinner chargement produits ───────────────────────────────── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
