/* ============================================================
   SERVICES PYRO-PRO — Boutique (produits.html)
   S'appuie sur les variables et le style cartoon de styles.css
   ============================================================ */

/* ---------- Bandeau d'entête de la boutique ---------- */
.boutique-hero {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(255,194,14,.25), transparent 55%),
    linear-gradient(160deg, var(--rouge) 0%, var(--rouge-fonce) 70%, var(--rouge-tres-fonce) 100%);
  color: var(--blanc);
  padding: 3rem 0 3.6rem;
  border-bottom: 3px solid var(--noir);
  text-align: center;
}
.boutique-hero h1 { margin-bottom: .6rem; }
.boutique-hero p { max-width: 44rem; margin-inline: auto; color: #ffeede; font-size: 1.1rem; }

/* ---------- Bouton panier dans la barre de navigation ---------- */
.nav-actions { display: flex; align-items: center; gap: 1rem; margin-left: 1.2rem; }
.nav .nav-menu { margin-left: auto; }

.nav-panier {
  position: relative;
  background: var(--jaune);
  border: 3px solid var(--noir);
  border-radius: 999px;
  padding: .45rem .9rem;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(26,26,26,.9);
  transition: transform .15s ease;
  line-height: 1;
}
.nav-panier:hover { transform: translate(-2px, -2px); }
.panier-compte {
  position: absolute; top: -8px; right: -8px;
  min-width: 22px; height: 22px;
  background: var(--rouge); color: var(--blanc);
  border: 2px solid var(--noir); border-radius: 999px;
  font-family: var(--police-titre); font-size: .78rem; font-weight: 700;
  display: grid; place-items: center; padding-inline: 4px;
}
.panier-compte.vide { display: none; }

/* ---------- Cartes produit ---------- */
.boutique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
}
.prod-carte {
  position: relative;
  background: var(--blanc);
  border: 3px solid var(--noir);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-cartoon-p);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.prod-carte:hover { transform: translateY(-5px); box-shadow: 6px 8px 0 rgba(26,26,26,.9); }

.prod-image {
  background: var(--creme);
  border-bottom: 3px solid var(--noir);
  padding: 1rem;
  cursor: pointer;
}
.prod-image img { height: 160px; width: 100%; object-fit: contain; }

.prod-badges { position: absolute; top: .7rem; left: .7rem; display: flex; flex-direction: column; gap: .35rem; z-index: 2; }
.badge {
  font-family: var(--police-titre); font-weight: 600; font-size: .74rem;
  border: 2px solid var(--noir); border-radius: 999px;
  padding: .15rem .6rem; width: fit-content;
}
.badge-nouveau { background: var(--jaune); color: var(--noir); }
.badge-rabais { background: var(--rouge); color: var(--blanc); }
.badge-epuise { background: var(--gris); color: var(--blanc); }

.prod-corps { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; text-align: left; }
.prod-cat { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); margin-bottom: .25rem; }
.prod-nom {
  font-family: var(--police-titre); font-weight: 600; font-size: 1.05rem;
  color: var(--rouge-fonce); margin-bottom: .35rem; cursor: pointer;
}
.prod-nom:hover { text-decoration: underline; }
.prod-format { font-size: .85rem; color: var(--gris); font-weight: 700; margin-bottom: .6rem; }

.prod-prix-ligne { display: flex; align-items: baseline; gap: .55rem; margin-top: auto; margin-bottom: .8rem; flex-wrap: wrap; }
.prod-prix { font-family: var(--police-titre); font-weight: 700; font-size: 1.25rem; color: var(--noir); }
.prod-ancien-prix { color: var(--gris); text-decoration: line-through; font-weight: 600; font-size: .95rem; }
.prod-sur-demande { font-family: var(--police-titre); font-weight: 600; font-size: 1rem; color: var(--rouge-fonce); }

.prod-actions { display: flex; gap: .6rem; }
.btn-ajouter {
  flex: 1;
  font-family: var(--police-titre); font-weight: 600; font-size: .95rem;
  background: var(--rouge); color: var(--blanc);
  border: 3px solid var(--noir); border-radius: 999px;
  padding: .55rem 1rem; cursor: pointer;
  box-shadow: 3px 3px 0 rgba(26,26,26,.9);
  transition: transform .15s ease, background .15s ease;
}
.btn-ajouter:hover:not(:disabled) { background: var(--rouge-fonce); transform: translate(-2px, -2px); }
.btn-ajouter:disabled { background: #cfcfcf; color: #777; cursor: not-allowed; box-shadow: none; }
.btn-detail {
  font-family: var(--police-titre); font-weight: 600; font-size: .95rem;
  background: var(--blanc); color: var(--noir);
  border: 3px solid var(--noir); border-radius: 999px;
  padding: .55rem .9rem; cursor: pointer;
  box-shadow: 3px 3px 0 rgba(26,26,26,.9);
  transition: transform .15s ease;
}
.btn-detail:hover { transform: translate(-2px, -2px); background: var(--jaune-pale); }

/* ---------- Barre de filtres ---------- */
.filtres {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.8rem;
}
.filtres label { font-weight: 800; font-size: .92rem; }
.filtres select {
  font-family: var(--police-texte); font-size: .98rem; font-weight: 700;
  padding: .55rem .9rem;
  border: 3px solid var(--noir); border-radius: 999px;
  background: var(--blanc); cursor: pointer;
  box-shadow: 3px 3px 0 rgba(26,26,26,.9);
}
.filtres select:focus { outline: 3px solid var(--jaune); outline-offset: 1px; }
.filtres-compte { margin-left: auto; font-weight: 700; color: var(--gris); font-size: .92rem; }

.boutique-vide { text-align: center; color: var(--gris); font-weight: 700; padding: 2rem 0; }

/* ---------- Fiche produit (modale) ---------- */
.modale-fond {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(26,26,26,.55);
  display: none; align-items: center; justify-content: center;
  padding: 1.2rem;
}
.modale-fond.ouverte { display: flex; }
.modale {
  background: var(--blanc);
  border: 3px solid var(--noir); border-radius: var(--rayon);
  box-shadow: var(--ombre-cartoon);
  width: min(880px, 100%);
  max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modale-fermer {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--jaune); border: 3px solid var(--noir);
  font-size: 1.1rem; font-weight: 900; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(26,26,26,.9);
}
.modale-fermer:hover { background: var(--jaune-pale); }
.modale-grille { display: grid; grid-template-columns: 1fr 1.15fr; }
.modale-image {
  background: var(--creme); border-right: 3px solid var(--noir);
  display: grid; place-items: center; padding: 1.6rem;
}
.modale-image img { max-height: 320px; object-fit: contain; }
.modale-infos { padding: 2rem 1.8rem; }
.modale-infos .prod-cat { margin-bottom: .4rem; }
.modale-infos h3 { font-size: 1.5rem; color: var(--rouge-fonce); margin-bottom: .7rem; }
.modale-prix-ligne { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1rem; flex-wrap: wrap; }
.modale-prix { font-family: var(--police-titre); font-weight: 700; font-size: 1.7rem; }
.modale-caracts { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.caract-puce {
  background: var(--jaune-pale); border: 2px solid var(--noir); border-radius: 999px;
  font-weight: 800; font-size: .85rem; padding: .25rem .8rem;
}
.modale-desc { color: var(--gris); margin-bottom: 1.4rem; }
.modale-dispo { font-weight: 800; font-size: .9rem; margin-bottom: 1.2rem; }
.modale-dispo.ok { color: #1a7a2e; }
.modale-dispo.non { color: var(--rouge); }

.quantite-ligne { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.quantite-ligne > span { font-weight: 800; font-size: .95rem; }
.quantite {
  display: inline-flex; align-items: center;
  border: 3px solid var(--noir); border-radius: 999px; overflow: hidden;
  background: var(--blanc);
}
.quantite button {
  width: 38px; height: 38px; border: none; background: var(--jaune);
  font-size: 1.15rem; font-weight: 900; cursor: pointer;
}
.quantite button:hover { background: var(--jaune-pale); }
.quantite input {
  width: 48px; height: 38px; border: none; text-align: center;
  font-family: var(--police-texte); font-weight: 800; font-size: 1rem;
}
.quantite input:focus { outline: none; background: var(--jaune-pale); }

/* ---------- Panier (tiroir latéral) ---------- */
.panier-tiroir {
  position: fixed; inset: 0 0 0 auto; z-index: 500;
  width: min(460px, 94%);
  background: var(--blanc);
  border-left: 3px solid var(--noir);
  box-shadow: -10px 0 30px rgba(0,0,0,.25);
  transform: translateX(105%);
  transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.panier-tiroir.ouvert { transform: none; }
.panier-fond {
  position: fixed; inset: 0; z-index: 450;
  background: rgba(26,26,26,.45);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.panier-fond.visible { opacity: 1; pointer-events: auto; }

.panier-entete {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.3rem;
  background: var(--rouge); color: var(--blanc);
  border-bottom: 3px solid var(--noir);
}
.panier-entete h3 { font-size: 1.2rem; }
.panier-entete button {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--jaune); border: 3px solid var(--noir);
  font-weight: 900; cursor: pointer;
}

/* Deux étapes : sélection puis coordonnées */
.panier-etape { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.panier-etape[hidden] { display: none; }

.panier-corps { flex: 1; overflow-y: auto; padding: 1.2rem 1.3rem; }

.panier-pied {
  border-top: 3px solid var(--noir);
  background: var(--creme);
  padding: 1rem 1.3rem 1.2rem;
}
.panier-pied .btn { margin-top: .9rem; }

.panier-lien-retour {
  display: block; width: 100%;
  background: none; border: none; cursor: pointer;
  font-family: var(--police-texte); font-weight: 800; font-size: .9rem;
  color: var(--rouge); text-decoration: underline;
  margin-top: .8rem; text-align: center;
}
.panier-lien-retour:hover { color: var(--rouge-fonce); }

.panier-recap {
  padding: 1rem 1.3rem;
  border-bottom: 3px dashed var(--noir);
  background: var(--jaune-pale);
}
.panier-recap .panier-lien-retour { margin: 0 0 .5rem; text-align: left; width: auto; }
.panier-recap p { font-size: .95rem; }

.panier-item {
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: .8rem; align-items: center;
  border: 2.5px solid var(--noir); border-radius: 14px;
  padding: .7rem; margin-bottom: .8rem;
  background: var(--creme);
}
.panier-item img { width: 64px; height: 64px; object-fit: contain; background: var(--blanc); border-radius: 10px; border: 2px solid var(--noir); }
.panier-item-nom { font-weight: 800; font-size: .92rem; line-height: 1.3; }
.panier-item-format { font-size: .8rem; color: var(--gris); font-weight: 700; }
.panier-item-prix { font-weight: 800; font-size: .9rem; margin-top: .2rem; }
.panier-item-droite { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.panier-item .quantite { transform: scale(.85); transform-origin: right; }
.panier-retirer {
  background: none; border: none; color: var(--rouge); font-weight: 800;
  font-size: .8rem; cursor: pointer; text-decoration: underline;
}

.panier-vide-msg { text-align: center; color: var(--gris); font-weight: 700; padding: 2rem 0; }

.panier-sous-total {
  display: flex; justify-content: space-between;
  font-family: var(--police-titre); font-weight: 700; font-size: 1.15rem;
}
.panier-note-prix { font-size: .82rem; color: var(--gris); margin-top: .4rem; }

/* Formulaire de demande dans le panier (étape 2) */
.panier-form { flex: 1; overflow-y: auto; padding: 0 1.3rem 1.3rem; background: var(--creme); }
.panier-form h4 { font-size: 1.05rem; color: var(--rouge-fonce); margin: 1rem 0 .8rem; }
.panier-form .champ { margin-bottom: .75rem; }
.panier-form .champ label { font-size: .88rem; }
.panier-form .champ input, .panier-form .champ textarea { padding: .55rem .75rem; font-size: .95rem; }
.panier-form .btn { margin-top: .3rem; }
.panier-conditions { border: 2px solid var(--rouge-fonce); border-radius: 8px; padding: .6rem .8rem .3rem; margin: 0 0 .9rem; background: var(--blanc); }
.panier-conditions legend { font-size: .88rem; font-weight: 800; color: var(--rouge-fonce); padding: 0 .3rem; }
.panier-conditions .case { display: flex; gap: .55rem; align-items: flex-start; font-size: .82rem; line-height: 1.4; margin-bottom: .5rem; cursor: pointer; }
.panier-conditions .case input { flex: none; width: 1.1rem; height: 1.1rem; margin-top: .1rem; accent-color: var(--rouge); cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .modale-grille { grid-template-columns: 1fr; }
  .modale-image { border-right: none; border-bottom: 3px solid var(--noir); }
  .modale-image img { max-height: 220px; }
  .filtres-compte { margin-left: 0; width: 100%; }
}
