/* =====================================================================
   KOFANAG MS — Site public (identité du flyer : bordeaux, orange, rouge, noir)
   ===================================================================== */
:root {
    --k-wine: #A80000; --k-wine-dark: #7a0000; --k-red: #FF3131; --k-orange: #FFA500; --k-black: #141414; --k-blue: #1E5175;
    --k-cream: #fff7ec; --k-bg: #ffffff; --k-muted: #6f6762; --k-border: #efe6df;
    --bs-primary: #A80000; --bs-primary-rgb: 168, 0, 0; --bs-link-color: #A80000; --bs-link-hover-color: #7a0000; --bs-link-color-rgb: 168, 0, 0;
    --bs-body-font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --bs-body-color: #1f1b19;
}
body.site { background: var(--k-bg); }
a { text-decoration: none; }
.btn { border-radius: 999px; font-weight: 600; padding: .6rem 1.35rem; }
.btn-sm { padding: .35rem .9rem; }
.btn-primary { --bs-btn-bg: var(--k-wine); --bs-btn-border-color: var(--k-wine); --bs-btn-hover-bg: var(--k-wine-dark); --bs-btn-hover-border-color: var(--k-wine-dark); --bs-btn-active-bg: #5e0000; }
.btn-outline-primary { --bs-btn-color: var(--k-wine); --bs-btn-border-color: var(--k-wine); --bs-btn-hover-bg: var(--k-wine); --bs-btn-hover-border-color: var(--k-wine); }
.btn-accent { background: var(--k-orange); color: #1a1a1a; border: 0; }
.btn-accent:hover { background: #ffb733; color: #000; }
.text-wine { color: var(--k-wine) !important; }
.text-orange { color: #e08e00 !important; }
.form-control, .form-select { border-radius: 12px; padding: .62rem .9rem; }
.form-control:focus, .form-select:focus { border-color: #d98080; box-shadow: 0 0 0 .2rem rgba(168, 0, 0, .12); }
.form-check-input:checked { background-color: var(--k-wine); border-color: var(--k-wine); }
.req::after { content: ' *'; color: var(--k-red); }
.form-label { font-weight: 500; font-size: .88rem; }

/* Barre supérieure + navigation */
.topbar-site { background: var(--k-black); color: #d9d2cc; font-size: .8rem; position: relative; z-index: 1035; }
.topbar-site a { color: #d9d2cc; } .topbar-site a:hover { color: var(--k-orange); }
.navbar-site { background: #fff; box-shadow: 0 2px 18px rgba(0, 0, 0, .05); }
.navbar-site .navbar-brand img { height: 46px; }
.navbar-site .nav-link { font-weight: 500; color: #2a2522; padding: .5rem .8rem !important; border-radius: 999px; }
.navbar-site .nav-link:hover, .navbar-site .nav-link.active { color: var(--k-wine); background: #fbf0ef; }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; background:
    radial-gradient(circle at 12% 20%, rgba(255, 165, 0, .35) 0, transparent 28%),
    radial-gradient(circle at 90% 85%, rgba(255, 49, 49, .45) 0, transparent 30%),
    linear-gradient(135deg, #8d0000 0%, #A80000 45%, #5c0000 100%); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .13) 1.5px, transparent 1.6px); background-size: 22px 22px; mask-image: linear-gradient(90deg, #000 0%, transparent 70%); }
.hero .container { position: relative; }
.hero h1 { font-weight: 800; text-transform: uppercase; line-height: 1.02; letter-spacing: -.01em; font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
.hero h1 .hl { color: var(--k-orange); display: inline-block; }
.hero .lead { color: #ffe9e0; max-width: 560px; }
.hero-badges .badge-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 7px 14px; font-size: .85rem; margin: 0 6px 8px 0; }
.hero-visual { position: relative; max-width: 430px; margin: auto; }
.hero-visual img { width: 100%; border-radius: 26px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); transform: rotate(2.5deg); border: 6px solid #fff; }
.hero-visual .stamp { position: absolute; left: -22px; bottom: 34px; background: var(--k-orange); color: #1a1a1a; border-radius: 18px; padding: 12px 16px; font-weight: 700; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); transform: rotate(-4deg); line-height: 1.15; }
.hero-visual .stamp small { display: block; font-weight: 500; font-size: .72rem; }

/* Sections */
.section { padding: 72px 0; }
.section-cream { background: var(--k-cream); }
.section-title { font-weight: 800; letter-spacing: -.01em; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--k-wine); }
.feature { background: #fff; border: 1px solid var(--k-border); border-radius: 22px; padding: 24px; height: 100%; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(120, 30, 0, .1); }
.feature .ico { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--k-orange), var(--k-red)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 14px; }
.cat-chip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--k-border); border-radius: 18px; color: inherit; height: 100%; transition: all .2s; }
.cat-chip i { font-size: 1.4rem; color: var(--k-wine); }
.cat-chip:hover { border-color: var(--k-wine); color: var(--k-wine); box-shadow: 0 8px 22px rgba(168, 0, 0, .08); }

/* Cartes produits */
.p-card { background: #fff; border: 1px solid var(--k-border); border-radius: 22px; overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.p-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(60, 20, 0, .12); }
.p-card .img { aspect-ratio: 1; background: #fff; position: relative; overflow: hidden; border-bottom: 1px solid var(--k-border); }
.p-card .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .45s ease; }
.p-card .img img.alt { opacity: 0; }
.p-card:hover .img img.main { transform: scale(1.06); }
@media (hover: hover) { .p-card:hover .img img.alt { opacity: 1; } .p-card:hover .img img.main:has(+ img.alt) { opacity: 0; } }
.p-card .tags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 1; }
.tag { background: #fff; border-radius: 999px; padding: 3px 10px; font-size: .72rem; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tag.out { background: #333; color: #fff; }
.tag.promo { background: var(--k-red); color: #fff; font-weight: 800; letter-spacing: .02em; }
.p-card .old { color: #9b918b; font-size: .85rem; }
.p-card .body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.p-card .cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--k-muted); }
.p-card h3 { font-size: .95rem; font-weight: 600; margin: 4px 0 6px; color: #1f1b19; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.p-card .price { font-size: 1.15rem; font-weight: 800; color: var(--k-wine); }
.p-card .credit { font-size: .8rem; color: var(--k-muted); background: var(--k-cream); border-radius: 12px; padding: 8px 10px; margin: 10px 0 12px; }
.p-card .credit b { color: #1f1b19; }

/* Étapes */
.step { position: relative; padding: 22px 22px 22px 76px; background: #fff; border-radius: 20px; border: 1px solid var(--k-border); height: 100%; }
.step .n { position: absolute; left: 20px; top: 20px; width: 42px; height: 42px; border-radius: 50%; background: var(--k-wine); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Simulateur */
.simu { background: var(--k-black); color: #fff; border-radius: 28px; padding: 34px; position: relative; overflow: hidden; }
.simu::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 165, 0, .45), transparent 70%); }
.simu .form-control { background: #2a2522; border-color: #3a332f; color: #fff; font-size: 1.3rem; font-weight: 700; }
.simu .res { background: #221d1a; border-radius: 18px; padding: 18px; }
.simu .res .row-line { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #3d3530; font-size: .92rem; }
.simu .res .row-line:last-child { border: 0; }
.simu .big { color: var(--k-orange); font-weight: 800; font-size: 1.6rem; }

.pay-logos img { height: 58px; border-radius: 14px; box-shadow: 0 6px 16px rgba(0, 0, 0, .08); }
.cta-band { background: linear-gradient(120deg, var(--k-orange), #ff7a1a 50%, var(--k-red)); color: #1a1a1a; border-radius: 28px; padding: 38px; }
.page-hero { background: linear-gradient(135deg, #8d0000, #A80000 55%, #5c0000); color: #fff; padding: 46px 0 40px; }
.page-hero h1 { font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.page-hero .breadcrumb a { color: #ffd9b0; } .page-hero .breadcrumb { --bs-breadcrumb-divider-color: #ffd9b0; --bs-breadcrumb-item-active-color: #fff; margin: 0; }
.content-card { background: #fff; border: 1px solid var(--k-border); border-radius: 22px; padding: 28px; }
.table-k thead th { background: var(--k-wine); color: #fff; font-weight: 600; font-size: .85rem; }
.table-k td { font-size: .9rem; }
.gallery-main { position: relative; border-radius: 24px; overflow: hidden; background: #fff; border: 1px solid var(--k-border); aspect-ratio: 1; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease-out, opacity .25s ease; transform-origin: center; }
.gallery-main.zooming img { transform: scale(2); }
.gallery-main img.swap { opacity: 0; }
.gallery-main .tag { position: absolute; top: 14px; left: 14px; font-size: .9rem; }
.gallery-thumbs { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.thumb-btn { flex: 0 0 auto; width: 80px; height: 80px; padding: 0; border-radius: 14px; border: 2px solid var(--k-border); background: #fff; overflow: hidden; scroll-snap-align: start; transition: border-color .2s; }
.thumb-btn img { width: 100%; height: 100%; object-fit: contain; }
.thumb-btn.active, .thumb-btn:hover { border-color: var(--k-wine); }
.plan-card { border: 2px solid var(--k-border); border-radius: 20px; padding: 18px; background: #fff; }
.plan-card.best { border-color: var(--k-orange); background: var(--k-cream); }
.accordion-button:not(.collapsed) { color: var(--k-wine); background: #fbf0ef; box-shadow: none; }
.accordion-item { border-radius: 16px !important; overflow: hidden; border: 1px solid var(--k-border); margin-bottom: 10px; }
footer.site-footer { background: var(--k-black); color: #bdb5af; }
footer.site-footer .text-warning { color: var(--k-orange) !important; }
footer.site-footer a { color: #e7e0da; } footer.site-footer a:hover { color: var(--k-orange); }
footer.site-footer .logo-box { background: #fff; border-radius: 16px; padding: 10px; display: inline-block; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); z-index: 1000; }
.wa-float:hover { color: #fff; transform: scale(1.06); }
/* En-tête marketplace : recherche, langues, rayons */
.header-site { z-index: 1030; background: #fff; box-shadow: 0 2px 18px rgba(0, 0, 0, .06); }
.header-site .navbar-site { box-shadow: none; padding-top: .55rem; padding-bottom: .55rem; }
.site-search { max-width: 560px; position: relative; }
.site-search .form-control { border-radius: 999px 0 0 999px; border-right: 0; background: #faf7f4; }
.site-search .btn { border-radius: 0 999px 999px 0; padding-left: 1.1rem; padding-right: 1.2rem; }
.nav-strip { background: var(--k-wine); }
.nav-strip .main-nav { gap: 2px; }
.nav-strip .nav-link { color: #ffe3dc; font-weight: 500; font-size: .9rem; padding: .6rem .85rem !important; border-radius: 0; }
.nav-strip .nav-link:hover, .nav-strip .nav-link.active { color: #fff; background: rgba(255, 255, 255, .12); }
.btn-rayons { background: rgba(0, 0, 0, .22); color: #fff; border-radius: 0; padding: .6rem 1.1rem; font-size: .9rem; margin-right: 8px; }
.btn-rayons:hover, .btn-rayons.show { background: rgba(0, 0, 0, .35); color: #fff; }
.nav-strip .dropdown-menu { border-radius: 0 0 16px 16px; min-width: 270px; border: 0; padding: 8px; }
.nav-strip .dropdown-item { border-radius: 10px; padding: .5rem .75rem; }
.nav-strip .chip { background: rgba(255, 255, 255, .12); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: .82rem; display: inline-flex; gap: 6px; align-items: center; }
@media (min-width: 992px) { .nav-strip #nav { display: flex !important; } }
.lang-switch .btn-link { color: #d9d2cc; text-decoration: none; font-size: .8rem; font-weight: 600; }
.lang-switch .btn-link:hover { color: var(--k-orange); }
.lang-switch .dropdown-item.active, .lang-switch .dropdown-item:active { background: var(--k-wine); }
.flag { font-size: 1.05em; line-height: 1; }
.link-more { font-weight: 600; color: var(--k-wine); }
.link-more:hover { text-decoration: underline; }

/* Rayons */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 575.98px) { .cat-tile { padding: 10px 6px 8px; border-radius: 16px; } .cat-tile .name { font-size: .74rem; } .cat-tile .count { font-size: .68rem; } .cat-tile i { font-size: 2rem; padding: 14px 0; } }
@media (min-width: 576px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(10, 1fr); } .cat-tile .name { font-size: .8rem; } }
.cat-tile { background: #fff; border: 1px solid var(--k-border); border-radius: 20px; padding: 14px 12px 12px; text-align: center; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.cat-tile img { width: 100%; max-width: 120px; height: auto; aspect-ratio: 1; object-fit: contain; transition: transform .3s; border-radius: 14px; }
.cat-tile i { font-size: 2.6rem; color: var(--k-wine); padding: 26px 0; }
.cat-tile .name { font-weight: 600; font-size: .86rem; line-height: 1.25; }
.cat-tile .count { font-size: .74rem; color: var(--k-muted); }
.cat-tile:hover { transform: translateY(-3px); border-color: var(--k-wine); box-shadow: 0 12px 26px rgba(168, 0, 0, .1); color: var(--k-wine); }
.cat-tile:hover img { transform: scale(1.06); }

/* Bonnes affaires */
.deals-band { background: linear-gradient(120deg, #7a0000, var(--k-wine) 45%, #d6131b); border-radius: 28px; padding: 26px; }
.deals-band .p-card { border: 0; }
.h-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.h-scroll .h-item { scroll-snap-align: start; min-width: 0; }
@media (min-width: 1200px) { .h-scroll { grid-auto-columns: calc((100% - 64px) / 5); } }

/* Catalogue */
.filter-card { background: #fff; border: 1px solid var(--k-border); border-radius: 20px; padding: 18px; position: sticky; top: 160px; }
.cat-list .list-group-item { border: 0; border-radius: 10px !important; padding: .45rem .6rem; font-size: .88rem; }
.cat-list .list-group-item.active { background: var(--k-wine); }

/* Fiche produit */
.price-box { background: var(--k-cream); border-radius: 18px; padding: 14px 18px; }
.perks li { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.perks i { color: var(--k-wine); font-size: 1.1rem; }
@media (max-width: 575.98px) { .buy-bar { position: sticky; bottom: 0; background: #fff; padding: 10px 0; z-index: 5; box-shadow: 0 -8px 16px rgba(0, 0, 0, .06); } .buy-bar .btn-lg { font-size: 1rem; } }

/* Réassurance, paiement */
.trust-bar { background: #fff; border-top: 1px solid var(--k-border); padding: 26px 0; margin-top: 40px; }
.trust-bar i { font-size: 1.9rem; color: var(--k-wine); }
.pay-band { background: #fff; border: 1px solid var(--k-border); border-radius: 28px; padding: 30px; box-shadow: 0 10px 30px rgba(60, 20, 0, .05); }
.pay-mini img { border-radius: 10px; background: #fff; }
.pay-card { border: 2px solid var(--k-border); border-radius: 18px; padding: 14px; cursor: pointer; display: flex; gap: 12px; align-items: center; transition: border-color .2s, background .2s; }
.pay-card:hover { border-color: #e6b3b3; }
.btn-check:checked + .pay-card { border-color: var(--k-wine); background: #fff6f4; }
.pay-card img { width: 44px; height: 44px; border-radius: 12px; }
.pay-status { width: 84px; height: 84px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 2.6rem; }

/* Apparition progressive des images */
img[loading="lazy"] { transition: opacity .4s ease; }
img.is-loading { opacity: 0; }

@media (max-width: 991.98px) { .section { padding: 52px 0; } .hero-visual { max-width: 320px; margin-top: 26px; } .navbar-site .navbar-brand img { height: 40px; } }
@media (max-width: 575.98px) { .simu, .cta-band { padding: 24px; border-radius: 22px; } .hero-visual .stamp { left: 0; } }
