/* ==========================================================================
   Boutique Fokale : complète la feuille du site (fokale.ch/assets/css/site.css)
   ========================================================================== */

/* --- En-tête : recherche, compte, panier --------------------------------- */
.b-entete .entete-int { gap: .8rem 1.2rem; flex-wrap: wrap; }
.b-recherche { display: flex; flex: 1 1 18rem; max-width: 32rem; order: 2; }
.b-recherche input { flex: 1; min-width: 0; padding: .65rem .9rem; border: 1px solid #cfc8d8; border-right: 0; border-radius: 99px 0 0 99px; font: inherit; font-size: 1rem; background: #fff; }
.b-recherche input:focus { outline: 2px solid var(--violet); outline-offset: -1px; }
.b-recherche button { border: 1px solid var(--violet); background: var(--violet); color: #fff; border-radius: 0 99px 99px 0; padding: 0 1rem; cursor: pointer; display: grid; place-items: center; }
.b-recherche.grande { max-width: 36rem; margin-top: 1.4rem; }
.b-recherche.grande input { padding: .9rem 1.2rem; font-size: 1.05rem; }
.b-recherche.grande .bouton { border-radius: 0 99px 99px 0; margin: 0; }
.b-outils { display: flex; gap: .4rem; order: 3; margin-left: auto; }
.b-outil { position: relative; display: flex; align-items: center; gap: .4rem; padding: .5rem .7rem; border-radius: 10px; color: var(--encre); text-decoration: none; font-size: .95rem; }
.b-outil:hover { background: var(--violet-pale); color: var(--violet); }
.b-outil span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-compteur { position: absolute; top: .1rem; left: 1.6rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 99px; background: var(--violet); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.b-entete .menu-bouton { order: 4; }
@media (max-width: 47.99rem) {
  .b-recherche { order: 5; flex-basis: 100%; max-width: none; }
  .b-outil span { display: none; }
}
.b-categories { max-width: var(--large); margin: 0 auto; padding: 0 1.2rem; }
@media (min-width: 62rem) {
  .b-categories { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--bord-clair); }
}
.b-lien-promo { color: #b4471b !important; font-weight: 600; }

/* --- Sections et grilles ------------------------------------------------- */
.b-section { max-width: var(--large); margin: 0 auto; padding: 2rem 1.2rem; }
.b-section h1 { margin-top: .4rem; }
.b-section-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.b-section-tete h2 { margin: 0 0 1rem; }
.b-heros { background: linear-gradient(135deg, var(--violet-pale), #fff 70%); border-bottom: 1px solid var(--bord-clair); }
.b-heros-int { max-width: var(--large); margin: 0 auto; padding: 3rem 1.2rem 2.6rem; }
.b-heros h1 { max-width: 40rem; }
.b-heros p { max-width: 38rem; color: var(--gris); font-size: 1.1rem; }
.b-grille { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
@media (min-width: 48rem) { .b-grille { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); } }
.b-grille-cat { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.b-cat { display: flex; flex-direction: column; text-decoration: none; color: var(--encre); background: #fff; border: 1px solid var(--bord-clair); border-radius: var(--rayon); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.b-cat:hover { box-shadow: var(--ombre); transform: translateY(-2px); color: var(--violet); }
.b-cat-image { aspect-ratio: 1; background: #fff; display: grid; place-items: center; padding: .8rem; }
.b-cat-image img { width: 100%; height: 100%; object-fit: contain; }
.b-cat-nom { font: 600 1.05rem/1.25 var(--police-titre); padding: .6rem .8rem 0; }
.b-cat-nb { font-size: .82rem; color: var(--gris); padding: .1rem .8rem .8rem; }

/* --- Carte article ------------------------------------------------------- */
.b-carte { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--bord-clair); border-radius: var(--rayon); padding: .8rem; transition: box-shadow .15s; }
.b-carte:hover { box-shadow: var(--ombre); }
.b-carte-lien { text-decoration: none; color: var(--encre); display: flex; flex-direction: column; flex: 1; }
.b-carte-image { aspect-ratio: 1; display: grid; place-items: center; margin-bottom: .6rem; }
.b-carte-image img { width: 100%; height: 100%; object-fit: contain; }
.b-carte-titre { font: 600 1rem/1.3 var(--police-texte); margin: 0 0 .4rem; }
.b-carte-lien:hover .b-carte-titre { color: var(--violet); }
.b-carte-prix { margin: auto 0 .1rem; }
.b-carte-prix strong { font-size: 1.15rem; color: var(--violet); }
.b-carte-prix del, .b-prix-avant del { color: var(--gris); font-size: .9rem; }
.b-badge { position: absolute; top: .7rem; left: .7rem; padding: .15rem .55rem; border-radius: 99px; background: #b4471b; color: #fff; font-size: .78rem; font-weight: 700; }
.b-bandeau { position: absolute; top: .7rem; right: .7rem; max-width: calc(100% - 5rem); padding: .15rem .55rem; border-radius: 6px; background: var(--vert); color: #fff; font-size: .74rem; font-weight: 700; line-height: 1.3; text-align: right; }
.b-bandeau-fiche { display: inline-block; margin: 0 0 .4rem; padding: .2rem .7rem; border-radius: 6px; background: var(--vert); color: #fff; font-size: .85rem; font-weight: 700; }
.b-badge.liquidation { background: var(--encre); }
.b-prix-avant .b-badge { position: static; margin-left: .4rem; }
.b-dispo { font-size: .82rem; margin: 0; color: var(--vert); }
.b-dispo.w { color: #8a5a00; }
.b-dispo.r { color: var(--gris); }

/* --- Liste : fil d'Ariane, sous-catégories, tri, pages ---------------------- */
.b-ariane { font-size: .88rem; color: var(--gris); }
.b-puces { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.b-puces a { display: inline-block; padding: .4rem .9rem; border: 1px solid var(--bord-clair); border-radius: 99px; background: #fff; text-decoration: none; color: var(--encre); }
.b-puces a:hover { border-color: var(--violet); color: var(--violet); }
.b-puces small { color: var(--gris); }
.b-tri { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin: 1rem 0 1.4rem; font-size: .95rem; }
.b-tri > span { margin-right: auto; color: var(--gris); }
.b-tri select { padding: .45rem .6rem; border: 1px solid #cfc8d8; border-radius: 8px; font: inherit; background: #fff; }
.b-case { display: flex; gap: .4rem; align-items: center; cursor: pointer; }
.b-case input { accent-color: var(--violet); width: 1.1rem; height: 1.1rem; }
.b-pages { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; justify-content: center; }
.b-pages a { min-width: 2.4rem; padding: .45rem .7rem; text-align: center; border: 1px solid var(--bord-clair); border-radius: 8px; text-decoration: none; background: #fff; }
.b-pages a[aria-current="page"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.b-texte { max-width: var(--mesure); margin-top: 2rem; }

/* --- Fiche article ------------------------------------------------------- */
.b-fiche-grille { display: grid; gap: 2rem; margin-top: 1rem; }
@media (min-width: 52rem) { .b-fiche-grille { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.b-galerie-principale { display: grid; place-items: center; aspect-ratio: 1; background: #fff; border: 1px solid var(--bord-clair); border-radius: var(--rayon); padding: 1rem; }
.b-galerie-principale img { width: 100%; height: 100%; object-fit: contain; }
.b-galerie-principale { cursor: zoom-in; touch-action: pan-y; user-select: none; }
.b-galerie-principale img { pointer-events: none; }

/* visionneuse : 95 % de la fenêtre */
.b-visionneuse { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 16, 26, .92); display: grid; place-items: center; animation: b-apparaitre .15s ease-out; }
@keyframes b-apparaitre { from { opacity: 0; } to { opacity: 1; } }
.b-vis-cadre { width: 95vw; height: 95vh; display: flex; align-items: center; justify-content: center; touch-action: pan-y; user-select: none; }
.b-vis-cadre img { max-width: 95vw; max-height: 95vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #fff; }
.b-visionneuse button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.b-visionneuse button:hover, .b-visionneuse button:focus-visible { background: rgba(255, 255, 255, .3); }
.b-vis-fermer { top: 1rem; right: 1rem; width: 2.8rem; height: 2.8rem; font-size: 2rem; line-height: 1; }
.b-vis-prec, .b-vis-suiv { top: 50%; transform: translateY(-50%); width: 3.2rem; height: 3.2rem; font-size: 2.4rem; line-height: 1; }
.b-vis-prec { left: 1rem; }
.b-vis-suiv { right: 1rem; }
.b-vis-compteur { position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%); margin: 0; color: #fff; font-size: .9rem; opacity: .8; }

.b-vignettes { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.b-vignettes button { width: 4.5rem; height: 4.5rem; padding: .2rem; border: 2px solid var(--bord-clair); border-radius: 8px; background: #fff; cursor: pointer; }
.b-vignettes button[aria-current="true"] { border-color: var(--violet); }
.b-vignettes img { width: 100%; height: 100%; object-fit: contain; }
.b-achat h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); }
.b-ref { font-size: .88rem; color: var(--gris); }
.b-prix-bloc { margin: 1.2rem 0; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--bord-clair); border-radius: var(--rayon); }
.b-prix-bloc p { margin: .15rem 0; }
.b-prix { font-size: 2rem; font-weight: 700; color: var(--violet); line-height: 1.1; }
.b-promo-fin { font-size: .88rem; color: #b4471b; font-weight: 600; }
.b-variantes { margin: 1rem 0; }
.b-variantes-titre { font-weight: 600; margin: 0 0 .4rem; }
.b-variantes ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.b-variantes a { display: inline-block; padding: .45rem .85rem; border: 1px solid #cfc8d8; border-radius: 8px; background: #fff; text-decoration: none; color: var(--encre); }
.b-variantes a:hover { border-color: var(--violet); }
.b-variantes a[aria-current="true"] { border: 2px solid var(--violet); font-weight: 600; }
.b-variantes a.indisponible { color: var(--gris); text-decoration: line-through; }
.b-ajout { display: flex; flex-wrap: wrap; gap: .8rem; align-items: stretch; margin: 1.2rem 0; }
.b-qte { display: inline-flex; border: 1px solid #cfc8d8; border-radius: 10px; overflow: hidden; background: #fff; }
.b-qte button { width: 2.6rem; border: 0; background: var(--violet-pale); color: var(--violet); font: 700 1.3rem/1 var(--police-texte); cursor: pointer; }
.b-qte input { width: 3.4rem; border: 0; text-align: center; font: 600 1.1rem var(--police-texte); -moz-appearance: textfield; }
.b-qte input::-webkit-inner-spin-button, .b-qte input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.b-qte.petite button { width: 2rem; font-size: 1.1rem; }
.b-qte.petite input { width: 2.6rem; font-size: 1rem; }
.b-ajouter { flex: 1 1 12rem; font-size: 1.1rem; }
.b-arguments { list-style: none; padding: 0; margin: 1rem 0 0; font-size: .92rem; color: var(--gris); }
.b-arguments li { padding-left: 1.6rem; position: relative; margin-bottom: .35rem; }
.b-arguments li::before { content: "✓"; position: absolute; left: 0; color: var(--vert); font-weight: 700; }
.b-details { display: grid; gap: 2rem; margin-top: 2.5rem; }
@media (min-width: 52rem) { .b-details { grid-template-columns: 1.2fr 1fr; } }
.b-details h2 { margin-top: 0; }
.b-technique { width: 100%; border-collapse: collapse; font-size: .95rem; }
.b-technique th, .b-technique td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--bord-clair); vertical-align: top; }
.b-technique th { width: 45%; color: var(--gris); font-weight: 500; }

/* --- Panier, commande, confirmation ---------------------------------------- */
.b-panier-grille, .b-commande-grille { display: grid; gap: 1.6rem; }
@media (min-width: 62rem) {
  .b-panier-grille { grid-template-columns: minmax(0, 1fr) 21rem; align-items: start; }
  .b-commande-grille { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; }
}
.b-ligne { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: .5rem 1rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--bord-clair); }
@media (min-width: 40rem) { .b-ligne { grid-template-columns: 5rem 1fr auto 6.5rem 2rem; } }
.b-ligne-image img { width: 4.5rem; height: 4.5rem; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--bord-clair); }
.b-ligne-texte { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.b-ligne-texte a { text-decoration: none; color: var(--encre); }
.b-ligne-texte small { color: var(--gris); }
.b-ligne-pu del { color: var(--gris); font-size: .85em; }
.b-ligne-total { font-weight: 700; text-align: right; white-space: nowrap; }
.b-ligne.indisponible { opacity: .6; }
.b-supprimer { border: 0; background: none; font-size: 1.5rem; color: var(--gris); cursor: pointer; line-height: 1; }
.b-supprimer:hover { color: var(--rouge); }
@media (max-width: 39.99rem) { .b-ligne .b-qte { grid-column: 2; } .b-ligne-total { grid-column: 3; } .b-supprimer { grid-column: 3; grid-row: 1; justify-self: end; } }
.b-resume { background: #fff; border: 1px solid var(--bord-clair); border-radius: var(--rayon); padding: 1.2rem; }
@media (min-width: 62rem) { .b-panier-grille .b-resume, .b-commande-grille .b-resume { position: sticky; top: 1rem; } }
.b-resume h2 { margin: 0 0 .8rem; font-size: 1.35rem; }
.b-resume dl { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; margin: 0 0 1rem; }
.b-resume dd { margin: 0; text-align: right; white-space: nowrap; }
.b-resume .b-total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--bord-clair); padding-top: .6rem; margin-top: .3rem; }
.b-resume-lignes { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .93rem; }
.b-resume-lignes li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--bord-clair); }
.b-resume-lignes li span:last-child { white-space: nowrap; }
.b-seuil { background: var(--vert-pale); color: var(--vert); padding: .6rem .8rem; border-radius: 8px; font-size: .92rem; font-weight: 600; }
.b-commander { width: 100%; font-size: 1.1rem; margin: .4rem 0 .8rem; }
.b-securite::before { content: "🔒 "; }
.b-commande .formulaire { padding: 1.4rem; }
.b-merci, .b-mes-commandes { max-width: 52rem; }
.b-commande-carte { background: #fff; border: 1px solid var(--bord-clair); border-radius: var(--rayon); padding: .9rem 1.1rem; margin-bottom: .7rem; }
.b-commande-carte summary { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; justify-content: space-between; cursor: pointer; }
.b-commande-carte[open] summary { margin-bottom: .8rem; }
.b-statut { font-size: .85rem; font-weight: 600; padding: .1rem .6rem; border-radius: 99px; background: var(--violet-pale); color: var(--violet); }
.b-statut.paid, .b-statut.delivered { background: var(--vert-pale); color: var(--vert); }
.b-statut.due { background: #fde9c8; color: #8a4b00; }

/* --- Labo et engagements ----------------------------------------------------- */
.b-labo { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; background: var(--violet-pale); border-radius: var(--rayon); margin: 1rem auto 2rem; padding: 1.6rem 1.8rem; }
.b-labo h2 { margin: 0 0 .3rem; }
.b-labo p { margin: 0; }
.b-garanties { max-width: var(--large); margin: 1rem auto 0; padding: 1.6rem 1.2rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); border-top: 1px solid var(--bord-clair); }
.b-garanties div { display: flex; flex-direction: column; gap: .15rem; }
.b-garanties span { font-size: .9rem; color: var(--gris); }

@media print {
  .b-garanties, .b-recherche, .b-outils, .b-categories { display: none !important; }
}
