/* ══ CSS STYLES FOR SHOP (NF SERVICES) ══ */
:root {
  --page-max: 1340px; --detail-max: 1160px;
  /* ── Densité du carrousel de produits de la page d'accueil (seule page concernée) ──
     Colonnes = ⌊(L + g) / (150 + g)⌋, plafonné à 8, où L = largeur utile (écran moins 2 × 20 px
     de marges, 1300 px au maximum) et g = espace entre cartes. Une carte ne descend ainsi
     jamais sous ~150 px, largeur minimale pour garder lisibles le nom (2 lignes), le prix et
     les boutons. Téléphone (moins de 600 px) : 2 colonnes, texte réduit proportionnellement. */
  --cols: 2; --grid-gap: 10px;
}
@media (min-width: 600px)  { :root { --cols: 3; --grid-gap: 12px; } }
@media (min-width: 768px)  { :root { --cols: 4; } }
@media (min-width: 900px)  { :root { --cols: 5; } }
@media (min-width: 1024px) { :root { --cols: 6; } }
@media (min-width: 1180px) { :root { --cols: 7; } }
@media (min-width: 1340px) { :root { --cols: 8; } }
:root {
  --primary:       #1a7a4a;
  --primary-dark:  #145c38;
  --primary-light: #e8f5ee;
  --accent:        #f59c1a;
  --accent-light:  #fef3dc;
  --text:          #111827;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f3f4f6;
  --white:         #ffffff;
  --danger:        #dc2626;
  --success:       #16a34a;
  --radius:        14px;
  --radius-sm:     9px;
  --shadow:        0 2px 10px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 28px rgba(0,0,0,0.13);
  --header-h:      68px;
  --footer-h:      60px;
  /* Personnalisables depuis le panneau admin (Design) — repli automatique
     sur --primary tant qu'aucune couleur distincte n'est définie. */
  /* --btn-override / --icon-override ne sont volontairement PAS déclarées ici :
     une déclaration vide (« --x: ; ») est une valeur valide mais vide, qui
     empêche le repli sur --primary et rendait les boutons (panier, valider la
     commande…) transparents quand aucune couleur n'est choisie dans l'admin.
     Elles ne sont définies par applySiteSettings() que si l'admin en choisit une. */
  --btn-color:     var(--btn-override, var(--primary));
  --icon-color:    var(--icon-override, var(--primary));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
  overflow-x: hidden;
  max-width: 100vw;
}
a { color: inherit; text-decoration: none; }

/* ══ HEADER — fixe, une seule ligne ══ */
.header-top {
  max-width: var(--page-max, 1340px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}
.shop-header {
  background: var(--hdr-bg, var(--white)); border-bottom: 1px solid var(--hdr-line, var(--border));
  position: fixed; top: 0; left: 0; right: 0; width: 100%;
  z-index: 100; box-shadow: var(--shadow);
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); padding: 0 20px; gap: 14px;
}
/* Zone du nom : prend la place restante à gauche des boutons (qui, eux, ne
   rétrécissent jamais). Un nom trop long ne peut donc plus repousser le
   panier hors de l'écran : sa police est réduite par fitShopName() (JS) puis,
   en dernier recours, le texte est tronqué avec « … ».
   Couleur : variable définie depuis Admin → Design ; version dédiée en mode sombre. */
.header-logo {
  font-size: 22px; font-weight: 800; color: var(--shop-name-color, var(--primary));
  letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px;
  flex: 0 1 auto; min-width: 0; white-space: nowrap;
}
body.dark-mode .header-logo { color: var(--shop-name-color-dark, var(--primary)); }
.header-logo svg { width: 28px; height: 28px; flex-shrink: 0; }
.logo-img { height: 30px; max-width: 120px; object-fit: contain; flex-shrink: 0; }
.logo-text { display: block; min-width: 0; }
.logo-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-sub { font-size: 11px; font-weight: 500; color: var(--hdr-muted, var(--text-muted)); display: block; line-height: 1; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Boutons icône+texte de l'en-tête et du pied de page : texte visible sur
   grand écran, icône seule dès que la largeur ne permet plus de tout afficher
   proprement sur une seule ligne (voir media query plus bas). */
.icon-btn {
  height: 42px; padding: 0 16px; border-radius: 30px;
  border: 1.5px solid var(--hdr-blk-line, var(--border)); background: var(--hdr-blk-bg, var(--white));
  display: flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; transition: all .2s; color: var(--hdr-blk-fg, var(--text)); white-space: nowrap;
}
.icon-btn:hover { border-color: var(--primary); color: var(--hdr-blk-fg, var(--primary)); background: var(--hdr-blk-hover, var(--hdr-blk-bg, var(--white))); }
.icon-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.btn-label { font-size: 13px; font-weight: 700; }

.cart-btn {
  position: relative; background: var(--btn-color); color: #fff;
  border: none; border-radius: 30px; height: 42px; padding: 0 18px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background .2s, transform .1s; white-space: nowrap;
}
.cart-btn:hover { background: var(--primary-dark); }
.cart-btn:active { transform: scale(0.97); }
.cart-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.cart-count {
  background: var(--accent); color: var(--white);
  border-radius: 50%; width: 20px; height: 20px;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Écran réduit : icône seule (le texte disparaît, les boutons deviennent
   des cercles), pour garantir que l'en-tête tienne sur une seule ligne.
   Seuil volontairement généreux (640px) : avec le logo + 3 boutons texte,
   ça déborde bien avant les 480px habituels. */
@media (max-width: 640px) {
  .icon-btn, .cart-btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; }
  .icon-btn .btn-label, .cart-btn .btn-label { display: none; }
  .logo-sub { display: none; }
  .logo-img { max-width: 64px; }
  /* Le nom peut passer sur 2 lignes (police réduite par fitShopName()) avant
     d'être tronqué : plus lisible qu'un nom coupé net sur une seule ligne. */
  .logo-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    white-space: normal; line-height: 1.12; overflow-wrap: anywhere;
  }
  /* Posé par fitShopName() quand le nom tient sur une seule ligne (police réduite) */
  .logo-name.one-line { display: block; white-space: nowrap; -webkit-line-clamp: unset; }
}
/* Très petits écrans : marges et boutons un peu resserrés pour laisser plus
   de place au nom, sans jamais sortir les icônes de l'écran. */
@media (max-width: 400px) {
  .header-top { padding: 0 12px; gap: 8px; }
  .header-actions { gap: 6px; }
  .icon-btn, .cart-btn { width: 38px; height: 38px; }
  .header-logo { gap: 7px; }
  .header-logo svg { width: 24px; height: 24px; }
}

/* ══ BANNIÈRES — superposées sous l'en-tête fixe, ne modifient jamais sa hauteur ══ */
.pending-banner {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; width: 100%;
  background: var(--accent-light); border-bottom: 1px solid #f0c06a; box-shadow: var(--shadow);
  padding: 10px 20px; font-size: 13px; color: #7a4f0a; align-items: center; gap: 10px; z-index: 90;
}
.pending-banner.show { display: flex; }
.pending-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.pending-banner a { color: #7a4f0a; font-weight: 700; text-decoration: underline; cursor: pointer; }

.confirmed-banner {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; width: 100%;
  background: var(--primary-light); border-bottom: 1px solid #a7d9bb; box-shadow: var(--shadow);
  padding: 10px 20px; font-size: 13px; color: var(--primary-dark); align-items: center; gap: 10px; z-index: 90;
}
.confirmed-banner.show { display: flex; }
.refused-banner {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; width: 100%;
  background: #fef2f2; border-bottom: 1px solid #fecaca; box-shadow: var(--shadow);
  padding: 10px 20px; font-size: 13px; color: #991b1b; align-items: center; gap: 10px; z-index: 90;
}
.refused-banner.show { display: flex; }
.refused-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.refused-banner a { color: #991b1b; font-weight: 700; text-decoration: underline; cursor: pointer; }
.confirmed-banner svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ══ FILTRES ══ */
.filter-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 10px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.filter-label { font-size: 13px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.filter-group { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.filter-group select, .filter-group input[type="number"] {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; background: var(--bg); color: var(--text); outline: none; transition: border-color .2s;
}
.filter-group select:focus, .filter-group input[type="number"]:focus { border-color: var(--primary); background: var(--white); }
.filter-group input[type="number"] { width: 100px; }
.filter-reset {
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.filter-reset:hover { border-color: var(--danger); color: var(--danger); }

/* ══ GRILLE PRODUITS ══ */
.results-info { padding: 14px 20px 4px; font-size: 13px; color: var(--text-muted); font-weight: 500; }
/* Grilles des pages catégorie / catalogue / recherche / favoris : colonnes automatiques, jamais plus
   étroites que 280 px → 1 colonne sur téléphone, 2 tablette, 3 portable, 4 grand écran (maximum). */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 20px; padding: 14px 20px; }

.product-card {
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; transition: transform .22s, box-shadow .22s; display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: var(--bg); position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; display: block; }
.product-card:hover .product-img img { transform: scale(1.06); }
.img-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--border); }
.img-placeholder svg { width: 48px; height: 48px; }

.product-label {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 6px; font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.4px; color: var(--white);
}
.product-label.nouveaute { background: #2563eb; }
.product-label.promo     { background: var(--danger); }
.product-label.populaire { background: var(--accent); }

.product-discount {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--danger); color: var(--white);
  padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 800;
}

.favorite-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .2s; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.favorite-btn svg { width: 17px; height: 17px; color: var(--text-muted); transition: all .2s; }
.favorite-btn:hover svg { color: var(--danger); }
.favorite-btn.active svg { color: var(--danger); fill: var(--danger); }
.favorite-btn:active { transform: scale(0.85); }

.product-body { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--primary); margin-bottom: 4px; }
.product-name {
  font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4; overflow-wrap: break-word; word-break: break-word;
  height: calc(2 * 1.4em);
  cursor: pointer;
}
.product-name:hover { color: var(--primary); }

.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: nowrap; overflow: hidden; }
.product-price { font-size: 17px; font-weight: 800; color: var(--primary); white-space: nowrap; }
.product-old-price { font-size: 13px; color: var(--text-muted); text-decoration: line-through; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stock-info {
  font-size: 11.5px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stock-info.in-stock { color: var(--success); }
.stock-info.low-stock { color: var(--accent); }
.stock-info.out-stock { color: var(--danger); }
.stock-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.add-to-cart {
  width: 100%; padding: 10px; background: var(--primary); color: var(--white);
  border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, transform .1s;
}
.add-to-cart:hover { background: var(--primary-dark); }
.add-to-cart:active { transform: scale(0.97); }
.add-to-cart svg { width: 16px; height: 16px; }
.add-to-cart:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

.buy-now-btn {
  width: 100%; padding: 10px; background: var(--accent); color: var(--white);
  border: none; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .2s, transform .1s; margin-top: 7px;
}
.buy-now-btn:hover  { background: #d4860e; }
.buy-now-btn:active { transform: scale(0.97); }
.buy-now-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.buy-now-btn svg { width: 16px; height: 16px; }

/* ══ PAGINATION ══ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 24px 20px; }
.page-btn {
  min-width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--white); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .2s; padding: 0 8px;
}
.page-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }
.page-btn:hover:not(.active):not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ══ OVERLAYS / MODALS ══ */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 200; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px);
}
.overlay.open { display: flex; }
@media (min-width: 600px) { .overlay { align-items: center; } }
.modal { background: var(--white); border-radius: var(--radius) var(--radius) 0 0; width: 100%; max-width: 500px; max-height: 92vh; overflow-y: auto; animation: slideUp .3s ease; }
@media (min-width: 600px) { .modal { border-radius: var(--radius); max-height: 88vh; } }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white); z-index: 1; }
.modal-title { font-size: 18px; font-weight: 800; }
.modal-close { width: 34px; height: 34px; border: none; background: var(--bg); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: background .2s; }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 16px 22px; }

/* ══ PANIER ══ */
.cart-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.cart-empty svg { width: 72px; height: 72px; margin-bottom: 14px; opacity: .25; }
.cart-empty p { font-size: 16px; font-weight: 500; }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 14px; color: var(--primary); font-weight: 700; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn { width: 30px; height: 30px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 300; line-height: 1; transition: all .2s; }
.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-val { font-size: 15px; font-weight: 700; min-width: 28px; text-align: center; }
.remove-item { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; transition: color .2s; border-radius: 6px; }
.remove-item:hover { color: var(--danger); background: #fee2e2; }
.remove-item svg { width: 18px; height: 18px; display: block; }
.cart-footer { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--border); padding: 18px 22px; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total-label { font-size: 15px; color: var(--text-muted); font-weight: 500; }
.cart-total-amount { font-size: 22px; font-weight: 800; color: var(--primary); }
.checkout-btn { width: 100%; padding: 16px; background: #25D366; color: var(--white); border: none; border-radius: var(--radius-sm); font-size: 16px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .2s, transform .1s; }
.checkout-btn:hover { background: #1ebe5a; }
.checkout-btn:active { transform: scale(0.98); }
.checkout-btn svg { width: 22px; height: 22px; }

/* ══ DIALOG CONFIRMATION ══ */
.dialog { background: var(--white); border-radius: var(--radius); width: calc(100% - 32px); max-width: 400px; padding: 28px 24px; text-align: center; animation: popIn .25s ease; }
@keyframes popIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dialog-icon { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; background: #e7f9ef; }
.dialog-icon svg { width: 30px; height: 30px; }
.dialog h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.dialog p { font-size: 14px; color: var(--text-muted); margin-bottom: 22px; line-height: 1.7; }
.dialog-order-info { background: var(--primary-light); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 22px; text-align: left; border: 1px solid #c3e6d3; }
.dialog-order-info .row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.dialog-order-info .row span:first-child { color: var(--text-muted); }
.dialog-order-info .row span:last-child { font-weight: 700; color: var(--text); }
.dialog-actions { display: flex; gap: 10px; }
.btn-cancel { flex: 1; padding: 13px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--text-muted); font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s; }
.btn-cancel:hover { border-color: var(--text-muted); color: var(--text); }
.btn-whatsapp { flex: 2; padding: 13px; background: #25D366; color: var(--white); border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s; }
.btn-whatsapp:hover { background: #1ebe5a; }
.btn-whatsapp:disabled { opacity: .6; cursor: not-allowed; }
.btn-whatsapp svg { width: 18px; height: 18px; }

/* ══ TOAST ══ */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(90px); background: #111827; color: var(--white); padding: 11px 22px; border-radius: 30px; font-size: 14px; font-weight: 600; z-index: 500; transition: transform .3s ease; white-space: nowrap; box-shadow: var(--shadow-lg); }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ══ EMPTY / LOADING ══ */
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-muted); grid-column: 1/-1; }
.empty-state svg { width: 80px; height: 80px; opacity: .2; margin-bottom: 18px; }
.empty-state p { font-size: 16px; font-weight: 500; }
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; color: var(--text-muted); gap: 14px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ FOOTER — fixe, une seule ligne ══ */
.shop-footer {
  background: var(--ftr-bg, var(--white)); border-top: 1px solid var(--ftr-line, var(--border));
  position: fixed; bottom: 0; left: 0; right: 0; width: 100%;
  z-index: 100; box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}

.footer-actions {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; min-height: var(--footer-h); padding: 0 16px; flex-wrap: nowrap;
  max-width: var(--page-max, 1340px); margin: 0 auto; overflow-x: auto; scrollbar-width: none;
}
.footer-actions::-webkit-scrollbar { display: none; }

.footer-btn {
  display: flex; flex-direction: row; align-items: center; gap: 7px; flex-shrink: 0;
  height: 40px; padding: 0 16px; border-radius: 30px; border: 1.5px solid var(--ftr-blk-line, var(--border));
  background: var(--ftr-blk-bg, var(--bg)); cursor: pointer; transition: all .2s;
  font-family: inherit; color: var(--ftr-blk-fg, var(--text)); white-space: nowrap;
}
.footer-btn:hover { border-color: var(--primary); background: var(--ftr-blk-hover, var(--primary-light)); color: var(--ftr-blk-fg, var(--primary)); }
.footer-btn svg  { width: 19px; height: 19px; flex-shrink: 0; }
.footer-btn span { font-size: 13px; font-weight: 700; }

.footer-btn.dark-active { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.footer-btn.dark-active:hover { background: #334155; }

/* Écran réduit : mêmes règles que l'en-tête — icône seule. Seuil plus large
   qu'en en-tête (700px) : 4 boutons texte débordent encore plus vite que
   les 3 de l'en-tête. */
@media (max-width: 700px) {
  .footer-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; }
  .footer-btn span { display: none; }
}

/* ══ POPUPS FOOTER ══ */
.footer-popup-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 300;
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px);
}
.footer-popup-overlay.open { display: flex; }
@media (min-width: 600px) { .footer-popup-overlay { align-items: center; } }

.footer-popup {
  background: var(--white); border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto;
  animation: slideUp .3s ease;
}
@media (min-width: 600px) { .footer-popup { border-radius: var(--radius); } }

.popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.popup-header h3 { font-size: 16px; font-weight: 800; }
.popup-close {
  width: 32px; height: 32px; border: none; background: var(--bg);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); transition: background .2s;
}
.popup-close:hover { background: var(--border); }
.popup-close svg   { width: 16px; height: 16px; }
.popup-body { padding: 16px 20px 24px; }

.popup-option {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg);
  cursor: pointer; margin-bottom: 10px; transition: all .2s;
  text-decoration: none; color: var(--text); width: 100%;
  font-family: inherit; font-size: 14px; font-weight: 600;
}
.popup-option:hover    { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.popup-option:last-child { margin-bottom: 0; }
.popup-option-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.popup-option-icon svg { width: 22px; height: 22px; }
.popup-option-info { flex: 1; text-align: left; }
.popup-option-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.popup-option-sub   { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* ── Accordéon Catégories (popup pied de page) ──
   Sous-catégories repliées par défaut, dépliées au clic — reste lisible
   même avec beaucoup de catégories/sous-catégories. Un seul panneau
   ouvert à la fois. */
.popup-cat-item { border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.popup-cat-item:last-child { margin-bottom: 0; }
.popup-cat-header {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; background: var(--white); border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--text); transition: background .2s;
}
.popup-cat-header:hover { background: var(--bg); }
.popup-cat-icon { width: 19px; height: 19px; color: var(--icon-color); flex-shrink: 0; }
.popup-cat-name { flex: 1; text-align: left; }
.popup-cat-chevron { width: 16px; height: 16px; flex-shrink: 0; transition: transform .2s; color: var(--text-muted); }
.popup-cat-chevron.open { transform: rotate(180deg); color: var(--primary); }

.popup-cat-panel {
  max-height: 0; overflow: hidden; transition: max-height .25s ease;
  padding: 0 10px; background: var(--bg);
}
.popup-cat-panel.open { max-height: min(60vh, 600px); overflow-y: auto; padding: 10px; }
.popup-cat-panel .popup-option { margin-bottom: 6px; }
.popup-cat-panel .popup-option:last-child { margin-bottom: 0; }

/* Couleurs icônes popup */
.icon-wa   { background: #e7f9ef; color: #25D366; }
.icon-fb   { background: #dbeafe; color: #1877F2; }
.icon-mail { background: #f3f4f6; color: #6b7280; }
.icon-copy { background: var(--primary-light); color: var(--primary); }
.icon-visa { background: #eff6ff; color: #1d4ed8; }
.icon-om   { background: #fef3dc; color: #f59c1a; }
.icon-momo { background: #fef3dc; color: #f59c1a; }
.icon-cash { background: #dcfce7; color: #16a34a; }

/* Modes d'affichage (dark mode) */
.dark-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dark-opt {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); background: var(--bg);
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.dark-opt:hover   { border-color: var(--primary); }
.dark-opt.selected { border-color: var(--primary); background: var(--primary-light); }
.dark-opt svg     { width: 28px; height: 28px; }
.dark-opt span    { font-size: 13px; font-weight: 700; color: var(--text); }
.dark-opt small   { font-size: 11px; color: var(--text-muted); text-align: center; }

/* ══ MODE SOMBRE ══ */
body.dark-mode {
  --primary:       #34d399;
  --primary-dark:  #10b981;
  --primary-light: #064e3b;
  --text:          #f1f5f9;
  --text-muted:    #94a3b8;
  --border:        #334155;
  --bg:            #0f172a;
  --white:         #1e293b;
  --danger:        #f87171;
  --success:       #34d399;
  --accent:        #fbbf24;
  --accent-light:  #451a03;
}
body.dark-mode .shop-header    { box-shadow: 0 2px 10px rgba(0,0,0,.4); }
body.dark-mode .footer-popup   { background: #1e293b; }
body.dark-mode .popup-header   { background: #1e293b; }
body.dark-mode .popup-option   { background: #0f172a; border-color: #334155; color: #f1f5f9; }
body.dark-mode .popup-option:hover { background: #064e3b; border-color: #34d399; color: #34d399; }
body.dark-mode .dark-opt       { background: #0f172a; border-color: #334155; }
body.dark-mode .dark-opt span  { color: #f1f5f9; }
body.dark-mode img             { filter: brightness(.92); }

/* ══ FICHE PRODUIT ══ */
.product-detail {
  max-width: var(--detail-max, 1160px); margin: 0 auto; padding: 20px;
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
@media (min-width: 760px) { .product-detail { grid-template-columns: 1fr 1fr; } }

.detail-gallery { position: relative; }
.detail-main-img {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius);
  overflow: hidden; background: var(--bg); border: 1px solid var(--border); position: relative;
}
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { display: flex; flex-direction: column; }
.detail-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--primary); margin-bottom: 8px; }
.detail-name { font-size: 24px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }

.detail-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-price { font-size: 30px; font-weight: 800; color: var(--primary); }
.detail-old-price { font-size: 18px; color: var(--text-muted); text-decoration: line-through; }
.detail-discount-badge { background: var(--danger); color: var(--white); padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 800; }

.detail-stock { font-size: 14px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 6px; }
.detail-stock.in-stock { color: var(--success); }
.detail-stock.low-stock { color: var(--accent); }
.detail-stock.out-stock { color: var(--danger); }

.detail-description { font-size: 14px; color: var(--text-muted); line-height: 1.8; margin-bottom: 24px; }
.detail-description h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

.detail-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.detail-action-row { display: flex; gap: 10px; }
.detail-action-row .detail-add-btn,
.detail-action-row .detail-buy-btn { flex: 1; }

.detail-add-btn {
  flex: 1; padding: 15px; background: var(--btn-color); color: #fff; border: none;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s, transform .1s;
}
.detail-add-btn:hover { background: var(--primary-dark); }
.detail-add-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.detail-add-btn svg { width: 19px; height: 19px; }

.detail-buy-btn {
  flex: 1; padding: 15px; background: var(--accent); color: var(--white); border: none;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s, transform .1s;
}
.detail-buy-btn:hover  { background: #d4860e; }
.detail-buy-btn:active { transform: scale(0.98); }
.detail-buy-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }
.detail-buy-btn svg { width: 19px; height: 19px; }

.detail-fav-btn {
  width: 54px; height: 54px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.detail-fav-btn svg { width: 22px; height: 22px; color: var(--text-muted); transition: all .2s; }
.detail-fav-btn:hover { border-color: var(--danger); }
.detail-fav-btn:hover svg { color: var(--danger); }
.detail-fav-btn.active { border-color: var(--danger); background: #fee2e2; }
.detail-fav-btn.active svg { color: var(--danger); fill: var(--danger); }

.detail-label { display: inline-block; padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--white); margin-bottom: 14px; width: fit-content; }
.detail-label.nouveaute { background: #2563eb; }
.detail-label.promo     { background: var(--danger); }
.detail-label.populaire { background: var(--accent); }

/* ══ VITRINE CATÉGORIES (page d'accueil) — carrousel circulaire ══ */
.cat-showcase { max-width: var(--page-max, 1340px); margin: 26px auto 0; padding: 0 20px; }
.cat-showcase-title { font-size: 17px; font-weight: 800; margin-bottom: 14px; }

.cat-carousel-wrap { position: relative; }
.feat-carousel-wrap { position: relative; }
.feat-carousel-wrap .cat-carousel-arrow { top: 30%; transform: translateY(-50%); }
.feat-carousel-wrap .cat-carousel-arrow.prev { left: -14px; }
.feat-carousel-wrap .cat-carousel-arrow.next { right: -14px; }
.cat-carousel-track,
.feat-track { transition: justify-content .1s; }
.cat-carousel-track.no-overflow { justify-content: center; }
.feat-track.no-overflow { justify-content: center; }
.cat-carousel-track {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: none; padding: 4px 46px 12px;
}
.cat-carousel-track::-webkit-scrollbar { display: none; }

.cat-circle-item {
  flex: 0 0 auto; width: 86px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; scroll-snap-align: start; text-decoration: none;
}
.cat-circle-img-wrap {
  width: 78px; height: 78px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--primary-light); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: border-color .2s, transform .2s;
}
.cat-circle-item:hover .cat-circle-img-wrap { border-color: var(--primary); transform: scale(1.05); }
.cat-circle-img { width: 100%; height: 100%; object-fit: cover; }
.cat-circle-fallback { width: 32px; height: 32px; color: var(--icon-color); }
.cat-circle-fallback svg { width: 100%; height: 100%; }
.cat-circle-label { font-size: 12px; font-weight: 700; text-align: center; color: var(--text); line-height: 1.25; }

.cat-carousel-arrow {
  position: absolute; top: 34px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow); z-index: 5; transition: all .2s; color: var(--text);
}
.cat-carousel-arrow:hover { border-color: var(--primary); color: var(--primary); }
.cat-carousel-arrow.prev { left: 0; }
.cat-carousel-arrow.next { right: 0; }
.cat-carousel-arrow svg { width: 16px; height: 16px; }

/* Téléphone : carrousel vertical (colonne défilante) plutôt qu'horizontal */
@media (max-width: 480px) {
  .cat-carousel-track {
    flex-direction: column; overflow-x: hidden; overflow-y: auto;
    scroll-snap-type: y proximity; max-height: 320px; padding: 46px 6px 6px;
  }
  .cat-circle-item { width: 100%; flex-direction: row; justify-content: flex-start; gap: 14px; }
  .cat-circle-label { text-align: left; font-size: 13.5px; }
  .cat-carousel-arrow.prev { top: 0; left: 50%; right: auto; transform: translateX(-50%); }
  .cat-carousel-arrow.next { top: auto; bottom: 0; right: 50%; left: auto; transform: translateX(50%); }
  .cat-carousel-arrow svg { transform: rotate(90deg); }
}

/* Téléphone : carrousel de produits au doigt, sans flèches */
@media (max-width: 700px) {
  .feat-carousel-wrap .cat-carousel-arrow { display: none !important; }
}

/* ══ CARROUSEL DE SOUS-CATÉGORIES ══
   Enveloppe ajoutée par initSubcatScroller() autour de .subcat-pills (accueil)
   et .subcat-tabs (page catégorie). Flèches + fondus de bord n'apparaissent
   que lorsque la liste dépasse la largeur disponible, et seulement du côté
   où il reste du contenu. Sur écran tactile : balayage + fondus (pas de flèches). */
.sc-scroller { position: relative; }
.sc-track { position: relative; }
.sc-scroller::before, .sc-scroller::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 44px;
  pointer-events: none; z-index: 1; opacity: 0; transition: opacity .2s;
}
.sc-scroller::before { left: 0;  background: linear-gradient(to right, var(--sc-fade, var(--bg)), transparent); }
.sc-scroller::after  { right: 0; background: linear-gradient(to left,  var(--sc-fade, var(--bg)), transparent); }
.sc-scroller.can-prev::before, .sc-scroller.can-next::after { opacity: 1; }

.sc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white); color: var(--text);
  box-shadow: var(--shadow); cursor: pointer;
  display: none; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.sc-arrow svg { width: 16px; height: 16px; }
.sc-arrow:hover { border-color: var(--primary); color: var(--primary); }
.sc-arrow.prev { left: -4px; }
.sc-arrow.next { right: -4px; }
.sc-scroller.can-prev .sc-arrow.prev,
.sc-scroller.can-next .sc-arrow.next { display: flex; }
/* Centre les flèches sur la rangée (les pills ont 14px de marge basse) */
.sc-scroller.is-pills .sc-arrow { top: calc(50% - 7px); }
@media (hover: none) { .sc-arrow { display: none !important; } }

/* ══ CARTES COMPACTES DU CARROUSEL DE L'ACCUEIL (uniquement .feat-card) ══
   Les cartes de l'accueil sont des « conteneurs » : 1cqw = 1 % de la largeur de LA CARTE. Textes,
   marges et boutons s'ajustent donc à la largeur réelle (≈ 120 px sur petit téléphone → 150 px
   sur grand écran), sans palier à maintenir. La 1re déclaration (px fixes) sert de repli pour les
   navigateurs trop anciens pour connaître cqw.
   Les grilles des AUTRES pages (catégorie, catalogue, recherche, favoris : .product-card) ne sont
   volontairement pas concernées : elles gardent leur mise en page d'origine, 4 produits par ligne
   au maximum (voir .products-grid). */
.feat-card .feat-body { padding: 10px; padding: clamp(8px, 5.2cqw, 12px); }
.feat-card .feat-name { font-size: 12.5px; font-size: clamp(11.5px, 8.3cqw, 14px); margin-bottom: 4px; }
.feat-card .feat-price-row { flex-wrap: wrap; gap: 0 6px; margin-bottom: 4px; }
.feat-card .feat-price { font-size: 14px; font-size: clamp(13px, 9.4cqw, 17px); }
.feat-card .feat-old-price { font-size: 11px; font-size: clamp(10px, 7cqw, 13px); }
.feat-card .feat-label { top: 6px; left: 6px; padding: 3px 7px; font-size: 9.5px; font-size: clamp(8.5px, 6.2cqw, 10.5px); }
.feat-card .feat-discount { top: 6px; right: 6px; padding: 3px 7px; font-size: 10px; font-size: clamp(9px, 6.4cqw, 11px); }

/* Bouton « Ajouter » : en bas de carte (même alignement d'une carte à l'autre), texte jamais coupé */
.feat-card .feat-add {
  font-size: 11px; font-size: clamp(10.5px, 7.2cqw, 13px);
  padding: 7px 4px; padding: clamp(7px, 4.6cqw, 10px) 4px;
  gap: 5px; white-space: nowrap; border-radius: 8px; margin-top: auto;
}

/* Cœur des favoris : coin bas-droit de la photo, proportionnel à la carte */
@supports (width: 1cqw) {
  .feat-card .feat-fav-btn {
    --fav: clamp(26px, 17cqw, 34px);
    width: var(--fav); height: var(--fav);
    top: calc(100cqw - var(--fav) - 8px); bottom: auto; right: 8px;
  }
  .feat-card .feat-fav-btn svg { width: 56%; height: 56%; }
}

/* ══ GRILLES DES AUTRES PAGES (catégorie, catalogue, recherche, favoris : .product-card) ══
   Grand écran : mise en page d'origine, 4 produits par ligne au maximum (voir .products-grid).
   Téléphone (≤ 640 px) : 2 produits par ligne, textes proportionnels à la largeur de la carte
   (1cqw = 1 % de la largeur de LA carte ; la 1re déclaration en px sert de repli pour les
   navigateurs trop anciens pour connaître cqw). */
.product-card { container-type: inline-size; }

/* Cœur des favoris : coin bas-droit de la PHOTO (il chevauchait le bouton « Acheter maintenant ») */
@supports (width: 1cqw) {
  .product-card .favorite-btn {
    --fav: clamp(26px, 17cqw, 34px);
    width: var(--fav); height: var(--fav);
    top: calc(100cqw - var(--fav) - 8px); bottom: auto; right: 8px;
  }
  .product-card .favorite-btn svg { width: max(14px, 50%); height: max(14px, 50%); }
}

@media (max-width: 640px) {
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

  .product-card .product-body { padding: 10px; padding: clamp(8px, 5.2cqw, 12px); }
  .product-card .product-name { font-size: 12.5px; font-size: clamp(11.5px, 8.3cqw, 14px); margin-bottom: 4px; }
  .product-card .price-row { flex-wrap: wrap; gap: 0 6px; margin-bottom: 4px; }
  .product-card .product-price { font-size: 14px; font-size: clamp(13px, 9.4cqw, 17px); }
  .product-card .product-old-price { font-size: 11px; font-size: clamp(10px, 7cqw, 13px); }
  .product-card .stock-info { font-size: 10.5px; font-size: clamp(10px, 7cqw, 11.5px); margin-bottom: 8px; }
  .product-card .product-cat { font-size: 9px; letter-spacing: .5px; margin-bottom: 3px; }
  .product-card .product-label { top: 6px; left: 6px; padding: 3px 7px; font-size: 9.5px; font-size: clamp(8.5px, 6.2cqw, 10.5px); }
  .product-card .product-discount { top: 6px; right: 6px; padding: 3px 7px; font-size: 10px; font-size: clamp(9px, 6.4cqw, 11px); }

  /* Boutons en bas de carte (alignés d'une carte à l'autre), texte jamais coupé */
  .product-card .add-to-cart, .product-card .buy-now-btn {
    font-size: 11px; font-size: clamp(10.5px, 7.2cqw, 13px);
    padding: 7px 4px; padding: clamp(7px, 4.6cqw, 10px) 4px;
    gap: 5px; white-space: nowrap; border-radius: 8px;
  }
  .product-card .add-to-cart { margin-top: auto; }
  .product-card .buy-now-btn { margin-top: 6px; }
}
@container (max-width: 175px) {
  .product-card .add-to-cart svg, .product-card .buy-now-btn svg { display: none; }
}

/* ══ COULEURS PERSONNALISÉES — variantes MODE SOMBRE ══
   Les variables --hdr-*, --hdr-blk-*, --ftr-*, --ftr-blk-* (voir applySurfaceVars) n'existent que si
   l'admin a choisi une couleur ; leur version « -d » est la teinte assombrie automatiquement.
   Sans réglage, on retombe sur les couleurs du thème sombre, comme avant. */
body.dark-mode .shop-header { background: var(--hdr-bg-d, var(--white)); border-bottom-color: var(--hdr-line-d, var(--border)); }
body.dark-mode .logo-sub { color: var(--hdr-muted-d, var(--text-muted)); }
body.dark-mode .icon-btn { border-color: var(--hdr-blk-line-d, var(--border)); background: var(--hdr-blk-bg-d, var(--white)); color: var(--hdr-blk-fg-d, var(--text)); }
body.dark-mode .icon-btn:hover { border-color: var(--primary); color: var(--hdr-blk-fg-d, var(--primary)); background: var(--hdr-blk-hover-d, var(--hdr-blk-bg-d, var(--white))); }
body.dark-mode .shop-footer { background: var(--ftr-bg-d, var(--white)); border-top-color: var(--ftr-line-d, var(--border)); }
body.dark-mode .footer-btn { border-color: var(--ftr-blk-line-d, var(--border)); background: var(--ftr-blk-bg-d, var(--bg)); color: var(--ftr-blk-fg-d, var(--text)); }
body.dark-mode .footer-btn:hover { border-color: var(--primary); background: var(--ftr-blk-hover-d, var(--primary-light)); color: var(--ftr-blk-fg-d, var(--primary)); }
body.dark-mode .footer-btn.dark-active { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-mode .footer-btn.dark-active:hover { background: #334155; }

/* ══ SECTION D'INFORMATIONS DE FIN DE PAGE ══ */
.info-footer { background: var(--primary-dark); color: #fff; margin-top: 40px; border-radius: 22px 22px 0 0; }
.info-footer-inner { max-width: var(--page-max, 1340px); margin: 0 auto; padding: 34px 20px 22px; }
.info-footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 90px; gap: 26px 30px; align-items: start; }
.info-col h4 { font-size: 16px; font-weight: 800; margin-bottom: 12px; color: #fff; }
.info-col a { display: block; color: rgba(255,255,255,.88); font-size: 13px; font-weight: 600; padding: 5px 0; transition: color .15s; word-break: break-word; }
.info-col a:hover { color: #fff; text-decoration: underline; }
.info-logo { justify-self: end; width: 70px; height: 70px; border-radius: 14px; background: #fff; color: var(--primary-dark); display: flex; align-items: center; justify-content: center; padding: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.info-logo svg, .info-logo img { width: 100%; height: 100%; object-fit: contain; }
.info-footer-line { height: 1px; background: rgba(255,255,255,.35); margin: 26px 0 18px; }
.info-footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px 30px; flex-wrap: wrap; }
.info-pay-title { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; color: rgba(255,255,255,.88); }
.info-pay-list { display: flex; flex-wrap: wrap; gap: 8px; }
.info-pay-chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.info-copy { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; color: rgba(255,255,255,.85); text-align: right; }
.info-copy a { color: #fff; font-weight: 800; text-decoration: underline; }
@media (max-width: 900px) {
  .info-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-logo { display: none; }
}
@media (max-width: 600px) {
  .info-footer { border-radius: 16px 16px 0 0; }
  .info-footer-inner { padding: 26px 16px 18px; }
  .info-footer-bottom { flex-direction: column; align-items: flex-start; }
  .info-copy { align-items: flex-start; text-align: left; }
}
body.dark-mode .info-footer { background: #0b1220; border-top: 1px solid var(--border); }
body.dark-mode .info-logo { background: #1e293b; color: var(--primary); }

/* Compteur de visiteurs — style 7 segments en relief (occupe une colonne du pied de page) */
.info-counter { width: 100%; max-width: 280px; text-align: center; padding: 10px 12px 13px; border-radius: 16px;
  background: linear-gradient(160deg, #1d2b44 0%, #0b1220 60%, #151f33 100%);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 24px rgba(0,0,0,.45), 0 2px 0 rgba(255,255,255,.12) inset, 0 -3px 8px rgba(0,0,0,.5) inset;
  position: relative; overflow: hidden; visibility: hidden; }
.info-counter.ready { visibility: visible; }
.info-counter::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%; background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)); pointer-events: none; }
.info-counter-label { font-size: 11px; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 7px; text-indent: .26em; }
.info-counter-screen { display: flex; justify-content: center; gap: 4px; padding: 8px 9px; border-radius: 9px; background: #05080f; border: 1px solid #000;
  box-shadow: 0 3px 8px rgba(0,0,0,.8) inset, 0 1px 0 rgba(255,255,255,.14); }
.seg-digit { flex: 1 1 0; min-width: 0; max-width: 30px; height: auto; transform: skewX(-6deg); overflow: visible; }
.seg-digit .seg { fill: rgba(255,176,32,.07); }
.seg-digit .seg.on { fill: #ffb020; filter: drop-shadow(0 0 2px rgba(255,176,32,.9)) drop-shadow(0 0 7px rgba(255,140,0,.55)); }
@media (max-width: 900px) { .info-counter { max-width: 100%; } }

/* Croix de fermeture des bannières de suivi de commande */
.pending-banner .banner-close, .confirmed-banner .banner-close, .refused-banner .banner-close {
  margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; background: transparent; border: none; border-radius: 50%;
  color: inherit; cursor: pointer; opacity: .75; transition: background .15s, opacity .15s;
}
.pending-banner .banner-close:hover, .confirmed-banner .banner-close:hover, .refused-banner .banner-close:hover { background: rgba(0,0,0,.1); opacity: 1; }
.pending-banner .banner-close svg, .confirmed-banner .banner-close svg, .refused-banner .banner-close svg { width: 16px; height: 16px; }
