/* ============================================================
   Big'Z Store — Feuille de style principale
   Couleurs pilotées par config.js (cf. section :root)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:          #D4611A;
  --primary-dark:     #A84E15;
  --primary-light:    #F0894A;
  --primary-pale:     #FFF0E8;
  --secondary:        #1A5FAD;
  --secondary-dark:   #154B8A;
  --secondary-light:  #3A82D0;
  --white:            #FFFFFF;
  --light:            #FFF8F4;
  --gray-100:         #F7F1EC;
  --gray-200:         #EDE4DD;
  --gray-500:         #9B8B82;
  --gray-700:         #5C4A40;
  --dark:             #2A1F1A;
  --success:          #2EBD6B;
  --warning:          #F0A500;
  --danger:           #E53935;
  --info:             #1A5FAD;
  --radius:           12px;
  --radius-sm:        8px;
  --radius-lg:        24px;
  --shadow:           0 4px 20px rgba(212,97,26,.10);
  --shadow-hover:     0 8px 32px rgba(212,97,26,.22);
  --transition:       all .28s ease;
  /* Dark mode (surcharge via [data-theme="dark"]) */
  --bg-page:          #FFF8F4;
  --bg-card:          #FFFFFF;
  --bg-input:         #FFFFFF;
  --text-body:        #2A1F1A;
  --border-color:     #EDE4DD;
}

/* ── MODE SOMBRE ───────────────────────────────────────────── */
[data-theme="dark"] {
  --primary:          #F07A3A;
  --primary-dark:     #D4611A;
  --primary-light:    #FF9B5A;
  --primary-pale:     #2A1408;
  --secondary:        #4A9FE0;
  --secondary-dark:   #3A82D0;
  --secondary-light:  #6AB8F0;
  --white:            #1E1830;
  --light:            #150F22;
  --gray-100:         #2A2440;
  --gray-200:         #3A3352;
  --gray-500:         #9A8DB0;
  --gray-700:         #C8BDD8;
  --dark:             #F0ECF8;
  --success:          #3ECD7B;
  --warning:          #F5B020;
  --danger:           #FF5252;
  --shadow:           0 4px 20px rgba(0,0,0,.35);
  --shadow-hover:     0 8px 32px rgba(0,0,0,.50);
  --bg-page:          #150F22;
  --bg-card:          #1E1830;
  --bg-input:         #2A2440;
  --text-body:        #F0ECF8;
  --border-color:     #3A3352;
}

/* Transition douce lors du changement de thème */
*, *::before, *::after { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
/* Désactiver cette transition sur les animations où elle gêne */
.flash, .product-card:hover, .btn:hover, .category-card:hover { transition: var(--transition) !important; }

/* Corrections dark mode spécifiques */
[data-theme="dark"] body          { background: var(--bg-page); color: var(--text-body); }
[data-theme="dark"] .site-header  { background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
[data-theme="dark"] .product-card { background: var(--bg-card); }
[data-theme="dark"] .cart-summary,
[data-theme="dark"] .checkout-form-section,
[data-theme="dark"] .filters-sidebar,
[data-theme="dark"] .contact-form-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .legal-content { background: var(--bg-card); }
[data-theme="dark"] .free-shipping-bar { background: var(--secondary-dark); }
[data-theme="dark"] .hero          { background: linear-gradient(135deg, #A84E15 0%, #D4611A 50%, #F07A3A 100%); }
[data-theme="dark"] .site-footer   { background: #0D0A18; }
[data-theme="dark"] .form-control,
[data-theme="dark"] .filter-group select,
[data-theme="dark"] .filter-group input { background: var(--bg-input); color: var(--text-body); border-color: var(--border-color); }
[data-theme="dark"] .category-card { background: var(--bg-card); }
[data-theme="dark"] .user-btn      { background: var(--gray-100); color: var(--text-body); }
[data-theme="dark"] .cart-btn      { background: var(--primary-pale); }
[data-theme="dark"] .cat-filter-btn{ background: var(--bg-card); color: var(--text-body); border-color: var(--border-color); }
[data-theme="dark"] .payment-simulation { background: var(--primary-pale); }
[data-theme="dark"] .maps-section  { filter: brightness(.85) saturate(.9); }
[data-theme="dark"] table          { color: var(--text-body); }
[data-theme="dark"] .cart-table td,
[data-theme="dark"] .cart-table th { border-color: var(--border-color); }

/* ── Bouton toggle thème ────────────────────────────────────── */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: var(--gray-100); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--primary-pale); border-color: var(--primary); transform: rotate(15deg); }
/* Affichage conditionnel des icônes */
[data-theme="dark"]  .theme-icon-light { display: none; }
[data-theme="dark"]  .theme-icon-dark  { display: inline; }
[data-theme="light"] .theme-icon-light { display: inline; }
[data-theme="light"] .theme-icon-dark  { display: none; }

/* ── Bouton Scroll-to-top ───────────────────────────────────── */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 800;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: none; cursor: pointer;
  font-size: 1.3rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(212,97,26,.4);
  opacity: 0; pointer-events: none;
  transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover   { background: var(--primary-dark); transform: translateY(-3px) !important; box-shadow: 0 8px 24px rgba(212,97,26,.5); }

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  font-size: 15px;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* ── Typographie ───────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Fredoka One', cursive; font-weight: 400; line-height: 1.2; color: var(--dark); }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p  { margin-bottom: .8rem; }

/* ── Conteneur ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 60px 0; }
.section-sm { padding: 36px 0; }

/* ── Boutons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer;
  font-size: .9rem; font-weight: 600; transition: var(--transition);
  text-decoration: none;
}
.btn-primary   { background: var(--primary);   color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.btn-secondary:hover { background: var(--secondary-dark); border-color: var(--secondary-dark); color: #fff; }
.btn-outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white     { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: var(--primary-pale); }
.btn-sm        { padding: 7px 16px; font-size: .82rem; }
.btn-lg        { padding: 14px 32px; font-size: 1rem; }
.btn-block     { width: 100%; justify-content: center; }
.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn:disabled  { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ── Flash messages ────────────────────────────────────────── */
.flash-messages { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.flash {
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  display: flex; align-items: center; gap: 10px;
  animation: slideIn .3s ease;
}
.flash-success { background: #d4edda; color: #155724; border-left: 4px solid var(--success); }
.flash-error   { background: #f8d7da; color: #721c24; border-left: 4px solid var(--danger); }
.flash-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--info); }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── HEADER ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(212,97,26,.12);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px; max-width: 1200px; margin: 0 auto; gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.35rem; color: var(--primary); white-space: nowrap;
  text-transform: uppercase;
}
.logo img { height: 52px; width: auto; }
.footer-brand .logo img { height: 52px; width: auto; }
.logo .logo-text > span { color: var(--secondary); }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; flex-wrap: nowrap; }
.main-nav a {
  padding: 7px 11px; border-radius: 20px;
  font-size: .85rem; font-weight: 500; color: var(--gray-700);
  transition: var(--transition); white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { background: var(--primary-pale); color: var(--primary); }
.main-nav .nav-pro {
  background: var(--secondary); color: var(--white) !important;
  border-radius: 20px;
}
.main-nav .nav-pro:hover { background: var(--secondary-dark); color: #fff !important; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--primary-pale); color: var(--primary);
  padding: 8px 14px; border-radius: 20px; font-weight: 600; font-size: .88rem;
  border: none; cursor: pointer; position: relative; transition: var(--transition);
}
.cart-btn:hover { background: var(--primary); color: #fff; }
.cart-count {
  background: var(--primary); color: #fff;
  border-radius: 50%; width: 20px; height: 20px; font-size: .7rem;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.cart-btn:hover .cart-count { background: var(--white); color: var(--primary); }
.user-btn {
  background: var(--gray-100); color: var(--dark);
  padding: 8px 14px; border-radius: 20px; font-size: .88rem; font-weight: 500;
  transition: var(--transition); border: none; cursor: pointer;
}
.user-btn:hover { background: var(--secondary); color: var(--white); }

/* Mobile burger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--dark);
  margin: 5px 0; transition: var(--transition);
}

/* Éléments exclusivement mobile — cachés sur desktop */
.mobile-nav-sep  { display: none; }
.mobile-nav-user { display: none; }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #F5B07A 100%);
  color: var(--white); padding: 80px 20px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: '🍬🥤🍿🍫🍭🧃';
  position: absolute; top: -20px; left: 0; right: 0;
  font-size: 4rem; opacity: .08; letter-spacing: 20px;
  white-space: nowrap; overflow: hidden;
}
.hero h1 { font-size: 3rem; color: #fff; margin-bottom: 14px; text-shadow: 0 2px 12px rgba(0,0,0,.15); }
.hero p   { font-size: 1.1rem; max-width: 520px; margin: 0 auto 28px; opacity: .95; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.22);
  border-radius: 20px; padding: 4px 14px; font-size: .82rem;
  font-weight: 600; margin-bottom: 16px; backdrop-filter: blur(4px);
}

/* ── SECTIONS TITRE ────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { color: var(--dark); }
.section-header p   { color: var(--gray-500); max-width: 500px; margin: 8px auto 0; }
.section-title-line {
  width: 60px; height: 4px; background: var(--primary);
  border-radius: 2px; margin: 10px auto 0;
}

/* ── GRILLE PRODUITS ───────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

/* ── CARD PRODUIT ──────────────────────────────────────────── */
.product-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: var(--transition); display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-card-img {
  aspect-ratio: 1/1; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; overflow: hidden; position: relative;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.product-card-cat  { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); margin-bottom: 4px; }
.product-card-name { font-size: .95rem; font-weight: 600; color: var(--dark); margin-bottom: 8px; line-height: 1.3; }
.product-card-desc { font-size: .8rem; color: var(--gray-500); margin-bottom: 12px; line-height: 1.4; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.product-price      { font-family: 'Fredoka One', cursive; font-size: 1.25rem; color: var(--primary); }
.product-price-old  { font-size: .8rem; color: var(--gray-500); text-decoration: line-through; }
.product-price-promo { color: var(--danger); }

/* Badges */
.badge {
  position: absolute; top: 10px;
  padding: 3px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}
.badge-vedette { left: 10px; background: var(--warning); color: #5a3d00; }
.badge-promo   { right: 10px; background: var(--danger); color: #fff; }
.badge-rupture { right: 10px; background: var(--gray-500); color: #fff; }

/* ── CATÉGORIES GRID ───────────────────────────────────────── */
.categories-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.category-card {
  background: var(--white); border-radius: var(--radius); padding: 32px 20px;
  text-align: center; box-shadow: var(--shadow); transition: var(--transition);
  cursor: pointer; display: block; text-decoration: none;
  border: 2px solid transparent;
}
.category-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-hover);
  border-color: var(--primary); color: var(--dark);
}
.category-card .emoji { font-size: 3.2rem; margin-bottom: 12px; display: block; }
.category-card h3 { font-size: 1.1rem; color: var(--dark); margin-bottom: 4px; }
.category-card p  { font-size: .8rem; color: var(--gray-500); margin: 0; }

/* ── BOUTIQUE — FILTRES ────────────────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; }
.filters-sidebar {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); height: fit-content; position: sticky; top: 90px;
}
.filters-sidebar h3 { font-size: 1rem; margin-bottom: 16px; color: var(--dark); }
.filter-group { margin-bottom: 20px; }
.filter-group label { font-size: .85rem; font-weight: 500; color: var(--gray-700); }
.filter-group select, .filter-group input[type=text] {
  width: 100%; padding: 8px 12px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: .85rem; margin-top: 6px;
  background: var(--white); transition: var(--transition);
}
.filter-group select:focus, .filter-group input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(212,97,26,.1);
}
.cat-filter-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 9px 14px; margin-bottom: 6px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer; font-size: .87rem; transition: var(--transition);
}
.cat-filter-btn:hover  { border-color: var(--primary); color: var(--primary); }
.cat-filter-btn.active { background: var(--primary-pale); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.cat-count { background: var(--gray-200); border-radius: 10px; padding: 1px 7px; font-size: .75rem; }
.cat-filter-btn.active .cat-count { background: var(--primary); color: #fff; }

/* Variante bleue pour la boutique pro */
.cat-filter-btn-pro:hover  { border-color: var(--secondary); color: var(--secondary); }
.cat-filter-btn-pro.active { background: #e8f3ff; border-color: var(--secondary); color: var(--secondary); font-weight: 600; }
.cat-filter-btn-pro.active .cat-count { background: var(--secondary); color: #fff; }
[data-theme="dark"] .cat-filter-btn-pro { background: var(--bg-card); color: var(--text-body); border-color: var(--border-color); }

/* ── PAGE PRODUIT ──────────────────────────────────────────── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-img-main {
  aspect-ratio: 1/1; background: var(--gray-100); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem; overflow: hidden;
}
.product-img-main img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: 1.9rem; margin-bottom: 8px; }
.product-info .price-big {
  font-family: 'Fredoka One', cursive; font-size: 2.2rem; color: var(--primary); margin-bottom: 16px;
}
.product-info .price-big .old { font-size: 1.1rem; color: var(--gray-500); text-decoration: line-through; margin-left: 8px; }
.product-info .price-big .promo-tag {
  display: inline-block; background: var(--danger); color: #fff;
  font-size: .8rem; padding: 2px 10px; border-radius: 12px; margin-left: 8px; vertical-align: middle;
}
.stock-indicator { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin-bottom: 16px; }
.stock-dot { width: 10px; height: 10px; border-radius: 50%; }
.stock-ok   { background: var(--success); }
.stock-low  { background: var(--warning); }
.stock-none { background: var(--danger); }
.qty-selector { display: flex; align-items: center; gap: 0; margin-bottom: 16px; }
.qty-btn { width: 36px; height: 36px; border: 1.5px solid var(--gray-200); background: var(--white); cursor: pointer; font-size: 1.1rem; transition: var(--transition); }
.qty-btn:hover { background: var(--primary-pale); border-color: var(--primary); }
.qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-btn:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-input { width: 52px; height: 36px; border: 1.5px solid var(--gray-200); border-left: none; border-right: none; text-align: center; font-weight: 600; }
.qty-input:focus { outline: none; }

/* ── PANIER ─────────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 12px 16px; background: var(--gray-100); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-700); }
.cart-table td { padding: 16px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.cart-item-img  { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { display: flex; align-items: center; gap: 14px; }
.cart-summary {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); height: fit-content; position: sticky; top: 90px;
}
.cart-summary h3 { font-size: 1.15rem; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--gray-200); }
.summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: .9rem; }
.summary-row.total { font-size: 1.1rem; font-weight: 700; border-top: 2px solid var(--gray-200); padding-top: 14px; margin-top: 14px; color: var(--primary); }
.summary-row .livraison-gratuite { color: var(--success); font-size: .8rem; }
.cart-empty { text-align: center; padding: 80px 20px; }
.cart-empty .emoji { font-size: 5rem; margin-bottom: 20px; }

/* ── CHECKOUT ───────────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 30px; }
.checkout-form-section {
  background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.checkout-form-section h3 { font-size: 1.1rem; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.checkout-form-section h3 .step-num {
  width: 28px; height: 28px; background: var(--primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700;
}
.payment-simulation {
  background: var(--primary-pale); border: 2px dashed var(--primary);
  border-radius: var(--radius); padding: 24px; text-align: center; margin-top: 20px;
}
.payment-simulation .lock-icon { font-size: 2.5rem; margin-bottom: 12px; }

/* ── FORMULAIRES ────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--gray-700); margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: .9rem; background: var(--white);
  transition: var(--transition); color: var(--dark);
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212,97,26,.12);
}
.form-control.error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.form-check input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.form-check-label { font-size: .88rem; color: var(--gray-700); }

/* ── AUTH PAGES ─────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: linear-gradient(135deg, var(--primary-pale) 0%, var(--light) 60%); }
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(212,97,26,.15); padding: 40px;
  width: 100%; max-width: 440px;
}
.auth-card .logo { justify-content: center; font-size: 2rem; margin-bottom: 24px; }
.auth-card h2 { text-align: center; margin-bottom: 28px; font-size: 1.5rem; }
.auth-divider { text-align: center; margin: 20px 0; color: var(--gray-500); font-size: .85rem; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--gray-200); }
.auth-divider span { background: var(--white); padding: 0 14px; position: relative; }
.auth-links { text-align: center; margin-top: 20px; font-size: .87rem; }
.auth-links a { color: var(--primary); font-weight: 600; }

/* ── CONTACT ────────────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
.contact-info-card {
  background: var(--primary); color: #fff;
  border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow);
}
.contact-info-card h2 { color: #fff; font-size: 1.5rem; margin-bottom: 24px; }
.contact-info-item { display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
.contact-info-icon { font-size: 1.3rem; min-width: 24px; margin-top: 2px; }
.contact-info-item p { margin: 0; font-size: .9rem; opacity: .92; }
.contact-info-item strong { display: block; opacity: 1; font-size: .95rem; margin-bottom: 2px; }
.contact-form-card { background: var(--white); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }

/* ── PAGE BREADCRUMB ────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .83rem; color: var(--gray-500); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { color: var(--gray-200); }

/* ── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; padding: 48px 20px; text-align: center;
}
.page-header h1 { color: #fff; font-size: 2.2rem; }
.page-header p   { opacity: .9; margin: 8px 0 0; font-size: 1rem; }

/* ── BADGES STATUT COMMANDE ─────────────────────────────────── */
.statut-badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.statut-en_attente   { background: #fff3cd; color: #856404; }
.statut-confirmee    { background: #d1ecf1; color: #0c5460; }
.statut-en_preparation { background: #e2d9f3; color: #5a3d9a; }
.statut-expediee     { background: #d4edda; color: #155724; }
.statut-livree       { background: #d4edda; color: #155724; }
.statut-annulee      { background: #f8d7da; color: #721c24; }

/* ── PRO BADGE ──────────────────────────────────────────────── */
.pro-header { background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); }
.pro-header h1, .pro-header p { color: #fff !important; }
.pro-badge { display: inline-block; background: var(--secondary); color: #fff; padding: 2px 10px; border-radius: 12px; font-size: .72rem; font-weight: 700; text-transform: uppercase; margin-left: 8px; }
.pro-price-tag { background: var(--secondary); color: #fff; }
.lot-info { background: var(--gray-100); border-radius: var(--radius-sm); padding: 8px 12px; font-size: .82rem; color: var(--gray-700); margin-top: 8px; }

/* ── CONFIRMATION COMMANDE ──────────────────────────────────── */
.confirmation-card { max-width: 600px; margin: 60px auto; background: var(--white); border-radius: var(--radius); padding: 48px; text-align: center; box-shadow: var(--shadow); }
.confirmation-icon { font-size: 5rem; margin-bottom: 20px; }
.order-id { font-size: .9rem; color: var(--gray-500); margin-bottom: 24px; }
.order-id span { color: var(--primary); font-weight: 700; font-size: 1.1rem; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark); color: rgba(255,255,255,.75);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding: 0 20px 40px; max-width: 1200px; margin: 0 auto;
}
.footer-brand .logo { color: var(--primary-light); font-size: 1.5rem; margin-bottom: 14px; }
.footer-brand p  { font-size: .85rem; line-height: 1.6; }
.footer-col h4   { color: var(--primary-light); font-family: 'Fredoka One', cursive; font-size: 1rem; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.65); font-size: .85rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary-light); padding-left: 4px; }
.footer-contact p { font-size: .85rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.footer-contact p span { opacity: .8; }

.social-links { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.social-link {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); color: #fff; font-size: .95rem;
  transition: var(--transition); text-decoration: none;
}
.social-link:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.social-link:hover svg { fill: #fff; }
.social-link svg { width: 18px; height: 18px; fill: rgba(255,255,255,.85); transition: fill .25s; }
.social-link.instagram:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-link.facebook  { }
.social-link.tiktok    { }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 20px; text-align: center; font-size: .8rem;
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--primary-light); }

/* ── MENTIONS LÉGALES / CGV ─────────────────────────────────── */
.legal-content { max-width: 860px; margin: 0 auto; background: var(--white); border-radius: var(--radius); padding: 48px; box-shadow: var(--shadow); }
.legal-content h2 { font-size: 1.3rem; color: var(--primary); margin: 32px 0 12px; }
.legal-content h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.legal-content p, .legal-content li { font-size: .9rem; line-height: 1.8; }
.legal-content ul { padding-left: 20px; margin-bottom: 14px; }
.legal-content ul li { list-style: disc; }

/* ── ALERTES ────────────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .88rem; margin-bottom: 18px; line-height: 1.55; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-left: 4px solid var(--info); }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--success); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid var(--warning); }
.alert-danger  { background: #f8d7da; color: #721c24; border-left: 4px solid var(--danger); }

/* ── LIVRAISON GRATUITE BANNER ──────────────────────────────── */
.free-shipping-bar {
  background: var(--secondary); color: #fff; text-align: center;
  padding: 8px 20px; font-size: .85rem; font-weight: 500;
}
.free-shipping-bar strong { color: var(--primary-light); }

/* ── MISC ────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--gray-500); font-size: .85rem; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.gap-8 { gap: 8px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; background: var(--primary-pale); color: var(--primary); }

/* ── PAGINATION ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); color: var(--gray-700); font-size: .88rem; text-decoration: none; transition: var(--transition); background: var(--white); }
.page-btn:hover { background: var(--primary-pale); border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.page-dots { color: var(--gray-500); padding: 0 4px; }

/* ── AVIS CLIENTS ───────────────────────────────────────────── */
.reviews-section { margin-top: 56px; border-top: 2px solid var(--gray-200); padding-top: 40px; }
.reviews-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.reviews-global { display: flex; align-items: center; gap: 14px; }
.reviews-score { font-size: 2.4rem; font-weight: 700; color: var(--primary); font-family: 'Fredoka One', cursive; }
.stars-display { display: inline-flex; gap: 2px; font-size: 1.1rem; }
.star-filled { color: #F0A500; }
.star-empty  { color: #ddd; }
.reviews-list { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.review-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-avatar { width: 38px; height: 38px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.review-date { margin-left: auto; font-size: .75rem; color: var(--gray-500); }
.review-text { font-size: .9rem; color: var(--gray-700); line-height: 1.6; margin: 0; }
.reviews-empty { text-align: center; padding: 32px; background: var(--gray-100); border-radius: var(--radius); color: var(--gray-500); }
.review-form-card { background: var(--light); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; border: 1px solid var(--gray-200); }
.review-form-card h3 { font-size: 1rem; margin-bottom: 16px; }

/* Stars input */
.stars-input { display: flex; flex-direction: row-reverse; gap: 4px; width: fit-content; }
.stars-input input[type="radio"] { display: none; }
.stars-input label { font-size: 1.8rem; color: #ddd; cursor: pointer; transition: color .15s; }
.stars-input input[type="radio"]:checked ~ label,
.stars-input label:hover,
.stars-input label:hover ~ label { color: #F0A500; }

/* ── FAVORIS ────────────────────────────────────────────────── */
.fav-btn { background: none; border: 2px solid var(--gray-200); border-radius: 50%; width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: var(--transition); flex-shrink: 0; }
.fav-btn:hover, .fav-btn.active { border-color: #e91e63; background: #fff0f5; }
.fav-btn .fav-icon { line-height: 1; }

/* Favoris sur product-card */
.product-card-fav { position: absolute; top: 8px; right: 8px; z-index: 2; }
.product-card-fav form button { background: rgba(255,255,255,.9); border: none; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .9rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); transition: var(--transition); }
.product-card-fav form button:hover { background: #fff0f5; transform: scale(1.1); }

/* ── CODE PROMO ─────────────────────────────────────────────── */
.promo-input-wrap { margin: 12px 0; }
.promo-input { border: 1px dashed var(--primary) !important; background: var(--primary-pale) !important; font-size: .85rem !important; }
.promo-applied { display: flex; align-items: center; justify-content: space-between; background: #d4edda; border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0; border: 1px solid #c3e6cb; }
.promo-tag-active { background: var(--success); color: #fff; padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 700; }

/* ── CART BADGE ANIMATION ───────────────────────────────────── */
@keyframes cartPop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.cart-count.pop { animation: cartPop .3s ease; }

/* ── ADMIN CONFIG TOGGLE ────────────────────────────────────── */
.toggle-switch { display: inline-flex; align-items: center; cursor: pointer; }
.toggle-switch input { display: none; }
.toggle-slider { width: 44px; height: 24px; background: var(--gray-200); border-radius: 12px; position: relative; transition: background .25s; }
.toggle-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .25s; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(20px); }

/* ── ADMIN STATUS BADGES ────────────────────────────────────── */
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.status-active   { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }
.status-pending  { background: #fff3cd; color: #856404; }

/* ── ADMIN FORM ─────────────────────────────────────────────── */
.form-row-admin { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 16px; }
.form-group-admin { display: flex; flex-direction: column; }
.form-label-admin { font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.panel-body { padding: 20px 24px; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .contact-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2rem; }

  /* ── Header mobile ── */
  .header-inner { padding: 6px 12px; gap: 8px; }
  .logo { font-size: 1rem; gap: 6px; position: relative; z-index: 999; }
  .logo img { height: 40px; }
  /* Le nav est un enfant du header (même stacking context) — les éléments du header
     doivent avoir un z-index supérieur à celui du nav (998) pour rester visibles */
  .header-actions { gap: 6px; position: relative; z-index: 999; }
  .theme-toggle { width: 34px; height: 34px; font-size: .9rem; }
  .cart-btn { padding: 7px 10px; font-size: .82rem; }
  .user-btn { padding: 7px 10px; font-size: .82rem; }

  /* Boutons secondaires cachés sur mobile — accessibles via le menu hamburger */
  .hide-mobile { display: none !important; }

  /* ── Nav mobile ── */
  .main-nav {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--white); flex-direction: column;
    padding: 72px 20px 32px; overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,.18); z-index: 998;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 16px; border-radius: var(--radius-sm); font-size: .95rem; }
  .nav-toggle { display: block; }

  /* Afficher les éléments mobile-only dans le nav quand mobile */
  .mobile-nav-sep {
    display: block; border: none; border-top: 1px solid var(--border-color);
    margin: 12px 0 8px; width: 100%;
  }
  .mobile-nav-user {
    display: flex; align-items: center; gap: 8px;
    color: var(--gray-700) !important; padding: 11px 16px;
    border-radius: var(--radius-sm); font-size: .95rem; font-weight: 500;
    transition: var(--transition);
  }
  .mobile-nav-user:hover { background: var(--primary-pale); color: var(--primary) !important; }
  .mobile-nav-register {
    background: var(--primary) !important; color: #fff !important;
    text-align: center; margin-top: 4px; font-weight: 600 !important;
    justify-content: center;
  }
  .mobile-nav-register:hover { background: var(--primary-dark) !important; color: #fff !important; }
  .mobile-nav-logout { color: var(--danger) !important; }
  .mobile-nav-logout:hover { background: #fff0f0 !important; color: var(--danger) !important; }

  /* ── Reste ── */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 56px 16px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .auth-card { padding: 28px 18px; }
  .legal-content { padding: 28px 18px; }
  .confirmation-card { padding: 32px 18px; margin: 30px 12px; }
  .section { padding: 44px 0; }
  .section-sm { padding: 28px 0; }
  .free-shipping-bar { font-size: .78rem; padding: 7px 12px; }
  .product-card-body { padding: 10px 12px; }
  .product-card-name { font-size: .88rem; }
  .product-price { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .logo { font-size: .85rem; }
  .logo img { height: 36px; }
  /* Sur petits téléphones, cacher user-btn (accessible via menu hamburger) */
  .user-btn { display: none !important; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .category-card { padding: 22px 12px; }
  .category-card .emoji { font-size: 2.4rem; }
  .cart-table th:nth-child(3), .cart-table td:nth-child(3) { display: none; }
  .cart-item-info { gap: 8px; }
  .cart-item-img { width: 52px; height: 52px; font-size: 1.5rem; }
  .checkout-form-section { padding: 18px 14px; }
  .contact-info-card { padding: 24px 16px; }
  .contact-form-card { padding: 24px 16px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: .92rem; }
  .page-header { padding: 32px 16px; }
  .page-header h1 { font-size: 1.7rem; }
  .breadcrumb { font-size: .78rem; }
  [data-theme="dark"] .main-nav { background: var(--bg-card); }
}

/* Dark mode mobile nav */
[data-theme="dark"] .main-nav { background: var(--bg-card); }
[data-theme="dark"] .mobile-nav-sep { border-color: var(--border-color); }

/* ── Galerie images produit ─────────────────────────────────── */
.gallery-thumb {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; transition: border-color .2s, opacity .2s;
  opacity: .7;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); opacity: 1; }

/* ── BRANDS MARQUEE ─────────────────────────────────────────── */
.brands-marquee {
  overflow: hidden; width: 100%;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.brands-track {
  display: flex; gap: 14px; align-items: center;
  animation: marqueeScroll 42s linear infinite;
  width: max-content;
}
.brands-marquee:hover .brands-track { animation-play-state: paused; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 24px;
  background: var(--white); border: 2px solid var(--gray-200);
  white-space: nowrap; flex-shrink: 0;
  transition: border-color .25s, box-shadow .25s;
  cursor: default;
}
.brand-chip:hover {
  border-color: var(--brand-color, var(--primary));
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.brand-emoji { font-size: 1.2rem; line-height: 1; }
.brand-name  { font-size: .82rem; font-weight: 600; color: var(--gray-700); }
[data-theme="dark"] .brand-chip { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .brand-name { color: var(--text-body); }
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
