/* Vitrine publique — mobile d'abord. Les couleurs viennent de la boutique (/api/vitrine). */
:root {
  --principale: #3D1A2C;
  --secondaire: #B5486E;
  --creme: #FBF7F2;
  --encre: #2A2028;
  --doux: #6B5D63;
  --ligne: #E9DFD4;
  --ok: #4F8A5B;
  --danger: #B5423C;
  --rayon: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background: var(--creme);
  color: var(--encre);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 90px;
}
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.entete {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ligne);
}
.marque { cursor: pointer; display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--principale); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.nom { font-weight: 800; font-size: 18px; color: var(--principale); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-panier {
  position: relative; border: 0; background: none; color: var(--principale);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
.btn-panier svg { width: 26px; height: 26px; }
.pastille {
  position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 99px; background: var(--secondaire); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

main { max-width: 980px; margin: 0 auto; padding: 14px 16px; }
.chargement, .vide { text-align: center; color: var(--doux); padding: 40px 0; }
.banniere { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; border-radius: var(--rayon); margin: 0 0 14px; }
.accueil {
  margin: 0 0 14px; padding: 12px 14px; border-radius: var(--rayon);
  background: color-mix(in srgb, var(--secondaire) 12%, white); color: var(--principale); font-weight: 600;
}
.recherche input {
  width: 100%; padding: 12px 16px; border-radius: 99px; border: 1px solid var(--ligne);
  background: #fff; font-size: 16px; outline: none;
}
.recherche input:focus { border-color: var(--secondaire); }
.filtres { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.filtres::-webkit-scrollbar { display: none; }
.filtre {
  flex: none; border: 1px solid var(--ligne); background: #fff; color: var(--encre);
  padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 600;
}
.filtre.actif { background: var(--principale); border-color: var(--principale); color: #fff; }

.grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
@media (min-width: 640px) { .grille { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } }
.carte {
  background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--ligne);
  display: flex; flex-direction: column; text-align: left; padding: 0; color: inherit;
}
.visuel {
  aspect-ratio: 1 / 1; width: 100%; background: color-mix(in srgb, var(--secondaire) 10%, white);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.visuel img { width: 100%; height: 100%; object-fit: cover; }
.visuel .initiale { font-size: 32px; font-weight: 800; color: color-mix(in srgb, var(--principale) 55%, white); }
.etiquette {
  position: absolute; top: 4px; left: 4px; padding: 2px 6px; border-radius: 99px;
  font-size: 9px; font-weight: 700; color: #fff; background: var(--secondaire);
}
.etiquette.epuise { background: rgba(42, 32, 40, 0.75); }
.infos { padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.infos .titre { font-weight: 700; font-size: 12.5px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prix { font-weight: 800; color: var(--principale); font-size: 14px; }
.prix s { color: var(--doux); font-weight: 500; font-size: 10px; margin-left: 3px; display: block; }
.ajouter {
  margin-top: auto; border: 0; border-radius: 8px; padding: 8px 2px; font-size: 12px; font-weight: 700;
  background: var(--principale); color: #fff;
}
.ajouter:disabled { background: var(--ligne); color: var(--doux); cursor: default; }

.ferme { text-align: center; padding: 70px 10px; }
.ferme-ic { font-size: 54px; }
.ferme h1 { color: var(--principale); font-size: 24px; }
.ferme p { color: var(--doux); }

.pied { text-align: center; color: var(--doux); font-size: 12px; padding: 24px 16px; }

.barre-panier {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20;
  max-width: 560px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  border: 0; border-radius: 16px; padding: 16px 18px;
  background: var(--principale); color: #fff; font-size: 15px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.voile {
  position: fixed; inset: 0; z-index: 30; background: rgba(20, 12, 18, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
}
.feuille {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  animation: monte 0.22s ease-out;
}
@media (min-width: 640px) { .voile { align-items: center; } .feuille { border-radius: 22px; } }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.feuille-haut { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.feuille-haut h2 { margin: 0; font-size: 20px; }
.fermer { border: 0; background: #F3ECE5; width: 36px; height: 36px; border-radius: 99px; font-size: 18px; }
.fiche-visuel { border-radius: var(--rayon); aspect-ratio: 1 / 1; margin-bottom: 14px; }
.fiche-desc { color: var(--doux); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; margin-top: 4px; }
.fiche-titre { font-size: 15px; margin: 16px 0 0; }
/* Galerie de plusieurs photos : défilement interne seulement (overscroll contenu), la page ne bouge pas. */
.galerie {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  border-radius: var(--rayon); scrollbar-width: none; width: 100%;
}
.galerie::-webkit-scrollbar { display: none; }
.galerie .visuel { flex: 0 0 100%; aspect-ratio: 1 / 1; scroll-snap-align: center; border-radius: 0; }
.galerie-points { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.galerie-points span { width: 7px; height: 7px; border-radius: 99px; background: var(--ligne); transition: 0.2s; }
.galerie-points span.actif { background: var(--principale); width: 18px; }
.galerie-vignettes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.galerie-vignettes button { width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; opacity: 0.6; }
.galerie-vignettes button.actif { border-color: var(--principale); opacity: 1; }
.galerie-vignettes img { width: 100%; height: 100%; object-fit: cover; display: block; }

.quantite { display: inline-flex; align-items: center; border: 1px solid var(--ligne); border-radius: 12px; }
.quantite button { border: 0; background: none; width: 40px; height: 40px; font-size: 20px; color: var(--principale); }
.quantite span { min-width: 28px; text-align: center; font-weight: 700; }
.ligne-action { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.btn-principal {
  flex: 1; border: 0; border-radius: 14px; padding: 15px; font-weight: 800; font-size: 16px;
  background: var(--principale); color: #fff;
}
.btn-principal:disabled { opacity: 0.6; }

.article { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.article .mini { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.article .mini .initiale { font-size: 22px; }
.article .txt { flex: 1; min-width: 0; }
.article .txt div:first-child { font-weight: 700; }
.article .txt div:last-child { color: var(--doux); font-size: 14px; }
.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; padding: 16px 0 6px; }
.note { color: var(--doux); font-size: 13px; line-height: 1.45; }

.champ { margin-bottom: 12px; }
.champ label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.champ input, .champ select, .champ textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--ligne); border-radius: 12px;
  font-size: 16px; font-family: inherit; background: #fff; outline: none;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--secondaire); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.erreur { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 18px; margin: 4px 0 8px; }

.merci { text-align: center; padding: 16px 4px 4px; }
.merci .coche {
  width: 84px; height: 84px; border-radius: 99px; margin: 0 auto 16px;
  background: color-mix(in srgb, var(--secondaire) 15%, white); color: var(--secondaire);
  display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 800;
}
.merci h2 { margin: 0 0 6px; }
.merci .numero { color: var(--secondaire); font-weight: 800; font-size: 17px; }
.etapes { text-align: left; margin: 18px 0; padding: 0; list-style: none; }
.etapes li { padding: 8px 0 8px 30px; position: relative; color: var(--doux); }
.etapes li::before {
  content: counter(etape); counter-increment: etape; position: absolute; left: 0; top: 7px;
  width: 22px; height: 22px; border-radius: 99px; background: var(--principale); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.etapes { counter-reset: etape; }
.etapes li strong { color: var(--encre); display: block; }

/* Choix du paiement à la livraison (FLC COSMETIC, 2026-10-08) */
.paiements { display: flex; gap: 8px; }
.paiement { flex: 1; display: flex; align-items: center; gap: 8px; border: 1.5px solid #E4D8CB; border-radius: 12px; padding: 11px 12px; background: #fff; font-weight: 600; cursor: pointer; }
.paiement input { width: 18px; height: 18px; margin: 0; }
.paiement:has(input:checked) { border-color: var(--secondaire); background: #FBF2F5; }

/* Menu ⋮ de tri par catégorie (2026-10-08) */
.recherche { display: flex; gap: 8px; align-items: center; }
.recherche input { flex: 1; min-width: 0; }
.btn-menu { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ligne); background: #fff; color: var(--principale); font-size: 24px; font-weight: 800; line-height: 1; cursor: pointer; }
.btn-menu.actif { background: var(--principale); border-color: var(--principale); color: #fff; }
.menu-cat { display: flex; flex-direction: column; gap: 6px; }
.menu-cat button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--ligne); background: #fff; color: var(--encre); font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.menu-cat button span { color: var(--doux); font-weight: 600; font-size: 14px; }
.menu-cat button.actif { background: var(--principale); border-color: var(--principale); color: #fff; }
.menu-cat button.actif span { color: rgba(255,255,255,.8); }
.menu-cat button.retour { justify-content: flex-start; border: 0; background: transparent; color: var(--principale); padding: 6px 4px; font-size: 15px; }
