/* ══════════════════════════════════════════════════════════════
   batteries-page.css — Page /pages/batteries.php
   (marine #003366 · bleu #004E89 · or #F7B801)
   Toutes les classes sont préfixées .bt- (aucun conflit avec header / navbar / footer)
   ══════════════════════════════════════════════════════════════ */
body { background: #f4f6fa !important; min-height: 100vh; }
body > * { position: relative; z-index: 1; }

/* Supprime l'espace entre la navbar et le hero */
main { padding: 0 !important; min-height: 0 !important; }

/* Masquer suivi commande sur desktop */
@media (min-width: 769px) {
    .nav-links .mobile-only-nav { display: none !important; }
}

.bt-main {
    --navy: #003366; --blue: #004E89; --gold: #F7B801; --gold-d: #E5A800;
    --ink: #1b2430; --muted: #5b6675; --line: #e3e8ef;
    --warn: #92400e; --warn-bg: #fef3c7; --bad: #991b1b; --bad-bg: #fee2e2;
    --radius: 16px;
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    padding-bottom: 3rem; max-width: 100%; overflow-x: clip;
}
.bt-main *, .bt-main *::before, .bt-main *::after { box-sizing: border-box; }
.bt-main img { opacity: 1 !important; max-width: 100%; }
.bt-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.bt-ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── HERO ── */
.bt-hero {
    background:
        radial-gradient(900px 380px at 88% -20%, rgba(247,184,1,.28), transparent 62%),
        radial-gradient(600px 300px at 0% 110%, rgba(0,114,201,.35), transparent 60%),
        linear-gradient(135deg, #002a52 0%, #004E89 100%);
    color: #fff;
    padding: 1.4rem 0 1.6rem;
}
.bt-hero h1 {
    font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.15;
    letter-spacing: -.01em; margin: 0 0 .5rem; color: #fff;
}
.bt-hero h1 span { color: var(--gold); }
.bt-hero p { max-width: 90ch; margin: 0; font-size: .95rem; line-height: 1.55; color: rgba(255,255,255,.84); }
.bt-hero p .bt-promo { color: #FFD60A; font-weight: 700; }

/* Bandeau « reprise de batterie usée » : carte blanche élégante, bien visible sur le hero bleu */
.bt-promo-card {
    display: inline-flex; align-items: center; gap: .85rem; max-width: 680px;
    margin-top: .2rem; padding: .85rem 1.2rem .85rem .95rem;
    background: #fff; border-radius: 14px; border-left: 5px solid var(--gold);
    box-shadow: 0 10px 28px rgba(0, 20, 50, .28), 0 2px 6px rgba(0, 20, 50, .12);
}
.bt-promo-ico {
    flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: #fff4cc; color: var(--navy);
}
.bt-promo-ico .bt-ico { width: 22px; height: 22px; stroke-width: 2.2; }
.bt-hero .bt-promo-card p { margin: 0; max-width: none; font-size: .98rem; line-height: 1.45; font-weight: 600; color: var(--navy); }
.bt-hero .bt-promo-card p strong { color: #D45500; font-weight: 800; }

/* ── BARRE DE CATÉGORIES ── */
.bt-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .9rem 1.2rem; margin: 1.8rem 0 .4rem;
}
.bt-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.bt-pill {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem;
    background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 999px;
    font-size: .82rem; font-weight: 700; text-decoration: none; cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.bt-pill b {
    display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
    background: #eef2f7; color: var(--blue); border-radius: 999px; font-size: .7rem; font-weight: 800;
}
.bt-pill:hover { border-color: var(--gold); background: #fffbea; }
.bt-pill:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── SECTIONS ── */
.bt-section { margin: 2.2rem 0 0; scroll-margin-top: 90px; }
.bt-section-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.bt-section-head h2 { margin: 0; font-size: 1.3rem; font-weight: 800; color: var(--navy); letter-spacing: -.005em; }
.bt-section-head .bt-count {
    font-size: .74rem; font-weight: 700; color: var(--blue); background: #e7f0f9; padding: .25rem .7rem; border-radius: 999px;
}
.bt-section-head::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(to right, var(--gold), rgba(247,184,1,0)); }

/* ── CARTES ── */
.bt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1.1rem; }
.bt-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; color: inherit;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
/* Survol uniquement sur vrais appareils à souris : évite le :hover "collant" sur iPhone après un tap */
@media (hover: hover) and (pointer: fine) {
    .bt-card:hover { transform: translateY(-4px); border-color: rgba(247,184,1,.8); box-shadow: 0 14px 32px rgba(0,51,102,.13); }
}
.bt-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* Image centrée de façon fiable (Safari iOS) : l'image est positionnée en absolu dans un cadre à ratio fixe */
.bt-card-media {
    --bt-pad: 1rem;
    position: relative; aspect-ratio: 4 / 3; padding: 0; overflow: hidden;
    background: #fff; border-bottom: 1px solid #eef1f5;
}
.bt-main .bt-card-media img {
    position: absolute; top: var(--bt-pad); left: var(--bt-pad); right: var(--bt-pad); bottom: var(--bt-pad);
    width: calc(100% - 2 * var(--bt-pad)); height: calc(100% - 2 * var(--bt-pad));
    max-width: none; margin: 0; display: block;
    object-fit: contain; object-position: center center;
    transition: transform .3s ease;
}
@media (hover: hover) and (pointer: fine) {
    .bt-card:hover .bt-card-media img { transform: scale(1.05); }
}
.bt-badge {
    position: absolute; top: .65rem; left: .65rem; z-index: 1;
    font-size: .66rem; font-weight: 800; letter-spacing: .03em; padding: .25rem .6rem; border-radius: 999px;
}
.bt-badge--low { color: var(--warn); background: var(--warn-bg); }
.bt-badge--out { color: var(--bad);  background: var(--bad-bg); }
.bt-card-body { display: flex; flex-direction: column; gap: .55rem; padding: .95rem 1rem 1rem; flex: 1; }
.bt-card-name {
    margin: 0; font-size: .86rem; font-weight: 700; line-height: 1.4; color: var(--navy);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.6em;
}
.bt-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.bt-chip {
    font-size: .68rem; font-weight: 700; color: var(--blue); background: #eaf2fa;
    border-radius: 6px; padding: .2rem .5rem; white-space: nowrap;
}
.bt-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .35rem; }
.bt-price {
    font-size: 1.3rem; font-weight: 800; color: #D45500; white-space: nowrap; line-height: 1.1;
    letter-spacing: -.2px; font-variant-numeric: tabular-nums;
}
.bt-price small { font-size: .7rem; font-weight: 800; color: #D45500; opacity: .85; margin-left: 3px; letter-spacing: .3px; }
.bt-go {
    width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
    background: var(--gold); color: #1a1a1a; transition: transform .2s ease, background .2s ease;
}
.bt-card:hover .bt-go { background: var(--gold-d); transform: translateX(3px); }
.bt-go .bt-ico { width: 18px; height: 18px; stroke-width: 2.5; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .bt-hero { padding: 1rem 0 1.1rem; }
    .bt-hero p { font-size: .88rem; line-height: 1.5; }
    .bt-hero h1 { margin-bottom: .75rem; text-align: center; text-wrap: balance; }
    .bt-promo-card { display: flex; gap: .7rem; padding: .75rem .9rem .75rem .75rem; max-width: 100%; }
    .bt-promo-ico { width: 38px; height: 38px; }
    .bt-hero .bt-promo-card p { font-size: .88rem; }
    .bt-toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; margin: 1.2rem 0 .2rem; }
    .bt-pills { width: 100%; max-width: 100%; min-width: 0; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .bt-pills::-webkit-scrollbar { display: none; }
    .bt-pill { flex: 1 1 auto; justify-content: center; padding: 0 .6rem; gap: .35rem; font-size: .8rem; white-space: nowrap; }
    .bt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .bt-card-media { --bt-pad: .7rem; aspect-ratio: 1 / 1; }
    .bt-card-body { padding: .75rem .75rem .85rem; gap: .45rem; }
    .bt-card-name { font-size: .78rem; }
    .bt-card-foot { gap: .4rem; }
    .bt-price { font-size: 1.12rem; min-width: 0; }
    .bt-price small { display: block; margin: 3px 0 0; font-size: .62rem; }
    .bt-go { width: 36px; height: 36px; flex: 0 0 36px; }
    .bt-card:hover .bt-go { transform: none; }
    .bt-section-head h2 { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .bt-card, .bt-card-media img, .bt-go, .bt-pill { transition: none !important; }
    .bt-card:hover, .bt-card:hover .bt-card-media img, .bt-card:hover .bt-go { transform: none !important; }
}

/* ══════════════════════════════════════════════════════════════
   HERO — 3 formules livraison / montage / reprise (illustrations SVG)
   (remplace l'ancien bandeau .bt-promo-card, désormais inutilisé)
   ══════════════════════════════════════════════════════════════ */
.bt-hero { padding: 1.6rem 0 2rem; }
.bt-hero .bt-hero-sub {
    display: flex; align-items: center; gap: .5rem; max-width: none;
    margin: 0 0 1.2rem; font-size: .95rem; font-weight: 600; color: rgba(255,255,255,.9);
}
.bt-hero .bt-hero-sub .bt-ico { color: var(--gold); width: 18px; height: 18px; }

.bt-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.bt-offer {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    background: #fff; color: var(--ink); border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(0, 20, 50, .28), 0 2px 6px rgba(0, 20, 50, .12);
}
.bt-offer--best { box-shadow: 0 0 0 3px var(--gold), 0 14px 34px rgba(0, 20, 50, .34); }
.bt-offer-flag {
    position: absolute; top: .65rem; left: .65rem; z-index: 2;
    background: var(--gold); color: #1a1a1a; font-size: .68rem; font-weight: 800; letter-spacing: .03em;
    padding: .28rem .7rem; border-radius: 999px;
}
.bt-offer-num {
    position: absolute; top: .65rem; right: .65rem; z-index: 2;
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: var(--navy); color: #fff; font-size: .82rem; font-weight: 800;
}
.bt-offer-art { background: #eaf3fb; line-height: 0; }
.bt-offer-art svg { display: block; width: 100%; height: auto; }
.bt-offer-body { display: flex; flex-direction: column; gap: .65rem; flex: 1; padding: .95rem 1.05rem 1.1rem; }
.bt-hero .bt-offer-title { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.25; color: var(--navy); letter-spacing: -.005em; }
.bt-offer-lines { list-style: none; margin: 0; padding: 0; }
.bt-offer-lines li {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    padding: .42rem 0; border-bottom: 1px dashed var(--line);
    font-size: .84rem; font-weight: 600; color: var(--muted);
}
.bt-offer-lines li:last-child { border-bottom: 0; }
.bt-tag { font-size: .72rem; font-weight: 800; padding: .24rem .65rem; border-radius: 999px; white-space: nowrap; }
.bt-tag--base { background: #e7f0f9; color: var(--blue); }
.bt-tag--free { background: #dcfce7; color: #166534; }
.bt-tag--pay  { background: #fff1e0; color: #b45309; }
.bt-tag--none { background: #eef1f5; color: #64748b; }
.bt-offer-note { margin-top: auto; font-size: .78rem; line-height: 1.45; font-weight: 500; color: var(--muted); }

/* Tablette / mobile : les 3 cartes défilent horizontalement (snap) pour garder le hero compact */
@media (max-width: 860px) {
    .bt-hero { padding: 1rem 0 1.2rem; }
    .bt-hero .bt-hero-sub { justify-content: center; text-align: left; font-size: .86rem; margin-bottom: .9rem; }
    .bt-offers {
        display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory;
        margin: 0 -1rem; padding: .4rem 1rem 1rem; scroll-padding: 0 1rem;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .bt-offers::-webkit-scrollbar { display: none; }
    .bt-offer { flex: 0 0 82%; max-width: 340px; scroll-snap-align: center; }
}

/* ── Hero : cartes plus compactes ── */
.bt-hero { padding: 1.2rem 0 1.5rem; }
.bt-hero .bt-hero-sub { margin-bottom: .9rem; }
.bt-offers { gap: .9rem; }
.bt-offer-body { gap: .4rem; padding: .6rem .9rem .8rem; }
.bt-hero .bt-offer-title { font-size: .95rem; }
.bt-offer-lines li { padding: .26rem 0; font-size: .8rem; }
.bt-tag { font-size: .68rem; padding: .18rem .55rem; }
.bt-offer-note { font-size: .72rem; line-height: 1.35; }
.bt-offer-num { width: 24px; height: 24px; font-size: .74rem; top: .5rem; right: .5rem; }
.bt-offer-flag { top: .5rem; left: .5rem; font-size: .64rem; padding: .22rem .6rem; }
@media (max-width: 860px) {
    .bt-hero { padding: .9rem 0 1rem; }
    .bt-offers { padding-bottom: .7rem; }
}

/* ── Hero desktop : illustration à gauche, texte à droite (gain de hauteur) ──
   Au-dessous de 1100px on garde la carte verticale / le carrousel existant. */
@media (min-width: 1100px) {
    .bt-offer { flex-direction: row; align-items: stretch; }
    .bt-offer-art { flex: 0 0 38%; display: flex; align-items: center; background: linear-gradient(to bottom, #eaf3fb 50%, #d2e1ef 50%); }
    .bt-offer-art svg { width: 100%; height: auto; }
    .bt-offer-body { flex: 1 1 0; min-width: 0; padding: .45rem .7rem .5rem .75rem; gap: .2rem; justify-content: center; }
    .bt-hero .bt-offer-title { padding-right: 1.9rem; font-size: .9rem; }
    .bt-offer-lines li { flex-wrap: wrap; gap: .1rem .4rem; padding: .18rem 0; font-size: .76rem; }
    .bt-offer-lines li .bt-tag { margin-left: auto; font-size: .66rem; }
    .bt-offer-flag { max-width: calc(38% - .9rem); white-space: normal; line-height: 1.15; border-radius: 10px; }
}
