/* Boutique en ligne — vitrine publique.
   Palette reprise de l'identité déjà utilisée dans le back-office
   (variables --primary/--dark/--secondary vues dans login.html, produit.html…). */

:root {
    --bq-primary: #05BAFE;
    --bq-secondary: #38BDF8;
    --bq-dark: #0369A1;
    --bq-ink: #0f172a;
    --bq-muted: #64748b;
    --bq-bg: #f7fafc;
    --bq-border: #e2e8f0;
    --bq-success: #10b981;
    --bq-danger: #ef4444;
    --bq-gold: #fbbf24;
    --bq-radius: 18px;
}

body.boutique-body {
    background: var(--bq-bg);
    color: var(--bq-ink);
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

a { text-decoration: none; }

/* ===== Header ===== */
.bq-header {
    background: #ffffff;
    border-bottom: 1px solid var(--bq-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.bq-header .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--bq-dark);
}

.bq-header .navbar-brand img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 10px;
}

.bq-search {
    max-width: 420px;
}

.bq-search input {
    border-radius: 50px 0 0 50px;
    border: 1px solid var(--bq-border);
}

.bq-search button {
    border-radius: 0 50px 50px 0;
    background: var(--bq-primary);
    color: #fff;
    border: none;
    padding: 0 18px;
}

.bq-cart-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bq-bg);
    color: var(--bq-dark);
    font-size: 1.2rem;
}

.bq-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--bq-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ===== Hero ===== */
.bq-hero {
    background: linear-gradient(135deg, var(--bq-dark), var(--bq-primary) 70%, var(--bq-secondary));
    color: #fff;
    border-radius: 0 0 32px 32px;
    padding: 64px 0;
}

.bq-hero h1 {
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.bq-hero .btn-bq-primary {
    background: #fff;
    color: var(--bq-dark);
    font-weight: 700;
    border-radius: 50px;
    padding: 12px 30px;
    border: none;
}

/* ===== Sections ===== */
.bq-section-title {
    font-weight: 700;
    color: var(--bq-ink);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.bq-section-title i { color: var(--bq-primary); }

/* ===== Catégories ===== */
.bq-categorie-card {
    background: #fff;
    border: 1px solid var(--bq-border);
    border-radius: var(--bq-radius);
    padding: 20px 14px;
    text-align: center;
    color: var(--bq-ink);
    transition: all .25s ease;
    height: 100%;
}

.bq-categorie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(5, 186, 254, 0.15);
    border-color: var(--bq-primary);
}

.bq-categorie-card i {
    font-size: 1.8rem;
    color: var(--bq-primary);
    margin-bottom: 8px;
}

/* ===== Carte produit ===== */
.bq-carte-produit {
    background: #fff;
    border: 1px solid var(--bq-border);
    border-radius: var(--bq-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all .25s ease;
    position: relative;
}

.bq-carte-produit:hover {
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
    transform: translateY(-3px);
}

.bq-carte-produit .bq-image {
    aspect-ratio: 1 / 1;
    background: var(--bq-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bq-carte-produit .bq-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bq-carte-produit .bq-image i {
    font-size: 2.5rem;
    color: #cbd5e1;
}

.bq-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.bq-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    color: #fff;
}

.bq-badge-nouveau { background: var(--bq-dark); }
.bq-badge-promo { background: var(--bq-danger); }
.bq-badge-rupture { background: var(--bq-muted); }

.bq-carte-produit .bq-corps {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.bq-carte-produit .bq-nom {
    font-weight: 600;
    color: var(--bq-ink);
    font-size: 0.95rem;
    line-height: 1.3;
    min-height: 2.4em;
}

.bq-carte-produit .bq-categorie {
    font-size: 0.75rem;
    color: var(--bq-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bq-prix-actuel {
    font-weight: 700;
    color: var(--bq-dark);
    font-size: 1.05rem;
}

.bq-prix-barre {
    color: var(--bq-muted);
    text-decoration: line-through;
    font-size: 0.85rem;
    margin-left: 6px;
}

.bq-carte-produit .bq-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.btn-bq-primary, .btn-bq-outline {
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 14px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-bq-primary {
    background: var(--bq-primary);
    color: #fff;
    flex: 1;
}

.btn-bq-primary:hover { background: var(--bq-dark); color: #fff; }

.btn-bq-primary:disabled, .btn-bq-primary.disabled {
    background: var(--bq-border);
    color: var(--bq-muted);
    cursor: not-allowed;
}

.btn-bq-outline {
    background: #fff;
    border: 1px solid var(--bq-border);
    color: var(--bq-ink);
}

.btn-bq-outline:hover { border-color: var(--bq-primary); color: var(--bq-primary); }

/* ===== Filtres catalogue ===== */
.bq-filtres {
    background: #fff;
    border: 1px solid var(--bq-border);
    border-radius: var(--bq-radius);
    padding: 20px;
}

/* ===== Footer ===== */
.bq-footer {
    background: var(--bq-ink);
    color: #cbd5e1;
    padding: 48px 0 24px;
    margin-top: 64px;
}

.bq-footer h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 14px;
}

.bq-footer a { color: #cbd5e1; }
.bq-footer a:hover { color: #fff; }

.bq-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 10px 24px rgba(0,0,0,.2);
    z-index: 200;
}

@media (max-width: 767px) {
    .bq-hero { padding: 40px 0; border-radius: 0 0 20px 20px; }
    .bq-search { display: none; }
}

/* ===== Stock faible ===== */
.bq-badge-stock { background: #f59e0b; }
.bq-stock-faible { color: #b45309; font-weight: 600; }

/* ===== Galerie de la fiche produit ===== */
.bq-galerie-principale {
    border-radius: var(--bq-radius);
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 1px solid var(--bq-border);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.bq-galerie-principale img { width: 100%; height: 100%; object-fit: contain; }
.bq-galerie-principale i { font-size: 4rem; color: var(--bq-border); }
.bq-vignettes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bq-vignette {
    width: 68px; height: 68px;
    border-radius: 12px;
    border: 2px solid var(--bq-border);
    background: #fff;
    padding: 0; overflow: hidden; cursor: pointer;
}
.bq-vignette img { width: 100%; height: 100%; object-fit: cover; }
.bq-vignette.actif, .bq-vignette:hover { border-color: var(--bq-primary); }

/* ===== Notes et avis ===== */
.bq-etoiles { color: var(--bq-gold); letter-spacing: 1px; white-space: nowrap; }
.bq-etoiles .vide { color: var(--bq-border); }
.bq-avis { border-bottom: 1px solid var(--bq-border); padding: 14px 0; }
.bq-avis:last-child { border-bottom: none; }
.bq-choix-note { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
/* Radios masqués visuellement mais toujours atteignables au clavier (Tab puis flèches). */
.bq-choix-note input {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.bq-choix-note input:focus-visible + label { outline: 2px solid var(--bq-primary); outline-offset: 2px; border-radius: 4px; }
.bq-choix-note label { font-size: 1.6rem; color: var(--bq-border); cursor: pointer; line-height: 1; }
.bq-choix-note input:checked ~ label,
.bq-choix-note label:hover,
.bq-choix-note label:hover ~ label { color: var(--bq-gold); }

/* ===== Favori ===== */
.btn-bq-favori {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid var(--bq-border); background: #fff; color: var(--bq-muted);
    border-radius: 12px; padding: 8px 14px; font-weight: 600;
}
.btn-bq-favori.actif, .btn-bq-favori:hover { color: var(--bq-danger); border-color: var(--bq-danger); }

/* ===== Suivi de commande ===== */
.bq-frise { display: flex; justify-content: space-between; position: relative; margin: 10px 0 24px; }
.bq-frise::before {
    content: ""; position: absolute; top: 14px; left: 14px; right: 14px;
    height: 3px; background: var(--bq-border);
}
.bq-etape { position: relative; text-align: center; flex: 1; font-size: .78rem; color: var(--bq-muted); }
.bq-etape .pastille {
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 3px solid var(--bq-border);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 6px; position: relative;
}
.bq-etape.fait .pastille { background: var(--bq-success); border-color: var(--bq-success); color: #fff; }
.bq-etape.courant { color: var(--bq-ink); font-weight: 700; }
