/* ==========================================================
   Ndiambour Cosmétique — thème de marque
   Se superpose au style FoodMart (style.css)
   ========================================================== */
:root {
  --nc-brown: #7B4513;
  --nc-brown-dark: #5E340E;
  --nc-brown-light: #A86B35;
  --nc-dark: #2B2425;
  --nc-cream: #F8F1E9;
  --nc-sand: #EFE3D3;
  --nc-green: #6E8B3D;        /* décoratif uniquement (fonds, illustrations) */
  --nc-green-text: #4F6B25;   /* vert pour le texte : contraste 6:1 sur blanc */
  --nc-muted: #7a6f6a;
  --accent-color: var(--nc-brown);
  --primary-color: var(--nc-brown);
  --dark-color: var(--nc-dark);
  --heading-font: "Montserrat", sans-serif;
  --body-font: "Open Sans", sans-serif;
}

body {
  --bs-primary: #7B4513;
  --bs-primary-rgb: 123, 69, 19;
  --bs-success: #4F6B25;
  --bs-success-rgb: 79, 107, 37;
  --bs-secondary-color: #5c636a;
  --bs-primary-bg-subtle: #F8F1E9;
  --bs-success-bg-subtle: #EEF3E8;
  --bs-body-color: #5f5652;
  --bs-body-line-height: 1.75;
  --bs-link-color: var(--nc-dark);
  --bs-link-hover-color: var(--nc-brown);
  --bs-border-color: #EFE6DC;
  color: #5f5652;
  background: #fff;
}
h1, h2, h3, h4, h5, h6, .section-title { font-family: var(--heading-font); color: var(--nc-dark); }
a { transition: color .2s ease; }
::selection { background: var(--nc-brown); color: #fff; }

.text-primary { color: var(--nc-brown) !important; }
.bg-primary { background-color: var(--nc-brown) !important; }
.bg-cream { background-color: var(--nc-cream) !important; }
.bg-sand { background-color: var(--nc-sand) !important; }
.bg-dark-brand { background-color: var(--nc-dark) !important; }
.text-brand-green { color: var(--nc-green-text) !important; }

.btn-primary {
  --bs-btn-bg: #7B4513; --bs-btn-hover-bg: #5E340E; --bs-btn-active-bg: #5E340E;
  --bs-btn-disabled-bg: #c9b8a8; --bs-btn-focus-shadow-rgb: 123, 69, 19;
}
.btn-outline-primary {
  --bs-btn-color: #7B4513; --bs-btn-border-color: #7B4513; --bs-btn-hover-bg: #7B4513;
  --bs-btn-hover-border-color: #7B4513; --bs-btn-active-bg: #5E340E; --bs-btn-active-border-color: #5E340E;
}
.btn-dark { --bs-btn-bg: #2B2425; --bs-btn-border-color: #2B2425; --bs-btn-hover-bg: #7B4513; --bs-btn-hover-border-color: #7B4513; }
.btn { border-radius: 10px; font-weight: 600; letter-spacing: .02em; }
.form-control, .form-select { border-radius: 10px; border-color: #e6dbcf; padding: .7rem 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--nc-brown-light); box-shadow: 0 0 0 .2rem rgba(123,69,19,.12); }

/* Preloader */
@keyframes animation {
  0%, 80%, 100% { box-shadow: 0 2em 0 -1em var(--nc-brown); }
  40% { box-shadow: 0 2em 0 0 var(--nc-brown); }
}

/* ---------- Bandeau supérieur ---------- */
.topbar { background: var(--nc-dark); color: #e9ddd0; font-size: .82rem; }
.topbar a { color: #e9ddd0; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ---------- En-tête ---------- */
header.site-header { position: sticky; top: 0; z-index: 1020; background: #fff; transition: box-shadow .3s; }
header.site-header.scrolled { box-shadow: 0 6px 24px rgba(43,36,37,.08); }
.main-logo img { max-height: 68px; width: auto; height: auto; }
.search-bar { background: var(--nc-cream) !important; }
.search-bar input::placeholder { color: #6f6762; }
.header-icon {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--nc-cream); color: var(--nc-dark); position: relative; text-decoration: none;
}
.header-icon:hover { background: var(--nc-brown); color: #fff; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--nc-brown); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.main-menu .nav-link { font-weight: 600; color: var(--nc-dark); font-family: var(--heading-font); font-size: .95rem; }
.main-menu .nav-link:hover, .main-menu .nav-link.active { color: var(--nc-brown); }
.main-menu .nav-link.active { position: relative; }
@media (min-width: 992px) {
  .main-menu .nav-link.active::after {
    content: ''; position: absolute; left: .5rem; right: .5rem; bottom: 0; height: 2px; background: var(--nc-brown); border-radius: 2px;
  }
}

/* ---------- Bannière d'accueil ---------- */
.hero { background: url('../images/hero-bg.jpg') center/cover no-repeat; }
.banner-ad.large { background: linear-gradient(135deg, #F8EFE4 0%, #EAD7C0 100%) !important; }
.banner-ad .banner-content .categories { font-family: "Playfair Display", Georgia, serif; font-style: italic; color: var(--nc-brown) !important; }
.banner-ad .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active { background: var(--nc-brown); }
.banner-ad .img-wrapper img { border-radius: 24px; box-shadow: 0 30px 60px rgba(94,52,14,.18); width: auto; max-width: 100%; height: auto; max-height: 440px; object-fit: contain; }
.banner-ad.block-2 { background: #EEF3E8 !important; }
.banner-ad.block-3 { background: #F3E6DA !important; }
.banner-ad .side-img { position: absolute; right: 16px; bottom: 16px; width: 42%; max-width: 220px; border-radius: 18px; }
.banner-ad .banner-content { position: relative; z-index: 1; }
.banner-ad .sale:before { border-color: var(--nc-dark) !important; }
.banner-ad .banner-content .sale:after { content: none; }
.banner-ad .banner-content .categories, .category-carousel .category-item .category-title, .btn-link { text-transform: none; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border-radius: 50px; padding: .35rem .9rem; font-size: .8rem; font-weight: 600; color: var(--nc-green-text); }

/* ---------- Carrousels ---------- */
.swiper-prev, .swiper-next { --bs-btn-hover-bg: var(--nc-brown); --bs-btn-active-bg: var(--nc-brown-dark); }
.swiper-prev:hover, .swiper-next:hover { background: var(--nc-brown); color: #fff; }
.category-carousel .category-item { padding: 36px 16px; }
.category-item .cat-icon {
  width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: var(--nc-cream); color: var(--nc-brown);
  display: flex; align-items: center; justify-content: center;
}
.category-item .cat-icon svg { width: 42px; height: 42px; }
.category-item .cat-count { font-size: .8rem; color: var(--nc-muted); }

/* ---------- Cartes produit ---------- */
.product-item { display: flex; flex-direction: column; height: calc(100% - 30px); }
.product-item figure { overflow: hidden; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.product-item figure img { width: 100%; height: 100%; max-height: none; object-fit: cover; transition: transform .5s ease; }
.product-item:hover figure img { transform: scale(1.06); }
.product-item h3 { font-size: 16px; line-height: 1.35; text-transform: none; min-height: 2.7em; }
.product-item h3 a { color: inherit; text-decoration: none; }
.product-item h3 a:hover { color: var(--nc-brown); }
.product-item .cat { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--nc-green-text); font-weight: 600; }
.product-item .price { font-size: 19px; color: var(--nc-brown); margin-top: auto; }
.product-item .old-price { font-size: 14px; color: #6f6762; text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.product-item .badge { z-index: 2; border-radius: 8px; font-weight: 700; }
.product-item .badge.bg-success { background: var(--nc-green-text) !important; color: #fff; }
.product-item .btn-add {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; background: var(--nc-cream);
  color: var(--nc-brown); font-weight: 700; font-size: 14px; padding: 8px 12px; transition: all .2s;
}
.product-item .btn-add:hover { background: var(--nc-brown); color: #fff; }
.product-item .btn-add:disabled { opacity: .5; cursor: not-allowed; background: #eee; color: #888; }
.product-item .btn-number { border-color: #eadfd3; }
.product-item .product-qty input { width: 32px; text-align: center; border: 0; padding: 0; font-weight: 600; background: transparent; }
.stock-flag { font-size: 12px; font-weight: 600; }
.stock-flag.out { color: #b3261e; }
.stock-flag.low { color: #8a5300; }

/* Onglets produits */
.product-tabs .nav-tabs .nav-link.active, .product-tabs .nav-tabs .nav-item.show .nav-link { border-bottom-color: var(--nc-brown); color: var(--nc-brown); }
.product-tabs .nav-tabs { flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section-eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 700; color: var(--nc-green-text); }
.section-title { font-weight: 800; }
.about-img { border-radius: 28px; overflow: hidden; position: relative; }
.about-img img { width: 100%; display: block; }
.about-stat { background: #fff; border-radius: 18px; padding: 18px 22px; box-shadow: 0 15px 40px rgba(43,36,37,.1); }
.about-stat strong { font-size: 1.8rem; color: var(--nc-brown); font-family: var(--heading-font); display: block; line-height: 1.1; }
.value-card { background: #fff; border-radius: 20px; padding: 28px; height: 100%; border: 1px solid #f1e8de; transition: transform .3s, box-shadow .3s; }
.value-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(43,36,37,.08); }
.value-card .icon { width: 56px; height: 56px; border-radius: 16px; background: var(--nc-cream); color: var(--nc-brown); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.testimonial { background: #fff; border-radius: 20px; padding: 28px; height: 100%; box-shadow: 0 5px 22px rgba(0,0,0,.04); }
.testimonial .stars { color: #E9A848; letter-spacing: 2px; }
.testimonial .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--nc-sand); color: var(--nc-brown); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.cta-band { background: var(--nc-brown) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='240' viewBox='0 0 360 240'%3E%3Cg fill='%23ffffff' fill-opacity='.07'%3E%3Cpath d='M300 20q40 60 10 130q-50-60-10-130z'/%3E%3Cpath d='M250 90q60 30 60 110q-70-30-60-110z'/%3E%3Cpath d='M330 120q30 50 0 110q-40-50 0-110z'/%3E%3C/g%3E%3C/svg%3E") right center no-repeat; border-radius: 28px; color: #f6e9dc; }
.cta-band h2 { color: #fff; }
.feature-item svg { color: var(--nc-brown); }
.page-banner { background: var(--nc-cream) url('../images/hero-bg.jpg') center/cover; padding: 56px 0; }
.page-banner .breadcrumb { --bs-breadcrumb-divider-color: var(--nc-muted); --bs-breadcrumb-item-active-color: var(--nc-brown); margin: 0; }
.page-banner .breadcrumb a { color: var(--nc-dark); text-decoration: none; }

/* ---------- Boutique ---------- */
.shop-sidebar .widget { background: #fff; border: 1px solid #f1e8de; border-radius: 18px; padding: 22px; margin-bottom: 24px; }
.shop-sidebar .cat-link { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--nc-dark); }
.shop-sidebar .cat-link:hover, .shop-sidebar .cat-link.active { background: var(--nc-cream); color: var(--nc-brown); font-weight: 600; }
.pagination .page-link { color: var(--nc-dark); border-radius: 8px !important; margin: 0 3px; border-color: #eee3d8; }
.pagination .active > .page-link { background: var(--nc-brown); border-color: var(--nc-brown); color: #fff; }

/* ---------- Fiche produit ---------- */
.product-gallery { background: var(--nc-cream); border-radius: 24px; overflow: hidden; aspect-ratio: 1/1; }
.product-gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-detail .price-lg { font-size: 2rem; font-weight: 800; color: var(--nc-brown); font-family: var(--heading-font); }
.qty-box { display: inline-flex; align-items: center; border: 1px solid #e6dbcf; border-radius: 12px; overflow: hidden; }
.qty-box button { width: 44px; height: 48px; border: 0; background: var(--nc-cream); font-size: 20px; color: var(--nc-dark); }
.qty-box input { width: 56px; height: 48px; border: 0; text-align: center; font-weight: 700; }
.trust-list li { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.trust-list svg { color: var(--nc-green); flex-shrink: 0; }

/* ---------- Panier / commande ---------- */
.cart-table img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: var(--nc-cream); }
.summary-card { background: var(--nc-cream); border-radius: 20px; padding: 26px; position: sticky; top: 120px; }
.summary-card .total { font-size: 1.4rem; font-weight: 800; color: var(--nc-brown); }
.pay-option { border: 2px solid #eee3d8; border-radius: 14px; padding: 14px 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: border-color .2s, background .2s; }
.pay-option:has(input:checked) { border-color: var(--nc-brown); background: var(--nc-cream); }
.pay-option input { accent-color: var(--nc-brown); }
.pay-logo { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 13px; }
.offcanvas-cart-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--nc-cream); }
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state svg { color: var(--nc-sand); }

/* Suivi de commande */
.track-steps { display: flex; justify-content: space-between; position: relative; margin: 30px 0; }
.track-steps::before { content: ''; position: absolute; top: 18px; left: 8%; right: 8%; height: 3px; background: #eee3d8; }
.track-step { text-align: center; position: relative; flex: 1; font-size: .85rem; }
.track-step .dot { width: 38px; height: 38px; border-radius: 50%; background: #eee3d8; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; position: relative; }
.track-step.done .dot { background: var(--nc-green); }
.track-step.current .dot { background: var(--nc-brown); box-shadow: 0 0 0 6px rgba(123,69,19,.15); }

/* ---------- Pied de page ---------- */
footer.site-footer { background: var(--nc-dark); color: #cfc3b8; }
footer.site-footer h5, footer.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.2rem; }
footer.site-footer .nav-link { color: #cfc3b8; padding: .25rem 0; }
footer.site-footer .nav-link:hover { color: #fff; }
footer.site-footer .btn-outline-light { --bs-btn-color: #cfc3b8; --bs-btn-border-color: #4a3f40; --bs-btn-hover-bg: var(--nc-brown); --bs-btn-hover-border-color: var(--nc-brown); --bs-btn-hover-color: #fff; }
footer.site-footer .footer-logo { width: 170px; max-width: 100%; height: auto; }
#footer-bottom { background: #221c1d; color: #b3a79e; font-size: .85rem; padding: 18px 0 6px; }
#footer-bottom a { color: #cfc3b8; }

/* WhatsApp flottant */
.whatsapp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 1030; width: 56px; height: 56px; border-radius: 50%; background: #128C4A; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 25px rgba(18,140,74,.35); transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* Toast */
.nc-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--nc-dark); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 2000; transition: transform .35s ease; display: flex; gap: 10px; align-items: center; box-shadow: 0 15px 35px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.nc-toast.show { transform: translate(-50%, 0); }
.nc-toast.error { background: #a5281b; }

/* Squelette de chargement */
.skeleton { background: linear-gradient(90deg, #f4ede5 25%, #faf6f1 50%, #f4ede5 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 16px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 991px) {
  .main-logo img { max-height: 52px; }
  .banner-ad .swiper-slide { min-height: 520px; padding-bottom: 48px; }
  .banner-ad .swiper-pagination { bottom: 16px; }
  .banner-ad.large .banner-content .banner-title, .banner-ad .display-4 { font-size: 2rem; }
}
@media (max-width: 575px) {
  .container-fluid, .container { --bs-gutter-x: 2rem; }
  .track-step span { font-size: .7rem; }
}

/* ==========================================================
   Accessibilité (contrastes WCAG AA, clavier, mouvement)
   ========================================================== */
/* Textes gris du thème FoodMart trop pâles : remplacés par des teintes à 4.5:1 minimum */
.text-muted, .text-body-secondary { color: #5c636a !important; }
.product-item .qty { color: #6f6762; }
.btn-link { color: #5f5652; }
.form-control::placeholder { color: #6f6762; opacity: 1; }
.old-price-lg { color: #6f6762; }
.track-step.done .dot { background: var(--nc-green-text); }

/* Focus clavier toujours visible */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible, .btn:focus-visible, .nav-link:focus-visible {
  outline: 3px solid var(--nc-brown) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #fff !important;
}
.site-footer a:focus-visible, #footer-bottom a:focus-visible, #footer-bottom button:focus-visible, .topbar a:focus-visible { outline-color: #f0c38e !important; box-shadow: none !important; }
main:focus { outline: none; }
.pay-option:has(input:focus-visible) { outline: 3px solid var(--nc-brown); outline-offset: 2px; }
.header-icon { border: 0; }

/* Lien d'évitement « Aller au contenu » */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 3000; background: var(--nc-dark); color: #fff;
  padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Liens légaux du pied de page */
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; }
.legal-links a, .legal-links .btn-link { color: #e2d7cd; font-size: .85rem; text-decoration: underline; }
@media (max-width: 767px) { .legal-links { justify-content: flex-start; } }

/* Pages légales */
.legal-content h2 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: .75rem; }
.legal-content li { margin-bottom: .35rem; }
.legal-content a { color: var(--nc-brown); text-decoration: underline; }

/* Bandeau cookies : non bloquant, choix équilibrés */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2500; background: #fff; color: var(--nc-dark);
  border-top: 3px solid var(--nc-brown); box-shadow: 0 -10px 30px rgba(43,36,37,.15); padding: 16px 0;
}
.cookie-banner a { color: var(--nc-brown); text-decoration: underline; }
.cookie-inner { display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cookie-text { flex: 1 1 420px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-actions .btn { min-width: 140px; }
.cookie-banner .form-check-input:checked { background-color: var(--nc-brown); border-color: var(--nc-brown); }
body:has(.cookie-banner:not([hidden])) .whatsapp-float { bottom: 150px; }

/* Liens soulignés dans les textes (identifiables sans la couleur) */
main p a:not(.btn), .summary-card a:not(.btn) { text-decoration: underline; }

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .product-item:hover figure img, .value-card:hover, .category-carousel .category-item:hover { transform: none; }
}
/* Boutons « catégorie » du menu (btn-warning FoodMart trop pâle) */
.btn-warning.bg-cream { --bs-btn-color: #4a3f3a; --bs-btn-hover-color: #2B2425; color: #4a3f3a; }


/* Photos des blocs latéraux de la bannière (proportions conservées) */
.banner-ad .side-img { height: auto; }
.banner-ad .side-photo {
  top: 50%; bottom: auto; transform: translateY(-50%);
  width: 46%; max-width: 280px; max-height: 85%; object-fit: contain;
  box-shadow: 0 18px 40px rgba(94,52,14,.18); background: #fff;
}
@media (max-width: 575px) { .banner-ad .side-photo { width: 44%; } }

/* Bouton Pause / Lecture du carrousel d'accueil */
.swiper-autoplay-toggle {
  position: absolute; z-index: 10; left: 50%; bottom: 34px; transform: translateX(calc(-50% + 72px));
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: #fff; color: var(--nc-dark); box-shadow: 0 4px 12px rgba(43,36,37,.15);
}
.swiper-autoplay-toggle:hover { background: var(--nc-brown); color: #fff; }
.swiper-autoplay-toggle .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.swiper-autoplay-toggle .icon-play { display: none; }
.swiper-autoplay-toggle.is-paused .icon-play { display: block; }
.swiper-autoplay-toggle.is-paused .icon-pause { display: none; }
@media (max-width: 991px) { .swiper-autoplay-toggle { bottom: 10px; } }

/* Accès discret à l'espace de gestion (bandeau supérieur) */
.topbar-admin {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  margin: -4px 0; border-radius: 50%; border: 1px solid rgba(233,221,208,.45);
}
.topbar-admin:hover { background: var(--nc-brown); border-color: var(--nc-brown); color: #fff; }

/* Photo de la boutique (section « Notre histoire ») */
.about-photo { box-shadow: 0 25px 50px rgba(94,52,14,.18); }
.about-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
