/* Adaptations sticker / adhésif sur le gabarit photo papier peint. Ne remplace pas pp.css. */
#agp.agsm .pp-wall {
  overflow: hidden;
}
/* Sticker découpé : aucun cadre, fond, ombre ni bord — seulement le motif sur le mur photo. */
#agp.agsm[data-agsm="sticker"] .pp-wall {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: 0 !important;
  overflow: visible;
  border-radius: 0 !important;
}
#agp.agsm[data-agsm="sticker"] .pp-sheen,
#agp.agsm[data-agsm="sticker"] .pp-grip,
#agp.agsm[data-agsm="sticker"] .pp-safe,
#agp.agsm[data-agsm="sticker"] [data-presets] { display: none !important; }
#agp.agsm .pp-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: transparent;
  box-shadow: none;
}
#agp.agsm #ppArtImg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
}
#agp.agsm .pp-seams,
#agp.agsm [data-tg="seams"],
#agp.agsm .pp-mono { display: none !important; }
#agp.agsm .agsm-motifs-label { margin: 12px 0 8px; font-size: 14px; }
#agp.agsm .agsm-motifs { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
#agp.agsm .agsm-motif {
  width: 92px; background: #f4f2ee; border: 1px solid rgba(30,28,24,.12);
  border-radius: 999px; padding: 8px; cursor: pointer;
}
#agp.agsm .agsm-motif img { display: block; width: 100%; height: 64px; object-fit: contain; background: #f7f5f1; border-radius: 12px; }
#agp.agsm .agsm-motif span { display: block; margin-top: 6px; font-size: 11px; text-align: center; }
#agp.agsm .agsm-motif.is-on { outline: 2px solid #1e1c18; outline-offset: 1px; }
#agp.agsm .agsm-fin { margin: 0 0 12px; flex-wrap: wrap; }
#agp.agsm .agsm-color-name { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
#agp.agsm .agsm-color-name b { font-weight: 600; }
#agp.agsm .agsm-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
#agp.agsm .agsm-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(30,28,24,.18); padding: 0; cursor: pointer; background: #ccc;
}
#agp.agsm .agsm-swatch.is-on { outline: 2px solid #1e1c18; outline-offset: 2px; }
#agp.agsm .agsm-swatch.is-metal {
  background-image: linear-gradient(135deg, rgba(255,255,255,.55) 0%, transparent 42%, rgba(0,0,0,.22) 100%);
  background-blend-mode: soft-light;
}
#agp.agsm .agsm-vec { margin: 8px 0 0; font-size: 13px; color: rgba(30,28,24,.72); }
#agp.agsm .pp-roombtn-sm { margin-top: 10px; }
/* pp.css masque .pp [data-body="1"] .pp-row sur mobile : classes dédiées pour rester visibles. */
.agsm-studio-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}
.agsm-studio-actions .agsm-apply {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #c4a15a;
  color: #1e1c18;
  font: 600 15px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}
.agsm-studio-actions .agsm-cancel {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(30,28,24,.18);
  background: #fff;
  color: #1e1c18;
  font: 500 14px/1 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}
@media (max-width: 768px) {
  #agp.agsm .agsm-swatch { width: 32px; height: 32px; }
  #agp.agsm .agsm-motif { border-radius: 16px; }
}

/* Input fichier cliquable (le thème le met en pointer-events:none, ce qui empêche certains dépôts). */
#agp.agsm[data-agsm="sticker"] #agpFile.agp-file {
  pointer-events: auto !important;
  /* reste visuellement masqué, mais activable par le label */
}

.agsm-detected { margin: 14px 0; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.72); border: 1px solid rgba(30,28,24,.1); }
.agsm-detected-meta { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.agsm-detected-meta span { color: rgba(30,28,24,.65); }
.agsm-detected-ok { margin: 10px 0 0; font-size: 13px; }
.agsm-studio { margin: 12px 0 16px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.8); border: 1px solid rgba(30,28,24,.1); }
.agsm-studio-title { margin: 0 0 10px; font: 500 17px/1.2 var(--serif, Georgia, serif); }
.agsm-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agsm-ba figure { margin: 0; }
.agsm-ba canvas { display: block; width: 100%; height: auto; max-height: 220px; object-fit: contain; background:
  linear-gradient(45deg, #e8e6e1 25%, transparent 25%, transparent 75%, #e8e6e1 75%),
  linear-gradient(45deg, #e8e6e1 25%, #faf8f4 25%, #faf8f4 75%, #e8e6e1 75%);
  background-size: 12px 12px; background-position: 0 0, 6px 6px;
  border-radius: 12px; cursor: crosshair; }
.agsm-ba figcaption { text-align: center; font-size: 12px; margin-top: 4px; color: rgba(30,28,24,.65); }
.agsm-studio-help { font-size: 13px; margin: 8px 0; }
.agsm-picked { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.agsm-picked button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(30,28,24,.2); padding: 0; cursor: pointer; }
.agsm-picked button.is-on { outline: 2px solid #1e1c18; outline-offset: 2px; }
.agsm-sl { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.agsm-sl input { flex: 1; }
.agsm-inv { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 8px 0 12px; }
/* Chaîne lisible (maillons fermés / ouverts), fond clair — le rond noir masquait le pictogramme. */
#agp.agsm[data-agsm="sticker"] button.agsm-chain {
  position: relative;
  flex: none;
  align-self: center;
  width: 44px;
  height: 44px;
  margin: 0 0 8px;
  padding: 0 !important;
  border-radius: 12px;
  border: 1.5px solid rgba(30,28,24,.32) !important;
  background: #fff !important;
  color: #1e1c18 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: visible !important;
}
#agp.agsm[data-agsm="sticker"] button.agsm-chain.is-on {
  background: #f3efe6 !important;
  border-color: #1e1c18 !important;
}
#agp.agsm[data-agsm="sticker"] button.agsm-chain svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  overflow: visible !important;
  flex: none;
}
#agp.agsm[data-agsm="sticker"] button.agsm-chain .agsm-chain-open { display: none !important; }
#agp.agsm[data-agsm="sticker"] button.agsm-chain:not(.is-on) .agsm-chain-locked { display: none !important; }
#agp.agsm[data-agsm="sticker"] button.agsm-chain:not(.is-on) .agsm-chain-open { display: block !important; }
.agsm-chain .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.agsm-ratio { margin: 6px 0 0; font-size: 12px; color: rgba(30,28,24,.65); }
#agp.agsm .pp-dims { display: flex; align-items: end; gap: 8px; }
@media (max-width: 768px) {
  .agsm-ba { grid-template-columns: 1fr; }
  .agsm-ba canvas { max-height: 180px; }
  .agsm-studio { position: static; z-index: auto; }
  /* Fiche 16283 seulement : pied prix et barre .agmb dans le flux, aucune superposition.
     (pp.css fixe .pp .agp-foot en bas ; #1266 n’est pas modifié.) */
  html body.agsm-sticker #agp.agsm.pp .agp-foot,
  html body.agsm-sticker #agp.agsm .agp-foot {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    inset: auto !important;
    z-index: auto !important;
    transform: none !important;
    width: auto !important;
    box-shadow: none !important;
  }
  html body.agsm-sticker .agmb,
  html body.agsm-sticker.agmb-on .agmb {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    inset: auto !important;
    z-index: auto !important;
    transform: none !important;
    box-shadow: none !important;
    width: 100% !important;
  }
  html body.agsm-sticker.agmb-on,
  html body.agsm-sticker.agmb-on.agmb-shown {
    padding-bottom: 0 !important;
  }
}


/* Ouverture sans motif : mur photo seul + invitation à déposer un fichier. */
#agp.agsm[data-agsm="sticker"].is-empty .pp-art,
#agp.agsm[data-agsm="sticker"].is-empty .pp-dim,
#agp.agsm[data-agsm="sticker"].is-empty .pp-dimchip { visibility: hidden; }
#agp.agsm[data-agsm="sticker"] .agsm-empty-hint {
  position: absolute !important;
  left: 50% !important;
  top: 34% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: min(22.5rem, calc(100% - 40px)) !important;
  max-width: calc(100% - 40px) !important;
  min-width: 16rem !important;
  height: auto !important;
  margin: 0 !important;
  padding: 16px 28px !important;
  border-radius: 18px;
  background: rgba(255,255,255,.95);
  border: 1px dashed rgba(30,28,24,.28);
  box-shadow: 0 10px 28px -16px rgba(30,28,24,.4);
  color: #1e1c18;
  text-align: center;
  text-decoration: none;
  overflow: visible !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  pointer-events: auto !important;
  cursor: pointer;
  z-index: 6;
}
#agp.agsm[data-agsm="sticker"] .agsm-empty-hint-title {
  display: block;
  font: 600 17px/1.25 var(--sans, system-ui, sans-serif);
  letter-spacing: 0;
  white-space: nowrap !important;
}
#agp.agsm[data-agsm="sticker"] .agsm-empty-hint-sub {
  display: block;
  font: 400 13.5px/1.3 var(--sans, system-ui, sans-serif);
  color: #3d3a34;
  white-space: nowrap !important;
}
#agp.agsm[data-agsm="sticker"] .agsm-empty-hint:hover,
#agp.agsm[data-agsm="sticker"] .agsm-empty-hint:focus {
  background: #fff;
  outline: none;
  box-shadow: 0 12px 30px -14px rgba(30,28,24,.45);
}
#agp.agsm[data-agsm="sticker"] .agsm-empty-hint:focus-visible {
  outline: 2px solid #c4a15a;
  outline-offset: 3px;
}
#agp.agsm[data-agsm="sticker"]:not(.is-empty) .agsm-empty-hint { display: none !important; }
@media (max-width: 820px) {
  #agp.agsm[data-agsm="sticker"] .agsm-empty-hint {
    top: 32% !important;
    width: min(22.5rem, calc(100% - 32px)) !important;
    max-width: calc(100% - 32px) !important;
    min-width: 0 !important;
    padding: 14px 18px !important;
  }
  #agp.agsm[data-agsm="sticker"] .agsm-empty-hint-title { font-size: 16px; }
  #agp.agsm[data-agsm="sticker"] .agsm-empty-hint-sub { font-size: 13px; }
}

#agp.agsm[data-agsm="sticker"] .agsm-motifs-label,
#agp.agsm[data-agsm="sticker"] .agsm-motifs { display: none !important; }

.agsm-seo { background: #fbf9f4; padding: 48px 20px 72px; }
.agsm-seo-in { max-width: 760px; margin: 0 auto; }
.agsm-seo h2 { font: 500 32px/1.2 var(--serif, Georgia, serif); margin: 0 0 18px; color: #1e1c18; }
.agsm-seo h3 { font: 500 22px/1.3 var(--serif, Georgia, serif); margin: 28px 0 12px; color: #1e1c18; }
.agsm-seo p, .agsm-seo dd { font: 400 16px/1.65 var(--sans, system-ui, sans-serif); color: #2c3031; margin: 0 0 14px; }
.agsm-seo a { color: #1e1c18; text-decoration: underline; text-underline-offset: 3px; }
.agsm-faq { margin: 0; }
.agsm-faq div { margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid rgba(30,28,24,.1); }
.agsm-faq dt { font: 600 16px/1.35 var(--sans, system-ui, sans-serif); margin: 0 0 6px; }
.agsm-faq dd { margin: 0; }
.agsm-offers { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.agsm-offers a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px;
  border-radius: 999px; text-decoration: none; font: 600 15px/1 var(--sans, system-ui, sans-serif);
}
.agsm-offers a.agsm-offer-main { background: #c4a15a; color: #1e1c18; }
.agsm-offers a.agsm-offer-alt { background: #fff; color: #1e1c18; border: 1px solid rgba(30,28,24,.18); }
