/* =========================================================
   NAFA DIAMA SARL – Feuille de style du site public
   Charte : bleu #1B5590 · vert #22B157 · jaune #F2B92A
   ========================================================= */
:root {
    --nd-blue: #1B5590;
    --nd-blue-600: #164A7E;
    --nd-blue-900: #0E2A4A;
    --nd-green: #22B157;
    --nd-green-600: #1C9A4B;
    --nd-yellow: #F2B92A;
    --nd-bg: #F6F8FB;
    --nd-surface: #FFFFFF;
    --nd-text: #1D2939;
    --nd-muted: #667085;
    --nd-border: #E4E9F0;
    --nd-radius: 16px;
    --nd-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
    --nd-shadow-lg: 0 20px 48px rgba(14, 42, 74, .14);

    --bs-primary: var(--nd-blue);
    --bs-primary-rgb: 27, 85, 144;
    --bs-success: var(--nd-green);
    --bs-success-rgb: 34, 177, 87;
    --bs-warning: var(--nd-yellow);
    --bs-warning-rgb: 242, 185, 42;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: var(--nd-text);
    --bs-body-bg: var(--nd-bg);
    --bs-link-color: var(--nd-blue);
    --bs-link-hover-color: var(--nd-green-600);
    --bs-border-color: var(--nd-border);
}

body { font-size: 15.5px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--nd-blue-900); font-weight: 700; letter-spacing: -.01em; }
a { text-decoration: none; }
img { max-width: 100%; }
::selection { background: rgba(34, 177, 87, .2); }

/* ---------- Boutons ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .65rem 1.4rem; transition: all .2s ease; }
.btn-sm { padding: .4rem 1rem; }
.btn-primary { --bs-btn-bg: var(--nd-blue); --bs-btn-border-color: var(--nd-blue); --bs-btn-hover-bg: var(--nd-blue-600); --bs-btn-hover-border-color: var(--nd-blue-600); --bs-btn-active-bg: var(--nd-blue-900); }
.btn-success { --bs-btn-bg: var(--nd-green); --bs-btn-border-color: var(--nd-green); --bs-btn-hover-bg: var(--nd-green-600); --bs-btn-hover-border-color: var(--nd-green-600); --bs-btn-active-bg: var(--nd-green-600); }
.btn-warning { --bs-btn-bg: var(--nd-yellow); --bs-btn-border-color: var(--nd-yellow); --bs-btn-color: var(--nd-blue-900); --bs-btn-hover-bg: #e0a915; --bs-btn-hover-border-color: #e0a915; }
.btn-outline-primary { --bs-btn-color: var(--nd-blue); --bs-btn-border-color: var(--nd-blue); --bs-btn-hover-bg: var(--nd-blue); --bs-btn-hover-border-color: var(--nd-blue); }
.btn-light-soft { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-light-soft:hover { background: #fff; color: var(--nd-blue-900); }
.btn:hover { transform: translateY(-1px); }
.form-control, .form-select { border-radius: 12px; padding: .7rem 1rem; border-color: var(--nd-border); }
.form-control:focus, .form-select:focus { border-color: var(--nd-blue); box-shadow: 0 0 0 .2rem rgba(27, 85, 144, .12); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--nd-blue-900); }

/* ---------- Barre supérieure ---------- */
.topbar { background: var(--nd-blue-900); color: rgba(255,255,255,.8); font-size: .82rem; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: var(--nd-yellow); }
.topbar .bi { color: var(--nd-green); }

/* ---------- Navigation ---------- */
.site-nav { background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--nd-border); transition: box-shadow .25s; }
.site-nav.scrolled { box-shadow: 0 6px 24px rgba(14, 42, 74, .08); }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { height: 52px; width: auto; }
.brand-name { font-weight: 800; color: var(--nd-blue); letter-spacing: .02em; line-height: 1; font-size: 1.15rem; }
.brand-name small { display: block; font-weight: 600; font-size: .62rem; letter-spacing: .14em; color: var(--nd-green-600); margin-top: .3rem; text-transform: uppercase; }
.site-nav .nav-link { font-weight: 600; color: var(--nd-text); padding: .5rem 1rem !important; border-radius: 999px; position: relative; }
.site-nav .nav-link:hover { color: var(--nd-blue); background: rgba(27, 85, 144, .06); }
.site-nav .nav-link.active { color: var(--nd-blue); }
.site-nav .nav-link.active::after { content: ''; position: absolute; left: 1rem; right: 1rem; bottom: .15rem; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--nd-green), var(--nd-yellow)); }
.cart-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(27, 85, 144, .08); color: var(--nd-blue); font-size: 1.2rem; }
.cart-btn:hover { background: var(--nd-blue); color: #fff; }
.cart-badge { position: absolute; top: -2px; right: -2px; background: var(--nd-green); color: #fff; font-size: .7rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; border: 2px solid #fff; }

/* ---------- Hero / slider ---------- */
.hero .carousel-item { height: min(78vh, 640px); min-height: 460px; background-size: cover; background-position: center; }
.hero .carousel-item::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(14, 42, 74, .88) 0%, rgba(14, 42, 74, .55) 50%, rgba(14, 42, 74, .1) 100%); }
.hero .hero-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; line-height: 1.12; max-width: 680px; }
.hero p.lead { color: rgba(255,255,255,.85); max-width: 560px; font-size: 1.1rem; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--nd-yellow); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.hero .eyebrow::before { content: ''; width: 28px; height: 3px; border-radius: 2px; background: var(--nd-green); }
.hero .carousel-indicators [data-bs-target] { width: 28px; height: 4px; border-radius: 4px; border: 0; }
.hero .carousel-indicators .active { background: var(--nd-yellow); }
.hero .carousel-control-prev, .hero .carousel-control-next { width: 6%; }

.hero-static { background: linear-gradient(120deg, var(--nd-blue-900), var(--nd-blue)); padding: 6rem 0; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-sm { padding: 3.5rem 0; }
.section-white { background: var(--nd-surface); }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--nd-green-600); background: rgba(34, 177, 87, .1); padding: .35rem .9rem; border-radius: 999px; margin-bottom: .9rem; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.text-muted-soft { color: var(--nd-muted) !important; }

/* Bandeau de page interne */
.page-hero { background: linear-gradient(120deg, var(--nd-blue-900) 0%, var(--nd-blue) 70%, #1f6aa3 100%); color: #fff; padding: 3.5rem 0 3rem; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 40px solid rgba(34, 177, 87, .18); }
.page-hero h1 { color: #fff; font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.5); margin: 0; }
.page-hero .breadcrumb a { color: rgba(255,255,255,.75); }
.page-hero .breadcrumb .active { color: var(--nd-yellow); }

/* ---------- Cartes ---------- */
.card-soft { background: var(--nd-surface); border: 1px solid var(--nd-border); border-radius: var(--nd-radius); box-shadow: var(--nd-shadow); }
.service-card { padding: 2rem; height: 100%; transition: all .25s ease; position: relative; overflow: hidden; }
.service-card::after { content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: linear-gradient(90deg, var(--nd-blue), var(--nd-green), var(--nd-yellow)); transition: width .35s ease; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--nd-shadow-lg); }
.service-card:hover::after { width: 100%; }
.service-icon { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 1.2rem; }
.service-icon.c0 { background: rgba(27, 85, 144, .1); color: var(--nd-blue); }
.service-icon.c1 { background: rgba(34, 177, 87, .12); color: var(--nd-green-600); }
.service-icon.c2 { background: rgba(242, 185, 42, .18); color: #b5850c; }
.service-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }

.product-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; transition: all .25s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--nd-shadow-lg); }
.product-thumb { position: relative; aspect-ratio: 4 / 3; background: #EEF2F7; overflow: hidden; display: block; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.product-badge { position: absolute; top: 12px; left: 12px; font-size: .72rem; font-weight: 700; padding: .3rem .65rem; border-radius: 999px; }
.badge-sale { background: var(--nd-yellow); color: var(--nd-blue-900); }
.badge-out { background: #fff; color: #b42318; border: 1px solid #fecdca; }
.product-body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: .75rem; font-weight: 600; color: var(--nd-green-600); text-transform: uppercase; letter-spacing: .08em; }
.product-title { font-size: 1rem; font-weight: 700; color: var(--nd-blue-900); margin: .3rem 0 .6rem; line-height: 1.35; }
.product-title a { color: inherit; }
.product-title a:hover { color: var(--nd-blue); }
.price { font-weight: 800; color: var(--nd-blue); font-size: 1.1rem; }
.price-old { white-space: nowrap; color: var(--nd-muted); text-decoration: line-through; font-size: .88rem; margin-left: .4rem; }
.btn-cart { width: 40px; height: 40px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

.formation-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: all .25s ease; }
.formation-card:hover { transform: translateY(-4px); box-shadow: var(--nd-shadow-lg); }
.formation-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--nd-blue), var(--nd-green)); position: relative; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); font-size: 3rem; overflow: hidden; }
.formation-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.formation-date { font-size: 1rem; position: absolute; top: 14px; right: 14px; background: #fff; border-radius: 12px; padding: .35rem .7rem; text-align: center; line-height: 1.1; box-shadow: var(--nd-shadow); z-index: 2; }
.formation-date strong { display: block; font-size: 1.2rem; color: var(--nd-blue); }
.formation-date span { font-size: .7rem; font-weight: 700; color: var(--nd-green-600); text-transform: uppercase; }
.meta-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85rem; color: var(--nd-muted); }
.meta-list .bi { color: var(--nd-green); margin-right: .25rem; }

/* Catégories (pastilles) */
.cat-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; border-radius: 999px; background: var(--nd-surface); border: 1px solid var(--nd-border); color: var(--nd-text); font-weight: 600; font-size: .9rem; transition: all .2s; }
.cat-pill:hover, .cat-pill.active { background: var(--nd-blue); color: #fff; border-color: var(--nd-blue); }
.cat-pill .count { font-size: .75rem; background: rgba(27, 85, 144, .1); color: var(--nd-blue); border-radius: 999px; padding: .05rem .5rem; }
.cat-pill:hover .count, .cat-pill.active .count { background: rgba(255,255,255,.2); color: #fff; }

/* Chiffres clés */
.stats-band { background: linear-gradient(120deg, var(--nd-blue-900), var(--nd-blue)); border-radius: 24px; padding: 2.5rem; color: #fff; position: relative; overflow: hidden; }
.stats-band::before { content: ''; position: absolute; left: -60px; bottom: -100px; width: 260px; height: 260px; border-radius: 50%; background: rgba(34, 177, 87, .25); }
.stat-value { font-size: 2.3rem; font-weight: 800; color: var(--nd-yellow); line-height: 1; }
.stat-label { color: rgba(255,255,255,.8); font-size: .9rem; margin-top: .4rem; }

/* À propos */
.about-visual { position: relative; border-radius: 24px; background: radial-gradient(circle at 30% 30%, #ffffff 0%, #EEF4FA 60%, #E3EEF8 100%); padding: 3rem; border: 1px solid var(--nd-border); }
.about-visual img { width: 100%; max-width: 420px; display: block; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(14, 42, 74, .15)); }
.about-badge { position: absolute; bottom: -22px; left: 24px; background: var(--nd-green); color: #fff; border-radius: 16px; padding: .9rem 1.2rem; box-shadow: var(--nd-shadow-lg); font-weight: 600; font-size: .9rem; }
.about-badge strong { font-size: 1.6rem; display: block; line-height: 1; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 1.9rem; position: relative; margin-bottom: .65rem; }
.check-list li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: 0; color: var(--nd-green); font-size: 1.15rem; }
.mv-card { padding: 2rem; height: 100%; border-top: 4px solid var(--nd-blue); }
.mv-card.green { border-top-color: var(--nd-green); }
.mv-card.yellow { border-top-color: var(--nd-yellow); }

/* CTA */
.cta { background: linear-gradient(110deg, var(--nd-green-600), var(--nd-green) 60%, #3cc46f); border-radius: 24px; padding: 3rem; color: #fff; position: relative; overflow: hidden; }
.cta::after { content: ''; position: absolute; right: -40px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 30px solid rgba(242, 185, 42, .35); }
.cta h2 { color: #fff; }

/* Fiche produit */
.gallery-main { aspect-ratio: 1 / 1; border-radius: var(--nd-radius); background: #fff; border: 1px solid var(--nd-border); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.gallery-thumbs button { width: 74px; height: 74px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #fff; }
.gallery-thumbs button.active { border-color: var(--nd-blue); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qty-input { width: 150px; flex-wrap: nowrap; }
.qty-input .form-control { min-width: 50px; }
.stock-in { color: var(--nd-green-600); font-weight: 600; }
.stock-out { color: #b42318; font-weight: 600; }
.info-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.info-tile { display: flex; gap: .7rem; align-items: center; padding: .9rem; border-radius: 12px; background: var(--nd-bg); font-size: .85rem; }
.info-tile .bi { font-size: 1.3rem; color: var(--nd-blue); }

/* Panier / commande */
.cart-thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: #EEF2F7; }
.summary-card { position: sticky; top: 100px; }
.summary-row { display: flex; justify-content: space-between; padding: .45rem 0; }
.summary-total { border-top: 1px dashed var(--nd-border); margin-top: .5rem; padding-top: .9rem; font-weight: 800; font-size: 1.15rem; color: var(--nd-blue-900); }
.pay-option { border: 1.5px solid var(--nd-border); border-radius: 12px; padding: .85rem 1rem; cursor: pointer; display: flex; align-items: center; gap: .7rem; transition: all .2s; }
.pay-option:has(input:checked) { border-color: var(--nd-blue); background: rgba(27, 85, 144, .04); }

/* Contact */
.contact-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 0; border-bottom: 1px solid var(--nd-border); }
.contact-item:last-child { border-bottom: 0; }
.contact-icon { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(27, 85, 144, .08); color: var(--nd-blue); font-size: 1.25rem; }
.map-frame { width: 100%; height: 340px; border: 0; border-radius: var(--nd-radius); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Alertes flottantes */
.flash-zone { position: fixed; top: 90px; right: 20px; z-index: 1080; max-width: 380px; }
.flash-zone .alert { border: 0; border-radius: 14px; box-shadow: var(--nd-shadow-lg); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--nd-blue-900); color: rgba(255,255,255,.72); padding-top: 4.5rem; font-size: .93rem; }
.site-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 1.2rem; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: var(--nd-yellow); }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-brand img { height: 64px; background: #fff; border-radius: 14px; padding: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding: 1.3rem 0; font-size: .85rem; }
.footer-stripe { height: 5px; background: linear-gradient(90deg, var(--nd-blue) 0 33%, var(--nd-green) 33% 66%, var(--nd-yellow) 66% 100%); }
.social a { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); margin-right: .4rem; }
.social a:hover { background: var(--nd-green); color: #fff; }

.whatsapp-float { position: fixed; right: 22px; bottom: 22px; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; box-shadow: 0 10px 25px rgba(37, 211, 102, .4); z-index: 1050; }
.whatsapp-float:hover { color: #fff; transform: scale(1.06); }

/* Pagination */
.pagination { --bs-pagination-border-radius: 10px; --bs-pagination-color: var(--nd-blue); --bs-pagination-active-bg: var(--nd-blue); --bs-pagination-active-border-color: var(--nd-blue); gap: .3rem; }
.pagination .page-link { border-radius: 10px !important; }

/* Animations d'apparition */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }

@media (max-width: 991.98px) {
    .brand img { height: 44px; }
    .site-nav .navbar-collapse { padding: 1rem 0; }
    .site-nav .nav-link.active::after { display: none; }
    .section { padding: 4rem 0; }
    .summary-card { position: static; }
}
@media (max-width: 575.98px) {
    .brand-name small { display: none; }
    .hero .carousel-item { min-height: 520px; }
    .stats-band, .cta { padding: 2rem 1.5rem; }
}

/* Harmonisation Bootstrap 5.3 avec la charte */
:root { --bs-link-color-rgb: 27, 85, 144; --bs-link-hover-color-rgb: 22, 74, 126; --bs-focus-ring-color: rgba(27, 85, 144, .2); }
.btn-outline-primary { --bs-btn-color: #1B5590; --bs-btn-border-color: #1B5590; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #1B5590; --bs-btn-hover-border-color: #1B5590; --bs-btn-active-bg: #164A7E; --bs-btn-active-border-color: #164A7E; --bs-btn-active-color: #fff; }
.btn-primary { --bs-btn-active-bg: #0E2A4A; --bs-btn-active-border-color: #0E2A4A; --bs-btn-disabled-bg: #1B5590; --bs-btn-disabled-border-color: #1B5590; }
.btn-success { --bs-btn-active-bg: #1C9A4B; --bs-btn-active-border-color: #1C9A4B; --bs-btn-disabled-bg: #22B157; --bs-btn-disabled-border-color: #22B157; }
.form-check-input:checked { background-color: #1B5590; border-color: #1B5590; }
.form-check-input:focus { border-color: #1B5590; box-shadow: 0 0 0 .2rem rgba(27, 85, 144, .15); }
.form-switch .form-check-input:checked { background-color: #22B157; border-color: #22B157; }
.form-control, .form-select, .input-group-text { background-color: #fff; }
.bg-primary { background-color: #1B5590 !important; }
.text-primary { color: #1B5590 !important; }
.page-link { color: #1B5590; }
.page-item.active .page-link { background-color: #1B5590; border-color: #1B5590; }
.dropdown-item:active { background-color: #1B5590; }

@media (max-width: 767.98px) {
    .hero .carousel-control-prev, .hero .carousel-control-next { display: none; }
    .cat-scroll { flex-wrap: nowrap !important; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: none; }
    .cat-scroll::-webkit-scrollbar { display: none; }
    .cat-scroll .cat-pill { white-space: nowrap; }
}
